Hi all,
I try to add a functional field in stock.pack.operation,
Here it is my code, which is i tried,
from openerp import fields, models, api
class stock_inherited(models.Model):
_inherit = 'stock.pack.operation',
@api.depends('picking_id.partner_id')
def _compute_child_contact_ids(self):
partner_id = int(record.picking_id.partner_id)
is_company = record.picking_id.partner_id.is_company
parent_id = record.picking_id.partner_id.parent_id
record.filters = is_company +','+parent_id+','+partner_id
return self.filters
partner_id = fields.Many2one(string="Partner ID", related='picking_id.partner_id', store=True)
filters = fields.Char(compute="_compute_child_contact_ids", string="Filters", store=True)
here partner_id gets exact partner ids, but the filters field is empty.
thanks in advance...!