How to add the lineitems in my custom modules same as the quotes modules

I have a custom module and opportunity module, i need to add the line items in the custom module.
Please help me how to i add the line items.

That is not something easily accomplished. I don’t know of any code examples either. You’d have to invent something. Maybe try replicating what’s done in the quotes module.

Cool! I didn’t see that one! (not sure what version the poster is working in, but that will only work in 7)

Hello

i try to add the line_items in vardefs file of the my module but still the function of the display_lines not called .

ā€˜line_items’ =>
array(
ā€˜required’ => false,
ā€˜name’ => ā€˜line_items’,
ā€˜vname’ => ā€˜LBL_LINE_ITEMS’,
ā€˜type’ => ā€˜function’,
ā€˜source’ => ā€˜non-db’,
ā€˜massupdate’ => 0,
ā€˜importable’ => ā€˜false’,
ā€˜duplicate_merge’ => ā€˜disabled’,
ā€˜duplicate_merge_dom_value’ => 0,
ā€˜audited’ => false,
ā€˜reportable’ => false,
ā€˜function’ =>
array(
ā€˜name’ => ā€˜display_lines’,
ā€˜returns’ => ā€˜html’,
ā€˜include’ => ā€˜modules/AOS_Products_Quotes/Line_Items.php’
),
),

my layout shows like that

Does anyone have any idea about the line item issue with the custom module?

Hello

i got the solution for the custom module line item,
We need to change the layout mode of the module from config/services/module/module_routing.yaml
record: false

after this changes we are able to log the line item function in the custom module.

Do you know how to do this in v7.13?