diff --git a/sale_agent/i18n/fr.po b/sale_agent/i18n/fr.po new file mode 100644 index 0000000..5ad4b6b --- /dev/null +++ b/sale_agent/i18n/fr.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_agent +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-21 08:56+0000\n" +"PO-Revision-Date: 2024-11-21 08:56+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: sale_agent +#: model:ir.model.fields,field_description:sale_agent.field_account_bank_statement_line__invoice_agent_id +#: model:ir.model.fields,field_description:sale_agent.field_account_invoice_report__invoice_agent_id +#: model:ir.model.fields,field_description:sale_agent.field_account_move__invoice_agent_id +#: model:ir.model.fields,field_description:sale_agent.field_account_payment__invoice_agent_id +#: model:ir.model.fields,field_description:sale_agent.field_res_partner__agent_id +#: model:ir.model.fields,field_description:sale_agent.field_res_users__agent_id +#: model:ir.model.fields,field_description:sale_agent.field_sale_order__agent_id +#: model:ir.model.fields,field_description:sale_agent.field_sale_report__agent_id +#: model_terms:ir.ui.view,arch_db:sale_agent.view_account_invoice_filter +#: model_terms:ir.ui.view,arch_db:sale_agent.view_account_invoice_report_search +#: model_terms:ir.ui.view,arch_db:sale_agent.view_order_product_search +#: model_terms:ir.ui.view,arch_db:sale_agent.view_res_partner_filter +#: model_terms:ir.ui.view,arch_db:sale_agent.view_sales_order_filter +msgid "Agent" +msgstr "Agent" + +#. module: sale_agent +#: model_terms:ir.ui.view,arch_db:sale_agent.view_res_partner_filter +msgid "Agents" +msgstr "Agents" + +#. module: sale_agent +#: model:ir.model,name:sale_agent.model_res_partner +msgid "Contact" +msgstr "Contact" + +#. module: sale_agent +#: model:ir.model,name:sale_agent.model_account_invoice_report +msgid "Invoices Statistics" +msgstr "Statistiques des factures" + +#. module: sale_agent +#: model:ir.model.fields,field_description:sale_agent.field_res_partner__agent +#: model:ir.model.fields,field_description:sale_agent.field_res_users__agent +msgid "Is an agent?" +msgstr "Est un agent ?" + +#. module: sale_agent +#: model:ir.model,name:sale_agent.model_account_move +msgid "Journal Entry" +msgstr "Pièce comptable" + +#. module: sale_agent +#: model:ir.model,name:sale_agent.model_sale_report +msgid "Sales Analysis Report" +msgstr "Rapport d'analyse des ventes" + +#. module: sale_agent +#: model:ir.model,name:sale_agent.model_sale_order +msgid "Sales Order" +msgstr "Bon de commande" diff --git a/sale_agent/models/account_move.py b/sale_agent/models/account_move.py index 4ca7630..c171cd9 100644 --- a/sale_agent/models/account_move.py +++ b/sale_agent/models/account_move.py @@ -9,7 +9,8 @@ class AccountMove(models.Model): _inherit = 'account.move' invoice_agent_id = fields.Many2one( - 'res.partner', domain=[('agent', '=', True)], ondelete='restrict', string="Agent", + 'res.partner', domain=[('agent', '=', True)], string="Agent", + ondelete='restrict', tracking=True, compute='_compute_invoice_agent_id', store=True, readonly=False, precompute=True) @api.depends('partner_id', 'move_type') diff --git a/sale_agent/models/res_partner.py b/sale_agent/models/res_partner.py index c946f1f..2de72a2 100644 --- a/sale_agent/models/res_partner.py +++ b/sale_agent/models/res_partner.py @@ -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) diff --git a/sale_agent/models/sale_order.py b/sale_agent/models/sale_order.py index 5c832cb..d30f9ca 100644 --- a/sale_agent/models/sale_order.py +++ b/sale_agent/models/sale_order.py @@ -9,7 +9,8 @@ class SaleOrder(models.Model): _inherit = 'sale.order' agent_id = fields.Many2one( - 'res.partner', domain=[('agent', '=', True)], ondelete='restrict', + 'res.partner', domain=[('agent', '=', True)], + ondelete='restrict', tracking=True, compute='_compute_agent_id', store=True, readonly=False, precompute=True) @api.depends('partner_id')