diff --git a/sale_commission/README.rst b/sale_commission/README.rst new file mode 100644 index 000000000..81277d061 --- /dev/null +++ b/sale_commission/README.rst @@ -0,0 +1,134 @@ +================= +Sales commissions +================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:8e7c74b8437992f2533e45ba115aac209dc7a267f382c4a2b91612baa40383e2 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcommission-lightgray.png?logo=github + :target: https://github.com/OCA/commission/tree/18.0/sale_commission + :alt: OCA/commission +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/commission-18-0/commission-18-0-sale_commission + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/commission&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the function to calculate commissions in sales orders. + +Commission lines assigned to sales order lines will be passed to the +corresponding invoice lines. + +Creating settlements directly from the sales order lines is outside the +scope of this module. + +This module depends on the account_commission module. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +For adding commissions on sales orders: + +1. Go to *Sales > Orders > Quotations*. +2. Edit or create a new record. +3. When you have selected a partner, each new quotation line you add + will have the agents and commissions set at customer level. +4. You can add, modify or delete these agents discretely clicking on the + icon with several persons represented, next to the "Commission" field + in the list. This icon will be available only if the line hasn't been + invoiced yet. +5. If you have configured your system for editing lines in a popup + window, agents will appear also in this window. +6. You have a button "Regenerate agents" on the bottom of the page + "Order Lines" for forcing a recompute of all agents from the partner + setup. This is needed for example when you have changed the partner + on the quotation having already inserted lines. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Tecnativa + +Contributors +------------ + +- Pexego. +- Davide Corio +- Joao Alfredo Gama Batista +- Sandy Carter +- Giorgio Borelli +- Daniel Campos +- Oihane Crucelaegui +- Nicola Malcontenti +- Aitor Bouzas +- Mina Samir < +- `Tecnativa `__: + + - Pedro M. Baeza + - Manuel Calero + +- `Quartile `__: + + - Aung Ko Ko Lin + - Yoshi Tashiro + +- `Studio73 `__: + + - Ethan Hildick + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px + :target: https://github.com/pedrobaeza + :alt: pedrobaeza + +Current `maintainer `__: + +|maintainer-pedrobaeza| + +This module is part of the `OCA/commission `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_commission/__init__.py b/sale_commission/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/sale_commission/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/sale_commission/__manifest__.py b/sale_commission/__manifest__.py new file mode 100644 index 000000000..79d608880 --- /dev/null +++ b/sale_commission/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2020 Tecnativa - Manuel Calero +# Copyright 2022 Quartile +# Copyright 2014-2022 Tecnativa - Pedro M. Baeza +{ + "name": "Sales commissions", + "version": "18.0.1.0.0", + "author": "Tecnativa, Odoo Community Association (OCA)", + "category": "Sales Management", + "license": "AGPL-3", + "depends": [ + "sale", + "account_commission", + ], + "website": "https://github.com/OCA/commission", + "maintainers": ["pedrobaeza"], + "data": [ + "security/ir.model.access.csv", + "views/sale_order_view.xml", + ], + "installable": True, +} diff --git a/sale_commission/i18n/es.po b/sale_commission/i18n/es.po new file mode 100644 index 000000000..e153e3c9d --- /dev/null +++ b/sale_commission/i18n/es.po @@ -0,0 +1,133 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_commission +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-07-31 19:09+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__agent_id +msgid "Agent" +msgstr "Agente" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line_agent +msgid "Agent detail of commission line in order lines" +msgstr "Detalle de agente de l??nea de comisi??n en l??neas de pedido" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__partner_agent_ids +msgid "Agents" +msgstr "Agentes" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__agent_ids +msgid "Agents & commissions" +msgstr "Agentes & comisiones" + +#. module: sale_commission +#: model:ir.model.fields,help:sale_commission.field_sale_order_line__agent_ids +msgid "Agents/Commissions related to the invoice line." +msgstr "Agentes/Comisiones relacionadas con la l??nea de factura." + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_free +msgid "Comm. free" +msgstr "Libre de comisi??n" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_status +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__commission_id +msgid "Commission" +msgstr "Comisi??n" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__amount +msgid "Commission Amount" +msgstr "Importe de la Comisi??n" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__commission_total +msgid "Commissions" +msgstr "Comisiones" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__currency_id +msgid "Currency" +msgstr "Divisa" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__display_name +msgid "Display Name" +msgstr "Nombre a Mostrar" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Edit agents" +msgstr "Editar agentes" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__id +msgid "ID" +msgstr "ID (identificaci??n)" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent____last_update +msgid "Last Modified on" +msgstr "??ltima Modificaci??n el" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_uid +msgid "Last Updated by" +msgstr "Actualizado por ??ltima vez por" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_date +msgid "Last Updated on" +msgstr "??ltima Actualizaci??n el" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__object_id +msgid "Parent" +msgstr "Parental" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__product_id +msgid "Product" +msgstr "Producto" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Regenerate agents" +msgstr "Regenerar agentes" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order +msgid "Sales Order" +msgstr "??rdenes de Venta" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line +msgid "Sales Order Line" +msgstr "L??nea de Orden de Venta" diff --git a/sale_commission/i18n/it.po b/sale_commission/i18n/it.po new file mode 100644 index 000000000..891538e52 --- /dev/null +++ b/sale_commission/i18n/it.po @@ -0,0 +1,133 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_commission +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-11-09 17:38+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__agent_id +msgid "Agent" +msgstr "Agente" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line_agent +msgid "Agent detail of commission line in order lines" +msgstr "Dettagli provvigioni agente sulle righe degli ordini" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__partner_agent_ids +msgid "Agents" +msgstr "Agenti" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__agent_ids +msgid "Agents & commissions" +msgstr "Agenti e provvigioni" + +#. module: sale_commission +#: model:ir.model.fields,help:sale_commission.field_sale_order_line__agent_ids +msgid "Agents/Commissions related to the invoice line." +msgstr "Agenti/provvigioni collegati alla riga fattura." + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_free +msgid "Comm. free" +msgstr "Senza provvigione" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_status +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__commission_id +msgid "Commission" +msgstr "Provvigione" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__amount +msgid "Commission Amount" +msgstr "Importo provvigione" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__commission_total +msgid "Commissions" +msgstr "Provvigioni" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__currency_id +msgid "Currency" +msgstr "Valuta" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Edit agents" +msgstr "Modifica agenti" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__id +msgid "ID" +msgstr "ID" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__object_id +msgid "Parent" +msgstr "Genitore" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__product_id +msgid "Product" +msgstr "Prodotto" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Regenerate agents" +msgstr "Rigenera agenti" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order +msgid "Sales Order" +msgstr "Ordine di vendita" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line +msgid "Sales Order Line" +msgstr "Riga ordine di vendita" diff --git a/sale_commission/i18n/ja.po b/sale_commission/i18n/ja.po new file mode 100644 index 000000000..451c535b9 --- /dev/null +++ b/sale_commission/i18n/ja.po @@ -0,0 +1,133 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_commission +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-12-16 14:45+0000\n" +"Last-Translator: Ryoko Tsuda \n" +"Language-Team: none\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__agent_id +msgid "Agent" +msgstr "??????????????????" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line_agent +msgid "Agent detail of commission line in order lines" +msgstr "??????????????????????????????????????????????????????????????????????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__partner_agent_ids +msgid "Agents" +msgstr "??????????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__agent_ids +msgid "Agents & commissions" +msgstr "?????????????????? ??? ??????????????????" + +#. module: sale_commission +#: model:ir.model.fields,help:sale_commission.field_sale_order_line__agent_ids +msgid "Agents/Commissions related to the invoice line." +msgstr "?????????????????????????????????????????????/?????????????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_free +msgid "Comm. free" +msgstr "???????????????????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_status +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__commission_id +msgid "Commission" +msgstr "??????????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__amount +msgid "Commission Amount" +msgstr "????????????????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__commission_total +msgid "Commissions" +msgstr "??????????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_uid +msgid "Created by" +msgstr "?????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_date +msgid "Created on" +msgstr "?????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__currency_id +msgid "Currency" +msgstr "??????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__display_name +msgid "Display Name" +msgstr "?????????" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Edit agents" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__id +msgid "ID" +msgstr "ID" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent____last_update +msgid "Last Modified on" +msgstr "???????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_uid +msgid "Last Updated by" +msgstr "???????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_date +msgid "Last Updated on" +msgstr "???????????????" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__object_id +msgid "Parent" +msgstr "???" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__product_id +msgid "Product" +msgstr "???????????????" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Regenerate agents" +msgstr "???????????????????????????" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order +msgid "Sales Order" +msgstr "???????????????" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line +msgid "Sales Order Line" +msgstr "?????????????????????" diff --git a/sale_commission/i18n/pt_BR.po b/sale_commission/i18n/pt_BR.po new file mode 100644 index 000000000..892d70691 --- /dev/null +++ b/sale_commission/i18n/pt_BR.po @@ -0,0 +1,133 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_commission +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-30 00:46+0000\n" +"Last-Translator: Adriano Prado \n" +"Language-Team: none\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__agent_id +msgid "Agent" +msgstr "Agente" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line_agent +msgid "Agent detail of commission line in order lines" +msgstr "Detalhe do representante da linha de comiss??o nas linhas de pedido" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__partner_agent_ids +msgid "Agents" +msgstr "Agentes" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__agent_ids +msgid "Agents & commissions" +msgstr "Agentes & Comiss??es" + +#. module: sale_commission +#: model:ir.model.fields,help:sale_commission.field_sale_order_line__agent_ids +msgid "Agents/Commissions related to the invoice line." +msgstr "Agentes/Comiss??es relacionadas ?? linha da fatura." + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_free +msgid "Comm. free" +msgstr "Com. livre" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_status +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__commission_id +msgid "Commission" +msgstr "Comiss??o" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__amount +msgid "Commission Amount" +msgstr "Valor da Comiss??o" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__commission_total +msgid "Commissions" +msgstr "Comiss??es" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_uid +msgid "Created by" +msgstr "Criado por" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_date +msgid "Created on" +msgstr "Criado em" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__currency_id +msgid "Currency" +msgstr "Moeda" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__display_name +msgid "Display Name" +msgstr "Nome Exibi????o" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Edit agents" +msgstr "Editar representantes" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__id +msgid "ID" +msgstr "ID" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent____last_update +msgid "Last Modified on" +msgstr "??ltima Modifica????o em" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_uid +msgid "Last Updated by" +msgstr "??ltima Atualiza????o por" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_date +msgid "Last Updated on" +msgstr "??ltima Atualiza????o em" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__object_id +msgid "Parent" +msgstr "Superior" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__product_id +msgid "Product" +msgstr "Produto" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Regenerate agents" +msgstr "Regenerar Agentes" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order +msgid "Sales Order" +msgstr "Pedido de Venda" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line +msgid "Sales Order Line" +msgstr "Item do pedido de vendas" diff --git a/sale_commission/i18n/sale_commission.pot b/sale_commission/i18n/sale_commission.pot new file mode 100644 index 000000000..7ee5e1874 --- /dev/null +++ b/sale_commission/i18n/sale_commission.pot @@ -0,0 +1,125 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_commission +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \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_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__agent_id +msgid "Agent" +msgstr "" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line_agent +msgid "Agent detail of commission line in order lines" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__partner_agent_ids +msgid "Agents" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__agent_ids +msgid "Agents & commissions" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,help:sale_commission.field_sale_order_line__agent_ids +msgid "Agents/Commissions related to the invoice line." +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_free +msgid "Comm. free" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_status +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__commission_id +msgid "Commission" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__amount +msgid "Commission Amount" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__commission_total +msgid "Commissions" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_uid +msgid "Created by" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_date +msgid "Created on" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__currency_id +msgid "Currency" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__display_name +msgid "Display Name" +msgstr "" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Edit agents" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__id +msgid "ID" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_date +msgid "Last Updated on" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__object_id +msgid "Parent" +msgstr "" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__product_id +msgid "Product" +msgstr "" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Regenerate agents" +msgstr "" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_commission/i18n/tr.po b/sale_commission/i18n/tr.po new file mode 100644 index 000000000..38294fe4a --- /dev/null +++ b/sale_commission/i18n/tr.po @@ -0,0 +1,128 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_commission +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-08-26 11:06+0000\n" +"Last-Translator: Metin GÜLSOY \n" +"Language-Team: none\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6.2\n" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__agent_id +msgid "Agent" +msgstr "Temsilci" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line_agent +msgid "Agent detail of commission line in order lines" +msgstr "Sipariş satırlarında komisyon satırının temsilci detayı" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__partner_agent_ids +msgid "Agents" +msgstr "Temsilciler" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__agent_ids +msgid "Agents & commissions" +msgstr "Temsilciler ve Komisyonlar" + +#. module: sale_commission +#: model:ir.model.fields,help:sale_commission.field_sale_order_line__agent_ids +msgid "Agents/Commissions related to the invoice line." +msgstr "Fatura satırıyla ilgili temsilciler/komisyonlar." + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_free +msgid "Comm. free" +msgstr "Komisyonsuz" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__commission_status +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__commission_id +msgid "Commission" +msgstr "Komisyon" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__amount +msgid "Commission Amount" +msgstr "Komisyon Miktarı" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order__commission_total +msgid "Commissions" +msgstr "Komisyonlar" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_uid +msgid "Created by" +msgstr "Tarafından oluşturuldu" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__create_date +msgid "Created on" +msgstr "Tarihinde oluşturuldu" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__currency_id +msgid "Currency" +msgstr "Kur" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__display_name +msgid "Display Name" +msgstr "Görünen İsim" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Edit agents" +msgstr "Temsilcileri düzenle" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__id +msgid "ID" +msgstr "Kimlik" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_uid +msgid "Last Updated by" +msgstr "Son Güncelleyen" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__write_date +msgid "Last Updated on" +msgstr "Son Değiştirilme Tarihi" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line_agent__object_id +msgid "Parent" +msgstr "Üst" + +#. module: sale_commission +#: model:ir.model.fields,field_description:sale_commission.field_sale_order_line__product_id +msgid "Product" +msgstr "Ürün" + +#. module: sale_commission +#: model_terms:ir.ui.view,arch_db:sale_commission.view_order_agent_form_inherit +msgid "Regenerate agents" +msgstr "Temsilcileri yeniden oluşturun" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order +msgid "Sales Order" +msgstr "Satis Siparişi" + +#. module: sale_commission +#: model:ir.model,name:sale_commission.model_sale_order_line +msgid "Sales Order Line" +msgstr "Satış Sipariş Satırı" diff --git a/sale_commission/models/__init__.py b/sale_commission/models/__init__.py new file mode 100644 index 000000000..6aacb7531 --- /dev/null +++ b/sale_commission/models/__init__.py @@ -0,0 +1 @@ +from . import sale_order diff --git a/sale_commission/models/sale_order.py b/sale_commission/models/sale_order.py new file mode 100644 index 000000000..e451aac28 --- /dev/null +++ b/sale_commission/models/sale_order.py @@ -0,0 +1,94 @@ +# Copyright 2014-2022 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + @api.depends("order_line.agent_ids.amount") + def _compute_commission_total(self): + for record in self: + record.commission_total = sum(record.mapped("order_line.agent_ids.amount")) + + commission_total = fields.Float( + string="Commissions", + compute="_compute_commission_total", + store=True, + ) + + partner_agent_ids = fields.Many2many( + string="Agents", + comodel_name="res.partner", + compute="_compute_agents", + search="_search_agents", + ) + + @api.depends("partner_agent_ids", "order_line.agent_ids.agent_id") + def _compute_agents(self): + for so in self: + so.partner_agent_ids = [ + (6, 0, so.mapped("order_line.agent_ids.agent_id").ids) + ] + + @api.model + def _search_agents(self, operator, value): + sol_agents = self.env["sale.order.line.agent"].search( + [("agent_id", operator, value)] + ) + return [("id", "in", sol_agents.mapped("object_id.order_id").ids)] + + def recompute_lines_agents(self): + self.mapped("order_line").recompute_agents() + + +class SaleOrderLine(models.Model): + _inherit = [ + "sale.order.line", + "commission.mixin", + ] + _name = "sale.order.line" + + agent_ids = fields.One2many(comodel_name="sale.order.line.agent") + + @api.depends("order_id.partner_id") + def _compute_agent_ids(self): + self.agent_ids = False # for resetting previous agents + for record in self: + if record.order_id.partner_id and not record.commission_free: + record.agent_ids = record._prepare_agents_vals_partner( + record.order_id.partner_id, settlement_type="sale_invoice" + ) + + def _prepare_invoice_line(self, **optional_values): + vals = super()._prepare_invoice_line(**optional_values) + vals["agent_ids"] = [ + (0, 0, {"agent_id": x.agent_id.id, "commission_id": x.commission_id.id}) + for x in self.agent_ids + ] + return vals + + +class SaleOrderLineAgent(models.Model): + _inherit = "commission.line.mixin" + _name = "sale.order.line.agent" + _description = "Agent detail of commission line in order lines" + + object_id = fields.Many2one(comodel_name="sale.order.line") + + @api.depends( + "commission_id", + "object_id.price_subtotal", + "object_id.product_id", + "object_id.product_uom_qty", + ) + def _compute_amount(self): + for line in self: + order_line = line.object_id + line.amount = line._get_commission_amount( + line.commission_id, + order_line.price_subtotal, + order_line.product_id, + order_line.product_uom_qty, + ) diff --git a/sale_commission/pyproject.toml b/sale_commission/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/sale_commission/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/sale_commission/readme/CONTRIBUTORS.md b/sale_commission/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..7ca2e8bc6 --- /dev/null +++ b/sale_commission/readme/CONTRIBUTORS.md @@ -0,0 +1,18 @@ +- Pexego. +- Davide Corio \<\> +- Joao Alfredo Gama Batista \<\> +- Sandy Carter \<\> +- Giorgio Borelli \<\> +- Daniel Campos \<\> +- Oihane Crucelaegui \<\> +- Nicola Malcontenti \<\> +- Aitor Bouzas \<\> +- Mina Samir \< +- [Tecnativa](https://www.tecnativa.com): + - Pedro M. Baeza + - Manuel Calero +- [Quartile](https://www.quartile.co): + - Aung Ko Ko Lin + - Yoshi Tashiro +- [Studio73](https://www.studio73.es): + - Ethan Hildick diff --git a/sale_commission/readme/DESCRIPTION.md b/sale_commission/readme/DESCRIPTION.md new file mode 100644 index 000000000..0d8c7bb8d --- /dev/null +++ b/sale_commission/readme/DESCRIPTION.md @@ -0,0 +1,9 @@ +This module adds the function to calculate commissions in sales orders. + +Commission lines assigned to sales order lines will be passed to the +corresponding invoice lines. + +Creating settlements directly from the sales order lines is outside the +scope of this module. + +This module depends on the account_commission module. diff --git a/sale_commission/readme/USAGE.md b/sale_commission/readme/USAGE.md new file mode 100644 index 000000000..6c0f8ea3f --- /dev/null +++ b/sale_commission/readme/USAGE.md @@ -0,0 +1,16 @@ +For adding commissions on sales orders: + +1. Go to *Sales \> Orders \> Quotations*. +2. Edit or create a new record. +3. When you have selected a partner, each new quotation line you add + will have the agents and commissions set at customer level. +4. You can add, modify or delete these agents discretely clicking on + the icon with several persons represented, next to the "Commission" + field in the list. This icon will be available only if the line + hasn't been invoiced yet. +5. If you have configured your system for editing lines in a popup + window, agents will appear also in this window. +6. You have a button "Regenerate agents" on the bottom of the page + "Order Lines" for forcing a recompute of all agents from the partner + setup. This is needed for example when you have changed the partner + on the quotation having already inserted lines. diff --git a/sale_commission/security/ir.model.access.csv b/sale_commission/security/ir.model.access.csv new file mode 100644 index 000000000..11b923fb4 --- /dev/null +++ b/sale_commission/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_sale_order_line_agent,access_sale_order_line_agent,model_sale_order_line_agent,sales_team.group_sale_salesman,1,1,1,1 +access_commission,access_commission,commission.model_commission,sales_team.group_sale_salesman,1,0,0,0 +access_commission_section_user,access_commission_section_user,commission.model_commission_section,sales_team.group_sale_salesman,1,0,0,0 +access_account_invoice_line_agent,access_account_invoice_line_agent,account_commission.model_account_invoice_line_agent,sales_team.group_sale_salesman,1,0,0,0 diff --git a/sale_commission/static/description/icon.png b/sale_commission/static/description/icon.png new file mode 100644 index 000000000..07b9945fd Binary files /dev/null and b/sale_commission/static/description/icon.png differ diff --git a/sale_commission/static/description/icon.svg b/sale_commission/static/description/icon.svg new file mode 100644 index 000000000..5be1be46e --- /dev/null +++ b/sale_commission/static/description/icon.svg @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sale_commission/static/description/index.html b/sale_commission/static/description/index.html new file mode 100644 index 000000000..3644f1b32 --- /dev/null +++ b/sale_commission/static/description/index.html @@ -0,0 +1,474 @@ + + + + + +Sales commissions + + + +
+

Sales commissions

+ + +

Beta License: AGPL-3 OCA/commission Translate me on Weblate Try me on Runboat

+

This module adds the function to calculate commissions in sales orders.

+

Commission lines assigned to sales order lines will be passed to the +corresponding invoice lines.

+

Creating settlements directly from the sales order lines is outside the +scope of this module.

+

This module depends on the account_commission module.

+

Table of contents

+ +
+

Usage

+

For adding commissions on sales orders:

+
    +
  1. Go to Sales > Orders > Quotations.
  2. +
  3. Edit or create a new record.
  4. +
  5. When you have selected a partner, each new quotation line you add +will have the agents and commissions set at customer level.
  6. +
  7. You can add, modify or delete these agents discretely clicking on the +icon with several persons represented, next to the “Commission” field +in the list. This icon will be available only if the line hasn’t been +invoiced yet.
  8. +
  9. If you have configured your system for editing lines in a popup +window, agents will appear also in this window.
  10. +
  11. You have a button “Regenerate agents” on the bottom of the page +“Order Lines” for forcing a recompute of all agents from the partner +setup. This is needed for example when you have changed the partner +on the quotation having already inserted lines.
  12. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

pedrobaeza

+

This module is part of the OCA/commission project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/sale_commission/tests/__init__.py b/sale_commission/tests/__init__.py new file mode 100644 index 000000000..cd3f88e0e --- /dev/null +++ b/sale_commission/tests/__init__.py @@ -0,0 +1 @@ +from . import test_sale_commission diff --git a/sale_commission/tests/test_sale_commission.py b/sale_commission/tests/test_sale_commission.py new file mode 100644 index 000000000..735b93481 --- /dev/null +++ b/sale_commission/tests/test_sale_commission.py @@ -0,0 +1,144 @@ +# Copyright 2020 Tecnativa - Manuel Calero +# Copyright 2022 Quartile +# Copyright 2016-2022 Tecnativa - Pedro M. Baeza +# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html + +from odoo.tests import Form, tagged + +from odoo.addons.account_commission.tests.test_account_commission import ( + TestAccountCommission, +) + + +@tagged("post_install", "-at_install") +class TestSaleCommission(TestAccountCommission): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.sale_order_model = cls.env["sale.order"] + cls.advance_inv_model = cls.env["sale.advance.payment.inv"] + cls.product.write({"invoice_policy": "order"}) + + def _create_sale_order(self, agent, commission): + order_form = Form(self.sale_order_model) + order_form.partner_id = self.partner + with order_form.order_line.new() as line_form: + line_form.product_id = self.product + order = order_form.save() + order.order_line.agent_ids = [ + (0, 0, {"agent_id": agent.id, "commission_id": commission.id}) + ] + return order + + def _invoice_sale_order(self, sale_order, date=None): + old_invoices = sale_order.invoice_ids + wizard = self.advance_inv_model.create( + { + "advance_payment_method": "delivered", + "sale_order_ids": [(4, sale_order.id)], + } + ) + wizard.create_invoices() + invoice = sale_order.invoice_ids - old_invoices + if date: + invoice.invoice_date = date + invoice.date = date + return + + def _create_order_and_invoice(self, agent, commission): + sale_order = self._create_sale_order(agent, commission) + sale_order.action_confirm() + self._invoice_sale_order(sale_order) + invoices = sale_order.invoice_ids + invoices.invoice_line_ids.agent_ids._compute_amount() + return sale_order + + def _check_full(self, agent, commission, period, initial_count): + sale_order = self._create_order_and_invoice(agent, commission) + settlements = self._check_invoice_thru_settle( + agent, commission, period, initial_count, sale_order + ) + return settlements + + def test_sale_commission_gross_amount_payment(self): + self._check_full( + self.env.ref("commission.res_partner_pritesh_sale_agent"), + self.commission_section_paid, + 1, + 0, + ) + + def test_sale_commission_status(self): + # Make sure user is in English + self.env.user.lang = "en_US" + sale_order = self._create_sale_order( + self.env.ref("commission.res_partner_pritesh_sale_agent"), + self.commission_section_invoice, + ) + self.assertIn("1", sale_order.order_line[0].commission_status) + self.assertNotIn("agents", sale_order.order_line[0].commission_status) + sale_order.mapped("order_line.agent_ids").unlink() + self.assertIn("No", sale_order.order_line[0].commission_status) + sale_order.order_line[0].agent_ids = [ + ( + 0, + 0, + { + "agent_id": self.env.ref( + "commission.res_partner_pritesh_sale_agent" + ).id, + "commission_id": self.env.ref("commission.demo_commission").id, + }, + ), + ( + 0, + 0, + { + "agent_id": self.env.ref( + "commission.res_partner_eiffel_sale_agent" + ).id, + "commission_id": self.env.ref("commission.demo_commission").id, + }, + ), + ] + self.assertIn("2", sale_order.order_line[0].commission_status) + self.assertIn("agents", sale_order.order_line[0].commission_status) + # Free + sale_order.order_line.commission_free = True + self.assertIn("free", sale_order.order_line.commission_status) + self.assertAlmostEqual(sale_order.order_line.agent_ids.amount, 0) + # test show agents buton + action = sale_order.order_line.button_edit_agents() + self.assertEqual(action["res_id"], sale_order.order_line.id) + + def test_sale_commission_propagation(self): + self.partner.agent_ids = [(4, self.agent_monthly.id)] + sale_order_form = Form(self.env["sale.order"]) + sale_order_form.partner_id = self.partner + with sale_order_form.order_line.new() as line_form: + line_form.product_id = self.product + line_form.product_uom_qty = 1 + sale_order = sale_order_form.save() + agent = sale_order.order_line.agent_ids + self._check_propagation(agent, self.commission_net_invoice, self.agent_monthly) + # Check agent change + agent.agent_id = self.agent_quaterly + self.assertTrue(agent.commission_id, self.commission_section_invoice) + # Check recomputation + agent.unlink() + sale_order.recompute_lines_agents() + agent = sale_order.order_line.agent_ids + self._check_propagation(agent, self.commission_net_invoice, self.agent_monthly) + + def test_sale_commission_invoice_line_agent(self): + sale_order = self._create_sale_order( + self.agent_monthly, + self.commission_section_invoice, + ) + sale_order.action_confirm() + self._invoice_sale_order(sale_order) + inv_line = sale_order.mapped("invoice_ids.invoice_line_ids")[0] + self.assertTrue( + inv_line.agent_ids[0].commission_id, self.commission_section_invoice + ) + self.assertTrue(inv_line.agent_ids[0].agent_id, self.agent_monthly) diff --git a/sale_commission/views/sale_order_view.xml b/sale_commission/views/sale_order_view.xml new file mode 100644 index 000000000..3c11e075b --- /dev/null +++ b/sale_commission/views/sale_order_view.xml @@ -0,0 +1,70 @@ + + + + sale.agent.order.inherit.form + sale.order + + + + + +