diff --git a/repair_discount/README.rst b/repair_discount/README.rst new file mode 100644 index 0000000..8b2b087 --- /dev/null +++ b/repair_discount/README.rst @@ -0,0 +1,83 @@ +=============== +Repair Discount +=============== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:9ff7aad831adc2c669cd1e07926e8eb8da381c855dd588790b2ff98cf3eb6498 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fmanufacture-lightgray.png?logo=github + :target: https://github.com/OCA/manufacture/tree/14.0/repair_discount + :alt: OCA/manufacture +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-repair_discount + :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/manufacture&target_branch=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of mrp repair adding +new field discount on operations lines + +**Table of contents** + +.. contents:: + :local: + +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 +~~~~~~~ + +* Agile Business Group +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Nicola Malcontenti +* Pedro M. Baeza +* Lorenzo Battistini +* Ignacio Ales López +* María Asunción Daza +* Manuel Regidor + +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. + +This module is part of the `OCA/manufacture `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/repair_discount/__init__.py b/repair_discount/__init__.py new file mode 100644 index 0000000..1fd09b2 --- /dev/null +++ b/repair_discount/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2015 Nicola Malcontenti - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/repair_discount/__manifest__.py b/repair_discount/__manifest__.py new file mode 100644 index 0000000..44f50af --- /dev/null +++ b/repair_discount/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2015 Nicola Malcontenti - Agile Business Group +# Copyright 2016 Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Repair Discount", + "version": "14.0.1.0.0", + "category": "Manufacturing", + "license": "AGPL-3", + "author": "Agile Business Group, " "Tecnativa, " "Odoo Community Association (OCA)", + "website": "https://github.com/avanzosc/mrp-repair-addons", + "depends": ["repair"], + "data": [ + "views/mrp_repair_view.xml", + "report/repair_templates_repair_order.xml", + ], + "installable": True, +} diff --git a/repair_discount/i18n/de.po b/repair_discount/i18n/de.po new file mode 100644 index 0000000..d20d87b --- /dev/null +++ b/repair_discount/i18n/de.po @@ -0,0 +1,62 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2018-12-10 11:58+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: none\n" +"Language: de\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 3.3\n" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "Rabatt (%)" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +#, fuzzy +msgid "Repair Fees" +msgstr "Reparaturgebührenzeile" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +#, fuzzy +msgid "Repair Line (parts)" +msgstr "Reparaturzeile" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Reparaturauftrag" diff --git a/repair_discount/i18n/es.po b/repair_discount/i18n/es.po new file mode 100644 index 0000000..3c02a7a --- /dev/null +++ b/repair_discount/i18n/es.po @@ -0,0 +1,63 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +# Translators: +# enjolras , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2023-12-28 00:50+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "Descuento (%)" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "Nombre a Mostrar" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "ID" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +msgid "Repair Fees" +msgstr "Tasas de Reparación" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +msgid "Repair Line (parts)" +msgstr "Línea de Reparación (piezas)" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Pedido de reparación" diff --git a/repair_discount/i18n/fr.po b/repair_discount/i18n/fr.po new file mode 100644 index 0000000..14b1357 --- /dev/null +++ b/repair_discount/i18n/fr.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +# Translators: +# Quentin THEURET , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2018-09-26 08:27+0000\n" +"Last-Translator: William Olhasque \n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\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 3.1.1\n" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "Remise (%)" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +#, fuzzy +msgid "Repair Fees" +msgstr "Ligne de frais de réparation" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +#, fuzzy +msgid "Repair Line (parts)" +msgstr "Ligne de réparation" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Ordre de réparation" diff --git a/repair_discount/i18n/hr.po b/repair_discount/i18n/hr.po new file mode 100644 index 0000000..1cf0f47 --- /dev/null +++ b/repair_discount/i18n/hr.po @@ -0,0 +1,64 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +# Translators: +# Bole , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-12 03:48+0000\n" +"PO-Revision-Date: 2018-02-12 03:48+0000\n" +"Last-Translator: Bole , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +#, fuzzy +msgid "Repair Fees" +msgstr "Nalog za popravak" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +msgid "Repair Line (parts)" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Nalog za popravak" diff --git a/repair_discount/i18n/hr_HR.po b/repair_discount/i18n/hr_HR.po new file mode 100644 index 0000000..21b0564 --- /dev/null +++ b/repair_discount/i18n/hr_HR.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2017-11-28 03:44+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_HR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +#, fuzzy +msgid "Repair Fees" +msgstr "Nalog za popravak" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +msgid "Repair Line (parts)" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Nalog za popravak" diff --git a/repair_discount/i18n/it.po b/repair_discount/i18n/it.po new file mode 100644 index 0000000..bebafc3 --- /dev/null +++ b/repair_discount/i18n/it.po @@ -0,0 +1,66 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2023-10-28 15:58+0000\n" +"Last-Translator: mymage \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\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: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "Sconto (%)" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "ID" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +msgid "Repair Fees" +msgstr "Tariffa riparazione" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +msgid "Repair Line (parts)" +msgstr "Riga riparazione (componenti)" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Ordine di riparazione" + +#~ msgid "Subtotal" +#~ msgstr "Subtotale" diff --git a/repair_discount/i18n/lt.po b/repair_discount/i18n/lt.po new file mode 100644 index 0000000..de3a5bd --- /dev/null +++ b/repair_discount/i18n/lt.po @@ -0,0 +1,64 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +# Translators: +# Viktoras Norkus , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-16 08:02+0000\n" +"PO-Revision-Date: 2018-01-16 08:02+0000\n" +"Last-Translator: Viktoras Norkus , 2018\n" +"Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" +"%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "Nuolaida (%)" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +#, fuzzy +msgid "Repair Fees" +msgstr "Remonto užsakymas" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +msgid "Repair Line (parts)" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Remonto užsakymas" diff --git a/repair_discount/i18n/mrp_repair_discount.pot b/repair_discount/i18n/mrp_repair_discount.pot new file mode 100644 index 0000000..30e1298 --- /dev/null +++ b/repair_discount/i18n/mrp_repair_discount.pot @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.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: mrp_repair_discount +#: model:ir.model.fields,field_description:mrp_repair_discount.field_mrp_repair_fee_discount +#: model:ir.model.fields,field_description:mrp_repair_discount.field_mrp_repair_line_discount +msgid "Discount (%)" +msgstr "" + +#. module: mrp_repair_discount +#: model:ir.model,name:mrp_repair_discount.model_mrp_repair_fee +msgid "Repair Fees Line" +msgstr "" + +#. module: mrp_repair_discount +#: model:ir.model,name:mrp_repair_discount.model_mrp_repair_line +msgid "Repair Line" +msgstr "" + +#. module: mrp_repair_discount +#: model:ir.model,name:mrp_repair_discount.model_mrp_repair +msgid "Repair Order" +msgstr "" + diff --git a/repair_discount/i18n/nl_NL.po b/repair_discount/i18n/nl_NL.po new file mode 100644 index 0000000..b9cd64f --- /dev/null +++ b/repair_discount/i18n/nl_NL.po @@ -0,0 +1,64 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mrp_repair_discount +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 03:44+0000\n" +"PO-Revision-Date: 2017-11-28 03:44+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\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" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +#, fuzzy +msgid "Repair Fees" +msgstr "Reparatieorder" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +msgid "Repair Line (parts)" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Reparatieorder" diff --git a/repair_discount/i18n/pt_BR.po b/repair_discount/i18n/pt_BR.po new file mode 100644 index 0000000..df5c1ad --- /dev/null +++ b/repair_discount/i18n/pt_BR.po @@ -0,0 +1,63 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * repair_discount +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-06-22 18:19+0000\n" +"Last-Translator: Fernando Colus \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 3.10\n" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "Desconto (%)" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +msgid "Repair Fees" +msgstr "Taxas de Reparo" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +msgid "Repair Line (parts)" +msgstr "Linha de Reparo (partes)" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "Ordem de Reparo" + +#~ msgid "Subtotal" +#~ msgstr "Sub-total" diff --git a/repair_discount/i18n/repair_discount.pot b/repair_discount/i18n/repair_discount.pot new file mode 100644 index 0000000..d6207c2 --- /dev/null +++ b/repair_discount/i18n/repair_discount.pot @@ -0,0 +1,57 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * repair_discount +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.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: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__discount +#: model_terms:ir.ui.view,arch_db:repair_discount.repair_discount_report_repairorder +msgid "Discount (%)" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__display_name +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__display_name +msgid "Display Name" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_line__id +#: model:ir.model.fields,field_description:repair_discount.field_repair_order__id +msgid "ID" +msgstr "" + +#. module: repair_discount +#: model:ir.model.fields,field_description:repair_discount.field_repair_fee____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_line____last_update +#: model:ir.model.fields,field_description:repair_discount.field_repair_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_fee +msgid "Repair Fees" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_line +msgid "Repair Line (parts)" +msgstr "" + +#. module: repair_discount +#: model:ir.model,name:repair_discount.model_repair_order +msgid "Repair Order" +msgstr "" diff --git a/repair_discount/models/__init__.py b/repair_discount/models/__init__.py new file mode 100644 index 0000000..a36a788 --- /dev/null +++ b/repair_discount/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2015 Nicola Malcontenti - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import mrp_repair diff --git a/repair_discount/models/mrp_repair.py b/repair_discount/models/mrp_repair.py new file mode 100644 index 0000000..960f6d1 --- /dev/null +++ b/repair_discount/models/mrp_repair.py @@ -0,0 +1,155 @@ +# Copyright 2015 Nicola Malcontenti - Agile Business Group +# Copyright 2016 Pedro M. Baeza +# Copyright 2022 Manuel Regidor +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models + + +class RepairFee(models.Model): + _inherit = "repair.fee" + + discount = fields.Float(string="Discount (%)") + + @api.depends("price_unit", "repair_id", "product_uom_qty", "product_id", "discount") + def _compute_price_subtotal(self): + for fee in self: + taxes = self.env["account.tax"].compute_all( + fee.price_unit, + fee.repair_id.pricelist_id.currency_id, + fee.product_uom_qty, + fee.product_id, + fee.repair_id.partner_id, + ) + fee.price_subtotal = taxes["total_excluded"] * ( + 1 - (fee.discount or 0.0) / 100.0 + ) + + @api.depends( + "price_unit", "repair_id", "product_uom_qty", "product_id", "tax_id", "discount" + ) + def _compute_price_total(self): + for fee in self: + taxes = fee.tax_id.compute_all( + fee.price_unit, + fee.repair_id.pricelist_id.currency_id, + fee.product_uom_qty, + fee.product_id, + fee.repair_id.partner_id, + ) + fee.price_total = taxes["total_included"] * ( + 1 - (fee.discount or 0.0) / 100.0 + ) + + +class RepairLine(models.Model): + _inherit = "repair.line" + + discount = fields.Float(string="Discount (%)") + + @api.depends( + "price_unit", + "repair_id", + "product_uom_qty", + "product_id", + "repair_id.invoice_method", + "discount", + ) + def _compute_price_subtotal(self): + for line in self: + taxes = self.env["account.tax"].compute_all( + line.price_unit, + line.repair_id.pricelist_id.currency_id, + line.product_uom_qty, + line.product_id, + line.repair_id.partner_id, + ) + line.price_subtotal = taxes["total_excluded"] * ( + 1 - (line.discount or 0.0) / 100.0 + ) + + @api.depends( + "price_unit", + "repair_id", + "product_uom_qty", + "product_id", + "tax_id", + "repair_id.invoice_method", + "discount", + ) + def _compute_price_total(self): + for line in self: + taxes = line.tax_id.compute_all( + line.price_unit, + line.repair_id.pricelist_id.currency_id, + line.product_uom_qty, + line.product_id, + line.repair_id.partner_id, + ) + line.price_total = taxes["total_included"] * ( + 1 - (line.discount or 0.0) / 100.0 + ) + + +class RepairOrder(models.Model): + _inherit = "repair.order" + + def _create_invoices(self, group=False): + res = super()._create_invoices(group) + for repair in self.filtered(lambda _repair: _repair.invoice_method != "none"): + operations = repair.operations + fees_lines = repair.fees_lines + for op in operations.filtered( + lambda item: item.discount and item.invoice_line_id + ): + op.invoice_line_id.with_context(check_move_validity=False).update( + {"discount": op.discount} + ) + for fee_lines in fees_lines.filtered( + lambda item: item.discount and item.invoice_line_id + ): + fee_lines.invoice_line_id.with_context( + check_move_validity=False + ).update({"discount": fee_lines.discount}) + self.invoice_id.with_context( + check_move_validity=False + )._recompute_dynamic_lines( + recompute_all_taxes=True, recompute_tax_base_amount=True + ) + return res + + def _calculate_line_base_price(self, line): + return line.price_unit * (1 - (line.discount or 0.0) / 100.0) + + @api.depends( + "operations", "fees_lines", "operations.invoiced", "fees_lines.invoiced" + ) + def _amount_tax(self): + for repair in self: + taxed_amount = 0.0 + currency = repair.pricelist_id.currency_id + + for line in repair.operations: + tax_calculate = line.tax_id.compute_all( + self._calculate_line_base_price(line), + self.pricelist_id.currency_id, + line.product_uom_qty, + line.product_id, + repair.partner_id, + ) + + for c in tax_calculate["taxes"]: + taxed_amount += c["amount"] + + for line in repair.fees_lines: + tax_calculate = line.tax_id.compute_all( + self._calculate_line_base_price(line), + self.pricelist_id.currency_id, + line.product_uom_qty, + line.product_id, + repair.partner_id, + ) + for c in tax_calculate["taxes"]: + taxed_amount += c["amount"] + + repair.amount_tax = currency.round(taxed_amount) diff --git a/repair_discount/readme/CONTRIBUTORS.rst b/repair_discount/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..4cb6f3b --- /dev/null +++ b/repair_discount/readme/CONTRIBUTORS.rst @@ -0,0 +1,6 @@ +* Nicola Malcontenti +* Pedro M. Baeza +* Lorenzo Battistini +* Ignacio Ales López +* María Asunción Daza +* Manuel Regidor diff --git a/repair_discount/readme/DESCRIPTION.rst b/repair_discount/readme/DESCRIPTION.rst new file mode 100644 index 0000000..f30da6f --- /dev/null +++ b/repair_discount/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the functionality of mrp repair adding +new field discount on operations lines diff --git a/repair_discount/report/repair_templates_repair_order.xml b/repair_discount/report/repair_templates_repair_order.xml new file mode 100644 index 0000000..0e42601 --- /dev/null +++ b/repair_discount/report/repair_templates_repair_order.xml @@ -0,0 +1,39 @@ + + + + diff --git a/repair_discount/static/description/icon.png b/repair_discount/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/repair_discount/static/description/icon.png differ diff --git a/repair_discount/static/description/index.html b/repair_discount/static/description/index.html new file mode 100644 index 0000000..79ad930 --- /dev/null +++ b/repair_discount/static/description/index.html @@ -0,0 +1,428 @@ + + + + + + +Repair Discount + + + +
+

Repair Discount

+ + +

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

+

This module extends the functionality of mrp repair adding +new field discount on operations lines

+

Table of contents

+ +
+

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

+
    +
  • Agile Business Group
  • +
  • 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.

+

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

+

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

+
+
+
+ + diff --git a/repair_discount/tests/__init__.py b/repair_discount/tests/__init__.py new file mode 100644 index 0000000..ebd10d3 --- /dev/null +++ b/repair_discount/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_mrp_repair_discount diff --git a/repair_discount/tests/test_mrp_repair_discount.py b/repair_discount/tests/test_mrp_repair_discount.py new file mode 100644 index 0000000..3f2cbdf --- /dev/null +++ b/repair_discount/tests/test_mrp_repair_discount.py @@ -0,0 +1,81 @@ +# Copyright 2016 Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests import common + + +class TestMrpRepairDiscount(common.SavepointCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.product = cls.env["product.product"].create( + { + "name": "Test product", + "standard_price": 10, + "list_price": 20, + } + ) + cls.product_service = cls.env["product.product"].create( + { + "name": "Test product service", + "standard_price": 10, + "list_price": 20, + } + ) + cls.partner = cls.env.ref("base.res_partner_address_1") + cls.location = cls.env["stock.location"].create( + { + "name": "Test location", + } + ) + cls.repair = cls.env["repair.order"].create( + { + "product_id": cls.product.id, + "partner_id": cls.partner.id, + "partner_invoice_id": cls.partner.id, + "product_uom": cls.product.uom_id.id, + "location_id": cls.location.id, + "invoice_method": "b4repair", + } + ) + domain_location = [("usage", "=", "production")] + stock_location_id = cls.env["stock.location"].search(domain_location, limit=1) + cls.repair_line = cls.env["repair.line"].create( + { + "repair_id": cls.repair.id, + "type": "add", + "product_id": cls.product.id, + "product_uom": cls.product.uom_id.id, + "name": "Test line", + "location_id": cls.repair.location_id.id, + "location_dest_id": stock_location_id.id, + "product_uom_qty": 1, + "price_unit": 20, + "discount": 50, + } + ) + + cls.repair_fee = cls.env["repair.fee"].create( + { + "repair_id": cls.repair.id, + "name": "Test Service", + "product_id": cls.product_service.id, + "product_uom_qty": 1, + "product_uom": cls.product_service.uom_id.id, + "price_unit": 20, + "discount": 50, + } + ) + + def test_discount(self): + self.assertAlmostEqual(self.repair_line.price_subtotal, 10) + self.assertAlmostEqual(self.repair_fee.price_subtotal, 10) + self.assertAlmostEqual(self.repair.amount_total, 20) + + def test_invoice_create(self): + self.repair.state = "2binvoiced" + res = self.repair._create_invoices() + invoice = self.env["account.move"].browse(res.values())[0] + invoice_line = invoice.invoice_line_ids[0] + self.assertEqual(invoice_line.discount, 50) + self.assertAlmostEqual(invoice_line.price_subtotal, 10) diff --git a/repair_discount/views/mrp_repair_view.xml b/repair_discount/views/mrp_repair_view.xml new file mode 100644 index 0000000..e78f278 --- /dev/null +++ b/repair_discount/views/mrp_repair_view.xml @@ -0,0 +1,22 @@ + + + + repair.discount.form + repair.order + + + + + + + + + + + diff --git a/setup/repair_discount/odoo/addons/repair_discount b/setup/repair_discount/odoo/addons/repair_discount new file mode 120000 index 0000000..8f94b41 --- /dev/null +++ b/setup/repair_discount/odoo/addons/repair_discount @@ -0,0 +1 @@ +../../../../repair_discount \ No newline at end of file diff --git a/setup/repair_discount/setup.py b/setup/repair_discount/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/repair_discount/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)