Announcement

Collapse
No announcement yet.

How to create a module with a Item list section?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create a module with a Item list section?

    Hey all,
    I want to create a module just as Invoice or Quote module where there is a Item List section just as Invoice module where products are added in invoice
    (See screenshot attached).
    I have already created my modules named shipment and the shipmentItems. But am stuck on linking both for them to work as described above.
    Please any idea?
    Thanks in advance

  • #2
    I finally came out with a solution.
    In fact my solution is based on the paid sales pack extension.
    To resume it in few steps:
    Let say we want to name this "Shipment" and create it inside the namespace "MyModule" instead of "Sales"
    1. Extract the extension pack to any folder.
    2. Change "Sales" namespace to "MyModule" under "/application/Espo/Modules/"
    3. Duplicate any Quote.php file and rename it to Shipment.php
    4. Duplicate any QuoteItem.php file and rename it to ShipmentItem.php
    5. Rename classes inside Shipment.php and ShipmentItem.php accordingly with the correct namespace.
    6. Rename any occurence of "quote", "quoteItem", "Quote", "QuoteItem" accordingly
    7. Delete all others files except Shipment.php and ShipmentItem.php
    8. Repeat from step 2 to step 7 under "/client/modules/" folder
    9. Do any customization you want. remove fields, add some, remove all buttons you dont want...
    10. Update manifest.json file
    11. Zip the content of the folder as use EspoCRM extension installer
    Thats all.
    Last edited by dodom2; 03-13-2020, 06:50 PM.

    Comment


    • #3
      I'd recommend to duplicate Invoice or SalesOrder entity type. Since they already extend Quote.

      Comment


      • #4
        > Zip the content of the folder

        Worth to note for anyone who will do it, that re-distributing or publishing the copied code would cause a license violation.

        Comment


        • dodom2
          dodom2 commented
          Editing a comment
          We're not sharing the code We had a hard time with this project tho so we want to share with others who have access to this extension on how we accomplished this. Again no worries on us sharing the source.

        • espcrm
          espcrm commented
          Editing a comment
          Something I will look into copying once I buy the package. Thanks dodom2
      Working...
      X