Hello,
I've 3 models:
Model sale_staff.py:
name = fields.Many2one('hr.employee')
value_item = fields.One2many('history.change', 'referrence')
bhxh = fields.Monetary('Change price A')
bhxh = fields.Monetary('Change price B')
Model change_price.py:
name = fields.Many2one('hr.employee')
value_price = fields.One2many('history.change', 'referrence')
bhxh = fields.Monetary('Change price A')
bhtn = fields.Monetary('Change price B')
referrence = fields.Char('Reference')
Model history_change.py:
name = fields.Many2one('hr.employee')
referrence = fields.Many2one('change.price')
bhxh = fields.Float('Change price A')
bhtn = fields.Float('Change price B')
The XML file:
Form view of model sale_staff.py with Notebook: "History Change"
<notebook>
<page name="sale_staff_history" string="History Change">
<field name="value_item">
<tree>
<field name="name"/>
<field name="bhxh" string="Change price A"/>
<field name="bhtn" string="Change price B"/>
<field name="referrence" width="10"/>
</tree>
</field>
</page>
</notebook>
-----------
With this. I can show all values change of two fields (bhxh) (bhtn) related to all staff names in model history_change.py's tree view from model history_change.py's form view of a user.
But how to show the same in the tree view of a notebook of model sale_staff.py's form view base on the active user (current user in form views).
Please help!
Thank you!