From 35365e6ba25cef3e5a89c0593e83364aef4c5a45 Mon Sep 17 00:00:00 2001 From: mav-adhoc Date: Fri, 25 Aug 2023 13:11:48 +0000 Subject: [PATCH] [ADD]repair_multicompany_ux:check_company closes ingadhoc/multi-company#128 Signed-off-by: Bruno Zanotti --- repair_multicompany_ux/README.rst | 62 +++++++++++++++++++++++ repair_multicompany_ux/__init__.py | 1 + repair_multicompany_ux/__manifest__.py | 33 ++++++++++++ repair_multicompany_ux/models/__init__.py | 1 + repair_multicompany_ux/models/repair.py | 24 +++++++++ 5 files changed, 121 insertions(+) create mode 100644 repair_multicompany_ux/README.rst create mode 100644 repair_multicompany_ux/__init__.py create mode 100644 repair_multicompany_ux/__manifest__.py create mode 100644 repair_multicompany_ux/models/__init__.py create mode 100644 repair_multicompany_ux/models/repair.py diff --git a/repair_multicompany_ux/README.rst b/repair_multicompany_ux/README.rst new file mode 100644 index 00000000..2361e43d --- /dev/null +++ b/repair_multicompany_ux/README.rst @@ -0,0 +1,62 @@ +.. |company| replace:: ADHOC SA + +.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png + :alt: ADHOC SA + :target: https://www.adhoc.com.ar + +.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png + +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +============================== +Repair Multicompany Usability +============================== + +Installation +============ + +To install this module, you need to: + +#. Only install the module + +============= + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: http://runbot.adhoc.com.ar/ + +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 smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +.. |iconEficent| image:: https://avatars0.githubusercontent.com/u/7718403?s=200&v=4 + :width: 13px + :height: 13px + :alt: Eficent + +* |company| |icon| +* Eficent |iconEficent| Part of the code used for this module was extracted from Eficent's `multicompany-fixes/mcfix_accpount `_ module + +Contributors +------------ + +Maintainer +---------- + +|company_logo| + +This module is maintained by the |company|. + +To contribute to this module, please visit https://www.adhoc.com.ar. diff --git a/repair_multicompany_ux/__init__.py b/repair_multicompany_ux/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/repair_multicompany_ux/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/repair_multicompany_ux/__manifest__.py b/repair_multicompany_ux/__manifest__.py new file mode 100644 index 00000000..434b35a7 --- /dev/null +++ b/repair_multicompany_ux/__manifest__.py @@ -0,0 +1,33 @@ +############################################################################## +# +# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) +# All Rights Reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{ + 'name': 'Repair Multicompany Usability', + 'version': "16.0.1.0.0", + 'author': 'ADHOC SA', + 'website': 'www.adhoc.com.ar', + 'license': 'AGPL-3', + 'depends': [ + 'repair' + ], + 'data': [], + 'demo': [], + 'installable': True, + 'auto_install': False, +} diff --git a/repair_multicompany_ux/models/__init__.py b/repair_multicompany_ux/models/__init__.py new file mode 100644 index 00000000..3985e558 --- /dev/null +++ b/repair_multicompany_ux/models/__init__.py @@ -0,0 +1 @@ +from . import repair diff --git a/repair_multicompany_ux/models/repair.py b/repair_multicompany_ux/models/repair.py new file mode 100644 index 00000000..911e5e6a --- /dev/null +++ b/repair_multicompany_ux/models/repair.py @@ -0,0 +1,24 @@ +from odoo import models, fields + +class RepairFee(models.Model): + _inherit = 'repair.fee' + + tax_id = fields.Many2many( + 'account.tax', + 'repair_fee_line_tax', + 'repair_fee_line_id', 'tax_id', + 'Taxes', + check_company=False) + + invoice_line_id = fields.Many2one( + 'account.move.line', + 'Invoice Line', + check_company=False) + +class RepairLine(models.Model): + _inherit = 'repair.line' + + invoice_line_id = fields.Many2one( + 'account.move.line', + 'Invoice Line', + check_company=False)