Basically, I want to put a domain on this field:
line_ids = fields.One2many(
"hr.payslip.line",
"slip_id",
string="Payslip Lines",
readonly=True,
domain=[("company_id", "=", self.company_id.id)],
)
But I'm getting:
domain=[("company_id", "=", self.company_id.id)],
NameError: name 'self' is not defined
I figured Odoo have a perfect solution for this, the attribute: check_company=True