Reputation: 1160
If you create new quotation in the Sales
module, there are some control buttons:
I want to create those custom control for my tree view. But when I search from the source code, I can't find where is the python method is called.
...
<tree string="Sales Order Lines" editable="bottom">
<control>
<create name="add_product_control" string="Add a product"/>
<create name="add_section_control" string="Add a section" context="{'default_display_type': 'line_section'}"/>
<create name="add_note_control" string="Add a note" context="{'default_display_type': 'line_note'}"/>
</control>
...
I search the add_product_control
keyword, but there is nothing I found.
Upvotes: 1
Views: 549
Reputation: 11
Because odoo is not calling any python method it will trigger from javascript side and it will add new record and hide other fields using display_type display-types
and you can find code in /addons/account/static/src/js/section_and_note_fields_backend.js
Upvotes: 1