Creating a custom module based on Quotes

I am thinking about creating a custom module much like Quotes where a related modules records can be added on the same form as the Record/Create of the parent record.  This module would be much simpler than quotes and products would not be involved but I cant find any information about adding the part of the view that allows line items to be added.

Has anyone done this?  Are there any examples or posts out there about how to do it?

  • We have reproduce the behaviour between Opportunities and RLI several times. Does that fit your needs?

    The required changes are:

    Create custom/modules/<Module>/clients/base/layouts/create/create.php

    Create custom/modules/<Module>/clients/base/layouts/record/record.php

    In both viewdefs you have to add the component subpanel-create, just like it is defined in the create viewdefs of Opportunities

    array(
       'layout' => 'subpanels-create',
    ),

    For those layouts you may copy the default layouts (clients/base/layouts/) and add the component described above.

    Create custom/modules/<Module>/clients/base/layouts/subpanels-create/subpanels-create.php where you will define the subpanel to be rendered as a create one.

    Customize subpanel-list.php of child module according to your needs and, eventually, implement subpanel-list.js in order to apply some specific behavior.

    You will need to copy from BaseCreateView to Base<Module>RecordView the saveWaterFall which also saves the subpanels-create components.

    Good luck!

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • OK, I have spent two days trying to turn your words into code with no luck.  I cant even get it to error for some reason.  All I am trying to do at the moment is show a subpanel of a submodule on the create view main module.  If I can get that to work I can figure out the rest.  But so far nothing.  I even looked at other examples and copied them with no luck at all. 

    I attached my files to this note if anyone has the time to look at them.

  • And never mind, your instructions were enough.  The problem I was having was that I didnt set PHPStorm to upload changes to my server when I saved them to my local machine.   So I was furiously changing files locally and my server had no clue and was doing exactly what it was supposed to be doing.