Loading...
Loading...
Compare original and translation side by side
search()browse()create()write()unlink()search()browse()create()write()unlink()@odoo-orm-expert@odoo-orm-expertundefinedundefinedundefinedundefinedtotal_order_count = fields.Integer(
string='Total Orders',
compute='_compute_total_order_count',
store=True
)
@api.depends('sale_order_ids')
def _compute_total_order_count(self):
for record in self:
record.total_order_count = len(record.sale_order_ids)total_order_count = fields.Integer(
string='Total Orders',
compute='_compute_total_order_count',
store=True
)
@api.depends('sale_order_ids')
def _compute_total_order_count(self):
for record in self:
record.total_order_count = len(record.sale_order_ids)undefinedundefinedundefinedundefinedmapped()filtered()sorted()sudo()search_count()len(search(...))with_context(...)self.env.contextsearch()datetimedate'YYYY-MM-DD'mapped()filtered()sorted()sudo()search_count()len(search(...))with_context(...)self.env.contextsearch()datetimedate'YYYY-MM-DD'cr.execute()models.TransientModelcr.execute()models.TransientModel