-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[16.0][ADD] repair_order_invoice_address: In repair orders new field …
…"Invoice Address".
- Loading branch information
1 parent
e076c37
commit 11dbce5
Showing
13 changed files
with
237 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,27 @@ | ||
.. 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 order invoice address | ||
============================ | ||
|
||
* In repair orders new field "Invoice Address". | ||
|
||
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. |
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,19 @@ | ||
# Copyright 2024 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
{ | ||
"name": "Repair Order Invoice Address", | ||
"version": "16.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "AvanzOSC", | ||
"website": "https://github.com/avanzosc/mrp-repair-addons", | ||
"contributors": [ | ||
"Ana Juaristi <[email protected]>", | ||
"Alfredo de la Fuente <[email protected]>", | ||
], | ||
"category": "Inventory/Inventory", | ||
"depends": ["repair"], | ||
"data": [ | ||
"views/mrp_repair_view.xml", | ||
], | ||
"installable": 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,26 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_order_invoice_address | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-09-25 08:32+0000\n" | ||
"PO-Revision-Date: 2024-09-25 08:32+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_order_invoice_address | ||
#: model:ir.model.fields,field_description:repair_order_invoice_address.field_repair_order__partner_invoice_id | ||
msgid "Invoice Address" | ||
msgstr "" | ||
|
||
#. module: repair_order_invoice_address | ||
#: model:ir.model,name:repair_order_invoice_address.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,26 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_order_invoice_address | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-09-25 08:32+0000\n" | ||
"PO-Revision-Date: 2024-09-25 08:32+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_order_invoice_address | ||
#: model:ir.model.fields,field_description:repair_order_invoice_address.field_repair_order__partner_invoice_id | ||
msgid "Invoice Address" | ||
msgstr "" | ||
|
||
#. module: repair_order_invoice_address | ||
#: model:ir.model,name:repair_order_invoice_address.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,26 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_order_invoice_address | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-09-25 08:33+0000\n" | ||
"PO-Revision-Date: 2024-09-25 08:33+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_order_invoice_address | ||
#: model:ir.model.fields,field_description:repair_order_invoice_address.field_repair_order__partner_invoice_id | ||
msgid "Invoice Address" | ||
msgstr "Dirección factura" | ||
|
||
#. module: repair_order_invoice_address | ||
#: model:ir.model,name:repair_order_invoice_address.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "Orden reparación" |
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,26 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_order_invoice_address | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-09-25 08:33+0000\n" | ||
"PO-Revision-Date: 2024-09-25 08:33+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_order_invoice_address | ||
#: model:ir.model.fields,field_description:repair_order_invoice_address.field_repair_order__partner_invoice_id | ||
msgid "Invoice Address" | ||
msgstr "" | ||
|
||
#. module: repair_order_invoice_address | ||
#: model:ir.model,name:repair_order_invoice_address.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "Ordre de réparation" |
26 changes: 26 additions & 0 deletions
26
repair_order_invoice_address/i18n/repair_order_invoice_address.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,26 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_order_invoice_address | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-09-25 08:32+0000\n" | ||
"PO-Revision-Date: 2024-09-25 08:32+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_order_invoice_address | ||
#: model:ir.model.fields,field_description:repair_order_invoice_address.field_repair_order__partner_invoice_id | ||
msgid "Invoice Address" | ||
msgstr "" | ||
|
||
#. module: repair_order_invoice_address | ||
#: model:ir.model,name:repair_order_invoice_address.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 @@ | ||
from . import repair_order |
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 @@ | ||
# Copyright 2024 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from odoo import api, fields, models | ||
|
||
|
||
class RepairOrder(models.Model): | ||
_inherit = "repair.order" | ||
|
||
partner_invoice_id = fields.Many2one( | ||
comodel_name="res.partner", | ||
string="Invoice Address", | ||
compute="_compute_partner_invoice_id", | ||
store=True, | ||
readonly=False, | ||
required=False, | ||
precompute=True, | ||
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", | ||
) | ||
|
||
@api.depends("partner_id") | ||
def _compute_partner_invoice_id(self): | ||
for repair in self: | ||
repair.partner_invoice_id = ( | ||
repair.partner_id.address_get(["invoice"])["invoice"] | ||
if repair.partner_id | ||
else False | ||
) |
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,25 @@ | ||
<?xml version="1.0" ?> | ||
<odoo> | ||
<record id="view_repair_order_form" model="ir.ui.view"> | ||
<field name="model">repair.order</field> | ||
<field name="inherit_id" ref="repair.view_repair_order_form" /> | ||
<field name="arch" type="xml"> | ||
<field name="address_id" position="after"> | ||
<field | ||
name="partner_invoice_id" | ||
groups="account.group_delivery_invoice_address" | ||
/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="view_repair_order_tree" model="ir.ui.view"> | ||
<field name="model">repair.order</field> | ||
<field name="inherit_id" ref="repair.view_repair_order_tree" /> | ||
<field name="arch" type="xml"> | ||
<field name="address_id" position="after"> | ||
<field name="partner_invoice_id" optional="show" /> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |
1 change: 1 addition & 0 deletions
1
setup/repair_order_invoice_address/odoo/addons/repair_order_invoice_address
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_order_invoice_address |
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, | ||
) |