Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] repair_execute_invoice_onchange_partner: Migration to 16.0 #91

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions repair_execute_invoice_onchange_partner/README.rst
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 <[email protected]>
* Alfredo de la Fuente <[email protected]>

Do not contact contributors directly about support or help with technical issues.
1 change: 1 addition & 0 deletions repair_execute_invoice_onchange_partner/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions repair_execute_invoice_onchange_partner/__manifest__.py
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,
}
27 changes: 27 additions & 0 deletions repair_execute_invoice_onchange_partner/i18n/ca_ES.po
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ó"

27 changes: 27 additions & 0 deletions repair_execute_invoice_onchange_partner/i18n/en_US.po
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 ""

27 changes: 27 additions & 0 deletions repair_execute_invoice_onchange_partner/i18n/es.po
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"

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 ""

2 changes: 2 additions & 0 deletions repair_execute_invoice_onchange_partner/models/__init__.py
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 repair_execute_invoice_onchange_partner/models/account_move.py
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 repair_execute_invoice_onchange_partner/models/repair_order.py
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)
6 changes: 6 additions & 0 deletions setup/repair_execute_invoice_onchange_partner/setup.py
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,
)
Loading