[IMP] sale_agent: add tracking and fr translation

This commit is contained in:
Alexis de Lattre
2024-11-21 09:59:39 +01:00
parent 5f4929f819
commit c37b607f97
4 changed files with 76 additions and 4 deletions

View File

@@ -8,8 +8,9 @@ from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
agent = fields.Boolean(string="Is an agent?")
agent = fields.Boolean(string="Is an agent?", tracking=True)
# agent_id is only displayed on parent partner
# on sale.order and invoice, it uses commercial_partner_id.agent_id.id
agent_id = fields.Many2one(
'res.partner', domain=[('agent', '=', True)], ondelete='restrict', copy=False)
'res.partner', domain=[('agent', '=', True)], ondelete='restrict',
copy=False, tracking=True)