forked from avanzosc/mrp-repair-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[16.0][MIG] repair_execute_invoice_onchange_partner: Migration to 16.0 (
avanzosc#91) * [ADD] repair_execute_invoice_onchange_partner: When creating an invoice from a repair order, execute the "onchange" partner of the invoice. (avanzosc#77) * [MIG] repair_execute_invoice_onchange_partner: Migration to 16.0 * [ADD] Change invoice to move --------- Co-authored-by: alfredoavanzosc <alfredodelafuente@avanzosc.es>
- Loading branch information
1 parent
c16cf6b
commit c5a4d97
Showing
12 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
======================================= | ||
Repair execute invoice onchange partner | ||
======================================= | ||
|
||
* When creating an invoice from a repair order, execute the "onchange" partner | ||
of the invoice. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/mrp-repair-addons/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
* Ana Juaristi <anajuaristi@avanzosc.es> | ||
* Alfredo de la Fuente <alfredodelafuente@avanzosc.es> | ||
|
||
Do not contact contributors directly about support or help with technical issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2023 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Repair Execute Move Onchange Partner", | ||
"version": "16.0.1.0.0", | ||
"category": "Manufacturing", | ||
"author": "AvanzOSC", | ||
"website": "https://github.com/avanzosc/mrp-repair-addons", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"repair", | ||
], | ||
"data": [], | ||
"installable": True, | ||
"auto_install": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_execute_invoice_onchange_partner | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-11-24 08:48+0000\n" | ||
"PO-Revision-Date: 2023-11-24 08:48+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: repair_execute_invoice_onchange_partner | ||
#: model:ir.model,name:repair_execute_invoice_onchange_partner.model_account_invoice | ||
msgid "Invoice" | ||
msgstr "Factura" | ||
|
||
#. module: repair_execute_invoice_onchange_partner | ||
#: model:ir.model,name:repair_execute_invoice_onchange_partner.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "Ordre de reparació" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_execute_invoice_onchange_partner | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-11-24 08:49+0000\n" | ||
"PO-Revision-Date: 2023-11-24 08:49+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: repair_execute_invoice_onchange_partner | ||
#: model:ir.model,name:repair_execute_invoice_onchange_partner.model_account_invoice | ||
msgid "Invoice" | ||
msgstr "" | ||
|
||
#. module: repair_execute_invoice_onchange_partner | ||
#: model:ir.model,name:repair_execute_invoice_onchange_partner.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_execute_invoice_onchange_partner | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-11-24 08:49+0000\n" | ||
"PO-Revision-Date: 2023-11-24 08:49+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: repair_execute_invoice_onchange_partner | ||
#: model:ir.model,name:repair_execute_invoice_onchange_partner.model_account_invoice | ||
msgid "Invoice" | ||
msgstr "Factura" | ||
|
||
#. module: repair_execute_invoice_onchange_partner | ||
#: model:ir.model,name:repair_execute_invoice_onchange_partner.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "Orden de reparación" | ||
|
27 changes: 27 additions & 0 deletions
27
repair_execute_invoice_onchange_partner/i18n/repair_execute_invoice_onchange_partner.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_execute_invoice_onchange_partner | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-11-24 08:48+0000\n" | ||
"PO-Revision-Date: 2023-11-24 08:48+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: repair_execute_invoice_onchange_partner | ||
#: model:ir.model,name:repair_execute_invoice_onchange_partner.model_account_invoice | ||
msgid "Invoice" | ||
msgstr "" | ||
|
||
#. module: repair_execute_invoice_onchange_partner | ||
#: model:ir.model,name:repair_execute_invoice_onchange_partner.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import repair_order | ||
from . import account_invoice |
14 changes: 14 additions & 0 deletions
14
repair_execute_invoice_onchange_partner/models/account_move.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2023 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from odoo import api, models | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
@api.model | ||
def create(self, vals): | ||
move = super().create(vals) | ||
if "create_move_from_repair" in self.env.context: | ||
move._onchange_partner_id() | ||
return move |
12 changes: 12 additions & 0 deletions
12
repair_execute_invoice_onchange_partner/models/repair_order.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2023 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from odoo import models | ||
|
||
|
||
class RepairOrder(models.Model): | ||
_inherit = "repair.order" | ||
|
||
def action_move_create(self, group=False): | ||
return super( | ||
RepairOrder, self.with_context(create_move_from_repair=True) | ||
).action_move_create(group=group) |
1 change: 1 addition & 0 deletions
1
...pair_execute_invoice_onchange_partner/odoo/addons/repair_execute_invoice_onchange_partner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../repair_execute_invoice_onchange_partner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |