[Odoo 10] Update view calling function from another model using button?
I've inherited the pos.session model with a function triggered when an index changed:
_inherit = 'pos.session'
order_paid = fields.Integer('Order Paid', store=True, default='0')@email@example.com
def _write(self, vals):
res = super(divina_session, self)._write(vals)
for record in self:
def set_data_write(self, vals, record):
my code here
The method is used to update a whole record on another model (pos.adm).
Pos.adm has a tree view, and I would like to update the view from button, since it doesn't update automatically after db changed... However I don't know what syntax should I use on my button definition and, most important, how to trigger it on pos.session since my index (order_paid) will not change on button press.