diff --git a/account_invoice_inter_company/README.rst b/account_invoice_inter_company/README.rst new file mode 100644 index 00000000000..ad6ea1fee39 --- /dev/null +++ b/account_invoice_inter_company/README.rst @@ -0,0 +1,129 @@ +====================== +Inter Company Invoices +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:397b0153f0663c7d3aa8875fdacb7a3c5661661ef03bb19394eb868d034304d3 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fmulti--company-lightgray.png?logo=github + :target: https://github.com/OCA/multi-company/tree/18.0/account_invoice_inter_company + :alt: OCA/multi-company +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/multi-company-18-0/multi-company-18-0-account_invoice_inter_company + :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/multi-company&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module is usefull if there are multiple companies in the same Odoo +database and those companies sell goods or services among themselves. It +allow to create an invoice in company A from an invoice in company B. + +Imagine you have company A and company B in the same Odoo database. +First scenario: company B create an invoice with company A as customer. +The module will automate the generation of the supplier invoice in +company A. Second scenario: company A create an invoice with company B +as supplier. The module will automate the generation of the customer +invoice in company B. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure this module, you need to go to the menu *Settings > General +Settings*, go to the tab *Companies / Inter Company OCA features* + +You now have access to other options *Intercompany user for invoices* +and *Invoice Auto Validation*. + +To customize products sharing don't hesitate to override +\_compute_share_product() in res.company model. + +Known issues / Roadmap +====================== + + - This module cannot be fully used in combination with + remove_odoo_entreprise module. If you need both, uninstall + remove_odoo_entreprise, complete settings with + account_invoice_inter_company and then re-install + remove_odoo_entreprise. + - Product mapping: would be nice to have a matrix with the products + on the left side and on the top row the companies. + +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 +------- + +* Odoo SA +* Akretion + +Contributors +------------ + +- Odoo S.A. (original module inter_company_rules) +- Andrea Stirpe +- Adria Gil Sorribes +- Christopher Ormaza +- Hector Villarreal +- \`Akretion \`: + + - Chafique Delli + - Alexis de Lattre + - David Beal + +- \`Tecnativa \`: + + - Jairo Llopis + - David Vidal + - Pedro M. Baeza + +- Isaac Gallart +- \`Komit \`: + + - Cuong Nguyen Mtm + +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/multi-company `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_invoice_inter_company/__init__.py b/account_invoice_inter_company/__init__.py new file mode 100644 index 00000000000..1b7494ac0d9 --- /dev/null +++ b/account_invoice_inter_company/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2013-2014 Odoo SA +# Copyright 2015-2017 Chafique Delli +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/account_invoice_inter_company/__manifest__.py b/account_invoice_inter_company/__manifest__.py new file mode 100644 index 00000000000..117a71a1185 --- /dev/null +++ b/account_invoice_inter_company/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2013-2014 Odoo SA +# Copyright 2015-2017 Chafique Delli +# Copyright 2020 Tecnativa - David Vidal +# Copyright 2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Inter Company Invoices", + "summary": "Intercompany invoice rules", + "version": "18.0.1.0.0", + "category": "Accounting & Finance", + "website": "https://github.com/OCA/multi-company", + "author": "Odoo SA, Akretion, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": ["account", "base_setup"], + "data": [ + "views/account_move_views.xml", + "views/res_config_settings_view.xml", + ], + "demo": [ + "demo/inter_company_demo.xml", + ], + "installable": True, +} diff --git a/account_invoice_inter_company/demo/inter_company_demo.xml b/account_invoice_inter_company/demo/inter_company_demo.xml new file mode 100644 index 00000000000..4f36138dd67 --- /dev/null +++ b/account_invoice_inter_company/demo/inter_company_demo.xml @@ -0,0 +1,13 @@ + + + + + Service Multi Company + + + + service + + diff --git a/account_invoice_inter_company/i18n/account_invoice_inter_company.pot b/account_invoice_inter_company/i18n/account_invoice_inter_company.pot new file mode 100644 index 00000000000..d9c16248c2e --- /dev/null +++ b/account_invoice_inter_company/i18n/account_invoice_inter_company.pot @@ -0,0 +1,193 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.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: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Canceled Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_generated +msgid "Auto Generated Document" +msgstr "" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "" +"Automatically generate counterpart documents for orders/invoices between " +"companies" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "Inter Company Invoice User" +msgstr "" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Inter Company OCA features" +msgstr "" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoice" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "Invoice Auto Validation" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "Invoices Auto Validation" +msgstr "" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoices User" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"Please define %(dest_journal_type)s journal for this company: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules." +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules. " +"If not set the user initiating thetransaction will be used" +msgstr "" + +#. module: account_invoice_inter_company +#: model:product.template,name:account_invoice_inter_company.product_consultant_multi_company_product_template +msgid "Service Multi Company" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_invoice_id +msgid "Source Invoice" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move_line__auto_invoice_line_id +msgid "Source Invoice Line" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"The invoice line '%(line_name)s' doesn't have a product. All invoice lines " +"should have a product for inter-company invoices." +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"This is an autogenerated multi company invoice and you're trying to modify " +"the amount, which will differ from the source one (%s)" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"WARNING!!!!! Failure in the inter-company invoice creation process: the " +"total amount of this invoice is %(dest_amount_total)s but the total amount " +"of the invoice %(invoice_name)s in the company %(company_name)s is " +"%(amount_total)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will" +" automatically validate it" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will" +" automatically validate it." +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You can't modify this invoice as it has an inter company invoice that's in posted state.\n" +"Invoice %(invoice_name)s to %(partner_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You cannot create invoice in company '%(dest_company_name)s' with product " +"'%(product_name)s' because it is not multicompany" +msgstr "" diff --git a/account_invoice_inter_company/i18n/de.po b/account_invoice_inter_company/i18n/de.po new file mode 100644 index 00000000000..f43291ebca7 --- /dev/null +++ b/account_invoice_inter_company/i18n/de.po @@ -0,0 +1,293 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_inter_company +# +# Translators: +# Lars Nolte , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-19 03:39+0000\n" +"PO-Revision-Date: 2018-01-19 03:39+0000\n" +"Last-Translator: Lars Nolte , 2018\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\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" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Canceled Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_generated +msgid "Auto Generated Document" +msgstr "Automatisch erstelltes Dokument" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "" +"Automatically generate counterpart documents for orders/invoices between " +"companies" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_company +msgid "Companies" +msgstr "Unternehmen" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +#, fuzzy +msgid "Inter Company Invoice User" +msgstr "Rechnungsstellung zwischen Unternehmen" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +#, fuzzy +msgid "Inter Company OCA features" +msgstr "Rechnungsstellung zwischen Unternehmen" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoice" +msgstr "Rechnung" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "Invoice Auto Validation" +msgstr "Automatische Rechnungsprüfung" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "Invoices Auto Validation" +msgstr "automatische Rechnungsprüfung" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoices User" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"Please define %(dest_journal_type)s journal for this company: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules." +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules. " +"If not set the user initiating thetransaction will be used" +msgstr "" + +#. module: account_invoice_inter_company +#: model:product.template,name:account_invoice_inter_company.product_consultant_multi_company_product_template +msgid "Service Multi Company" +msgstr "Service mehrere Unternehmen" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_invoice_id +msgid "Source Invoice" +msgstr "Quellrechnung" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move_line__auto_invoice_line_id +msgid "Source Invoice Line" +msgstr "Quellrechnungszeile" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"The invoice line '%(line_name)s' doesn't have a product. All invoice lines " +"should have a product for inter-company invoices." +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"This is an autogenerated multi company invoice and you're trying to modify " +"the amount, which will differ from the source one (%s)" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"WARNING!!!!! Failure in the inter-company invoice creation process: the " +"total amount of this invoice is %(dest_amount_total)s but the total amount " +"of the invoice %(invoice_name)s in the company %(company_name)s is " +"%(amount_total)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it" +msgstr "" +"Wenn eine Rechnung nach einer Regel für mehrere Unternehmen für diese Firma " +"erstellt wird, wird sie automatisch validiert" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it." +msgstr "" +"Wenn eine Rechnung nach einer Regel für mehrere Unternehmen für diese Firma " +"erstellt wird, wird sie automatisch validiert." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You can't modify this invoice as it has an inter company invoice that's in " +"posted state.\n" +"Invoice %(invoice_name)s to %(partner_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You cannot create invoice in company '%(dest_company_name)s' with product " +"'%(product_name)s' because it is not multicompany" +msgstr "" + +#, fuzzy +#~ msgid "Intercompany user for invoices" +#~ msgstr "Rechnungsstellung zwischen Unternehmen" + +#, fuzzy +#~ msgid "Invoicing" +#~ msgstr "Rechnungszeile" + +#, python-format +#~ msgid "No Chart of Account Template has been defined !" +#~ msgstr "Es wurde keine Kontenplanvorlage definiert!" + +#, python-format +#~ msgid "%s - Canceled Invoice: %s" +#~ msgstr "%s Stornierte Rechnung: %s" + +#, python-format +#~ msgid "%s - Invoice: %s" +#~ msgstr "%s - Rechnung: %s" + +#, python-format +#~ msgid "Please define %s journal for this company: \"%s\" (id:%d)." +#~ msgstr "" +#~ "Bitte definieren Sie für diese Firma das Journal %s: \"%s\" (id: %d)." + +#, python-format +#~ msgid "" +#~ "The invoice line '%s' doesn't have a product. All invoice lines should " +#~ "have a product for inter-company invoices." +#~ msgstr "" +#~ "Die Rechnungszeile '%s' hat kein Produkt. Alle Rechnungszeilen sollten " +#~ "ein Produkt für zwischenbetriebliche Rechnungen haben." + +#, python-format +#~ msgid "" +#~ "WARNING!!!!! Failure in the inter-company invoice creation process: the " +#~ "total amount of this invoice is %s but the total amount of the invoice %s " +#~ "in the company %s is %s" +#~ msgstr "" +#~ "WARNUNG!!!!!\n" +#~ " Fehler beim Erstellen der Rechnung zwischen Unternehmen: Der " +#~ "Gesamtbetrag dieser Rechnung ist %s, aber der Gesamtbetrag der Rechnung " +#~ "%s in der Firma %s ist %s" + +#~ msgid "Please define %s account for this company: \"%s\" (id:%d)." +#~ msgstr "Bitte definieren Sie %s Account für diese Firma: \"%s\" (id: %d)." + +#~ msgid "Automate inter-company invoicing" +#~ msgstr "Automatisierung der zwischenbetrieblichen Rechnungsstellung" + +#~ msgid "" +#~ "Configure company rules to automatically create invoices when one of your " +#~ "company sells/buys to another of your company." +#~ msgstr "" +#~ "Konfigurieren Sie Unternehmensregeln so, dass Rechnungen automatisch " +#~ "erstellt werden, wenn eines Ihrer Unternehmen ein anderes Unternehmen " +#~ "Ihres Unternehmens verkauft / kauft." + +#~ msgid "" +#~ "Dear Sir/Madam,\n" +#~ "\n" +#~ "Our records indicate that some payments on your account are still due. " +#~ "Please find details below.\n" +#~ "If the amount has already been paid, please disregard this notice. " +#~ "Otherwise, please forward us the total amount stated below.\n" +#~ "If you have any queries regarding your account, Please contact us.\n" +#~ "\n" +#~ "Thank you in advance for your cooperation.\n" +#~ "Best Regards," +#~ msgstr "" +#~ "Sehr geehrte Damen und Herren, Unsere Unterlagen weisen darauf hin, dass " +#~ "einige Zahlungen auf Ihrem Konto noch fällig sind. Einzelheiten dazu " +#~ "finden Sie unten aufgeführt. Wenn der Betrag bereits bezahlt wurde, " +#~ "ignorieren Sie bitte diesen Hinweis. Andernfalls senden Sie uns bitte den " +#~ "unten angegebenen Gesamtbetrag. Wenn Sie Fragen zu Ihrem Konto haben, " +#~ "kontaktieren Sie uns bitte. Vielen Dank im Voraus für Ihre Mitarbeit." + +#~ msgid "French VAT exemption according to articles 262 I of \"CGI\"" +#~ msgstr "" +#~ "Französische Mehrwertsteuerbefreiung gemäß Artikel 262 I von \"CGI\"" + +#~ msgid "" +#~ "French VAT exemption according to articles 262 ter I (for products) and/" +#~ "or 283-2 (for services) of \"CGI\"" +#~ msgstr "" +#~ "Französische Mehrwertsteuerbefreiung gemäß Artikel 262 I (für Produkte) " +#~ "und / oder 283-2 (für Dienstleistungen) von \"CGI\"" diff --git a/account_invoice_inter_company/i18n/es.po b/account_invoice_inter_company/i18n/es.po new file mode 100644 index 00000000000..a3783e61520 --- /dev/null +++ b/account_invoice_inter_company/i18n/es.po @@ -0,0 +1,312 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-09-02 18:24+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\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: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Canceled Invoice: %(invoice_name)s" +msgstr "%(company_name)s - Factura cancelada: %(invoice_name)s" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Invoice: %(invoice_name)s" +msgstr "%(company_name)s - Factura: %(invoice_name)s" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_generated +msgid "Auto Generated Document" +msgstr "Documento auto-generado" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "" +"Automatically generate counterpart documents for orders/invoices between " +"companies" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "Ajustes Configuración" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "Inter Company Invoice User" +msgstr "Usuario Factura Inter-compañía" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Inter Company OCA features" +msgstr "" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoice" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "Invoice Auto Validation" +msgstr "Auto-validación factura" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "Invoices Auto Validation" +msgstr "Auto-validación facturas" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoices User" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move +msgid "Journal Entry" +msgstr "Asiento contable" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move_line +msgid "Journal Item" +msgstr "Apunte contable" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"Please define %(dest_journal_type)s journal for this company: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." +msgstr "" +"Defina el diario %(dest_journal_type)s para esta empresa: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules." +msgstr "" +"Usuario responsable de la creación de facturas ejecutada por reglas inter-" +"compañía." + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules. " +"If not set the user initiating thetransaction will be used" +msgstr "" +"Usuario responsable de la creación de facturas ejecutada por reglas inter-" +"compañía. Si no está establecido se usará el usuario que inicie la " +"transacción" + +#. module: account_invoice_inter_company +#: model:product.template,name:account_invoice_inter_company.product_consultant_multi_company_product_template +msgid "Service Multi Company" +msgstr "Servicio Multi Compañía" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_invoice_id +msgid "Source Invoice" +msgstr "Factura origen" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move_line__auto_invoice_line_id +msgid "Source Invoice Line" +msgstr "Línea de factura origen" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"The invoice line '%(line_name)s' doesn't have a product. All invoice lines " +"should have a product for inter-company invoices." +msgstr "" +"La línea de factura '%(line_name)s' no tiene ningún producto. Todas las " +"líneas de factura deben tener un producto para facturas entre compañías." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"This is an autogenerated multi company invoice and you're trying to modify " +"the amount, which will differ from the source one (%s)" +msgstr "" +"Se trata de una factura multi compañía autogenerada y está intentando " +"modificar el importe, el cual diferirá del de origen (%s)" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"WARNING!!!!! Failure in the inter-company invoice creation process: the " +"total amount of this invoice is %(dest_amount_total)s but the total amount " +"of the invoice %(invoice_name)s in the company %(company_name)s is " +"%(amount_total)s" +msgstr "" +"¡¡¡¡¡ADVERTENCIA!!!!! Fallo en el proceso de creación de factura inter-" +"compañía: el importe total de esta factura es %(dest_amount_total)s pero el " +"importe total de la factura %(invoice_name)s en la empresa %(company_name)s " +"es %(amount_total)s" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it" +msgstr "" +"Cuando una factura es creada por una regla multicompañía para esta compañía, " +"la validará automáticamente" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it." +msgstr "" +"Cuando una factura es creada por una regla multicompañía para esta compañía, " +"la validará automáticamente." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You can't modify this invoice as it has an inter company invoice that's in " +"posted state.\n" +"Invoice %(invoice_name)s to %(partner_name)s" +msgstr "" +"No puede modificar esta factura porque tiene una factura entre compañías que " +"está en estado registrado.\n" +"Factura de %(invoice_name)s a %(partner_name)s" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You cannot create invoice in company '%(dest_company_name)s' with product " +"'%(product_name)s' because it is not multicompany" +msgstr "" +"No se puede crear factura en la compañía '%(dest_company_name)s' con el " +"producto '%(product_name)s' porque no es multicompañía" + +#~ msgid "Common Product Catalog" +#~ msgstr "Catálogo de productos compartido" + +#~ msgid "" +#~ "Inter Company OCA features\n" +#~ " " +#~ msgstr "" +#~ "Características de OCA entre compañías\n" +#~ " " + +#~ msgid "Intercompany user for invoices" +#~ msgstr "Usuario inter-compañía para facturas" + +#~ msgid "Invoicing" +#~ msgstr "Facturación" + +#, python-format +#~ msgid "No Chart of Account Template has been defined !" +#~ msgstr "¡No se ha definido una plantilla de plan contable!" + +#~ msgid "Share product to all companies" +#~ msgstr "Compartir producto en todas las compañías" + +#~ msgid "" +#~ "Share your product to all companies defined in your instance.\n" +#~ " * Checked : Product are visible for every company, even if a company is " +#~ "defined on the partner.\n" +#~ " * Unchecked : Each company can see only its product (product where " +#~ "company is defined). Product not related to a company are visible for all " +#~ "companies." +#~ msgstr "" +#~ "Compartir sus productos entre todas las compañías definidas en su " +#~ "instancia.\n" +#~ " * Establecido : Los productos son visibles para todas las compañías, " +#~ "incluso si una compañía está definida.\n" +#~ " * No establecido : Cada compañía ve solo sus productos (productos que " +#~ "tengan una compañía establecida). Los productos que no tengan una " +#~ "compañía establecida podrán verse desde todas las compañías." + +#, python-format +#~ msgid "%s - Canceled Invoice: %s" +#~ msgstr "%s - Factura cancelada: %s" + +#, python-format +#~ msgid "%s - Invoice: %s" +#~ msgstr "%s - Factura: %s" + +#~ msgid "Display Name" +#~ msgstr "Nombre mostrado" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última modificación el" + +#, python-format +#~ msgid "Please define %s journal for this company: \"%s\" (id:%d)." +#~ msgstr "Por favor defina %s diario para esta compañía: \"%s\" (id:%d)." + +#, python-format +#~ msgid "" +#~ "The invoice line '%s' doesn't have a product. All invoice lines should " +#~ "have a product for inter-company invoices." +#~ msgstr "" +#~ "La línea de factura '%s' no tiene producto. Todas las líenas de factura " +#~ "deben tener un producto para facturas intercompañía." + +#, python-format +#~ msgid "" +#~ "WARNING!!!!! Failure in the inter-company invoice creation process: the " +#~ "total amount of this invoice is %s but the total amount of the invoice %s " +#~ "in the company %s is %s" +#~ msgstr "" +#~ "AVISO!!!!!! Fallo en el proceso de creación de factura intercompañía: el " +#~ "total de esta factura es %s pero el total de la factura %s en la compañía " +#~ "%s es %s" + +#, python-format +#~ msgid "" +#~ "You cannot create invoice in company '%s' with product '%s' because it is " +#~ "not multicompany" +#~ msgstr "" +#~ "No puede crear una factura en la compañía '%s' con el producto '%s' " +#~ "porque no es multicompañía" diff --git a/account_invoice_inter_company/i18n/es_AR.po b/account_invoice_inter_company/i18n/es_AR.po new file mode 100644 index 00000000000..a97847c54b0 --- /dev/null +++ b/account_invoice_inter_company/i18n/es_AR.po @@ -0,0 +1,326 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-09-17 02:06+0000\n" +"Last-Translator: Ignacio Buioli \n" +"Language-Team: none\n" +"Language: es_AR\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 5.6.2\n" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Canceled Invoice: %(invoice_name)s" +msgstr "%(company_name)s - Factura Cancelada: %(invoice_name)s" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Invoice: %(invoice_name)s" +msgstr "%(company_name)s - Factura: %(invoice_name)s" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_generated +msgid "Auto Generated Document" +msgstr "Documento Generado Automáticamente" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "" +"Automatically generate counterpart documents for orders/invoices between " +"companies" +msgstr "" +"Generar automáticamente documentos equivalentes para pedidos/facturas entre " +"compañías" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "Configurar Ajustes" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "Inter Company Invoice User" +msgstr "Usuario de Factura entre Compañías" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Inter Company OCA features" +msgstr "Funcionalidades Entre Compañías de OCA" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoice" +msgstr "Factura" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "Invoice Auto Validation" +msgstr "Validación Automática de Factura" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "Invoices Auto Validation" +msgstr "Validación Automática de Facturas" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoices User" +msgstr "Usuario de Factura" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move +msgid "Journal Entry" +msgstr "Apunte Contable" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move_line +msgid "Journal Item" +msgstr "Asiento Contable" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"Please define %(dest_journal_type)s journal for this company: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." +msgstr "" +"Por favor defina el diario %(dest_journal_type)s para esta compañía: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules." +msgstr "" +"Usuario responsable de la creación de facturas activadas por reglas de " +"compañías vinculadas." + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules. " +"If not set the user initiating thetransaction will be used" +msgstr "" +"Usuario responsable de la creación de facturas activadas por reglas de " +"empresas vinculadas. Si no se establece, se utilizará el usuario que inicia " +"la transacción" + +#. module: account_invoice_inter_company +#: model:product.template,name:account_invoice_inter_company.product_consultant_multi_company_product_template +msgid "Service Multi Company" +msgstr "Servicio Multi Compañía" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_invoice_id +msgid "Source Invoice" +msgstr "Recurso de la Factura" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move_line__auto_invoice_line_id +msgid "Source Invoice Line" +msgstr "Línea del Recurso de Factura" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"The invoice line '%(line_name)s' doesn't have a product. All invoice lines " +"should have a product for inter-company invoices." +msgstr "" +"La línea de factura '%(line_name)s' no tiene un producto. Todas las líneas " +"de factura deben tener un producto para facturas entre compañías." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"This is an autogenerated multi company invoice and you're trying to modify " +"the amount, which will differ from the source one (%s)" +msgstr "" +"Esta es una factura de varias compañías generada automáticamente y está " +"intentando modificar la cantidad, que será diferente a la de origen (%s)" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"WARNING!!!!! Failure in the inter-company invoice creation process: the " +"total amount of this invoice is %(dest_amount_total)s but the total amount " +"of the invoice %(invoice_name)s in the company %(company_name)s is " +"%(amount_total)s" +msgstr "" +"¡¡¡ADVERTENCIA!!! Fallo en el proceso de creación de la factura inter-" +"compañía: el monto total de esta factura es %(dest_amount_total)s pero el " +"monto total de la factura %(invoice_name)s en la compañía %(company_name)s " +"es %(amount_total)s" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it" +msgstr "" +"Cuando una regla de varias compañías crea una factura para esta compañía, la " +"validará automáticamente" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it." +msgstr "" +"Cuando una regla de varias compañías crea una factura para esta compañía, la " +"validará automáticamente." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You can't modify this invoice as it has an inter company invoice that's in " +"posted state.\n" +"Invoice %(invoice_name)s to %(partner_name)s" +msgstr "" +"No puede modificar esta factura porque tiene una factura entre compañías que " +"está en estado publicado.\n" +"Factura %(invoice_name)s de %(partner_name)s" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You cannot create invoice in company '%(dest_company_name)s' with product " +"'%(product_name)s' because it is not multicompany" +msgstr "" +"No puede crear una factura en la compañía %(dest_company_name)s con el " +"producto %(product_name)s porque el mismo no es multi-compañía" + +#~ msgid "Common Product Catalog" +#~ msgstr "Catálogo de Productos Comunes" + +#~ msgid "" +#~ "Inter Company OCA features\n" +#~ " " +#~ msgstr "" +#~ "Características OCA entre Compañía\n" +#~ " " + +#~ msgid "Intercompany user for invoices" +#~ msgstr "Usuario entre Compañía para facturas" + +#~ msgid "Invoicing" +#~ msgstr "Facturación" + +#, python-format +#~ msgid "No Chart of Account Template has been defined !" +#~ msgstr "¡No se ha definido ninguna Plantilla para el Plan de Cuentas!" + +#~ msgid "Share product to all companies" +#~ msgstr "Compartir el producto a todas las compañías" + +#~ msgid "" +#~ "Share your product to all companies defined in your instance.\n" +#~ " * Checked : Product are visible for every company, even if a company is " +#~ "defined on the partner.\n" +#~ " * Unchecked : Each company can see only its product (product where " +#~ "company is defined). Product not related to a company are visible for all " +#~ "companies." +#~ msgstr "" +#~ "Comparta su producto con todas las compañías definidas en su instancia.\n" +#~ " * Marcado: Los productos son visibles para todas las empresas, incluso " +#~ "si una empresa está definida en el socio.\n" +#~ " * Sin marcar: Cada compañía puede ver solo este producto (producto donde " +#~ "se define empresa). Los productos no relacionados con una compañia son " +#~ "visibles para todas las empresas." + +#, python-format +#~ msgid "%s - Canceled Invoice: %s" +#~ msgstr "%s - Factura Cancelada: %s" + +#, python-format +#~ msgid "%s - Invoice: %s" +#~ msgstr "%s - Factura: %s" + +#~ msgid "Display Name" +#~ msgstr "Nombre Mostrado" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última Modificación el" + +#, python-format +#~ msgid "Please define %s journal for this company: \"%s\" (id:%d)." +#~ msgstr "Por favor defina %s diario para esta compañía: \"%s\" (id:%d)." + +#, python-format +#~ msgid "" +#~ "The invoice line '%s' doesn't have a product. All invoice lines should " +#~ "have a product for inter-company invoices." +#~ msgstr "" +#~ "La línea de factura '%s' no tiene un producto. Todas las líneas de " +#~ "factura deben tener un producto para facturas entre compañías." + +#, python-format +#~ msgid "" +#~ "WARNING!!!!! Failure in the inter-company invoice creation process: the " +#~ "total amount of this invoice is %s but the total amount of the invoice %s " +#~ "in the company %s is %s" +#~ msgstr "" +#~ "¡¡¡¡¡ADVERTENCIA!!!!! Fallo en el proceso de creación de facturas " +#~ "intercompañías: el monto total de esta factura es %s pero el monto total " +#~ "de la factura %s en la empresa %s es %s" + +#, python-format +#~ msgid "" +#~ "You can't modify this invoice as it has an inter company invoice that's " +#~ "in posted state.\n" +#~ "Invoice %s to %s" +#~ msgstr "" +#~ "No puede modificar esta factura, ya que tiene una factura entre compañías " +#~ "que está en estado publicado.\n" +#~ "Factura %s a %s" + +#, python-format +#~ msgid "" +#~ "You cannot create invoice in company '%s' with product '%s' because it is " +#~ "not multicompany" +#~ msgstr "" +#~ "No puede crear una factura en la compañía '%s' con el producto '%s' " +#~ "porque no es multicompañía" + +#~ msgid "Journal Entries" +#~ msgstr "Asientos Contables" diff --git a/account_invoice_inter_company/i18n/fr.po b/account_invoice_inter_company/i18n/fr.po new file mode 100644 index 00000000000..586ae5d8ba8 --- /dev/null +++ b/account_invoice_inter_company/i18n/fr.po @@ -0,0 +1,307 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_inter_company +# +# Translators: +# OCA Transbot , 2018 +# Quentin THEURET , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-27 07:37+0000\n" +"PO-Revision-Date: 2018-01-27 07:37+0000\n" +"Last-Translator: Quentin THEURET , 2018\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" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Canceled Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_generated +msgid "Auto Generated Document" +msgstr "Document auto-généré" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "" +"Automatically generate counterpart documents for orders/invoices between " +"companies" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_config_settings +#, fuzzy +msgid "Config Settings" +msgstr "res.config.settings" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +#, fuzzy +msgid "Inter Company Invoice User" +msgstr "Facturation inter-sociétés" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +#, fuzzy +msgid "Inter Company OCA features" +msgstr "Facturation inter-sociétés" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoice" +msgstr "Facture" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "Invoice Auto Validation" +msgstr "Auto Validation de la facture" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "Invoices Auto Validation" +msgstr "Auto Validation des factures" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoices User" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"Please define %(dest_journal_type)s journal for this company: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules." +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules. " +"If not set the user initiating thetransaction will be used" +msgstr "" + +#. module: account_invoice_inter_company +#: model:product.template,name:account_invoice_inter_company.product_consultant_multi_company_product_template +msgid "Service Multi Company" +msgstr "Service Multi Société" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_invoice_id +msgid "Source Invoice" +msgstr "Facture source" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move_line__auto_invoice_line_id +msgid "Source Invoice Line" +msgstr "Ligne de facture source" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"The invoice line '%(line_name)s' doesn't have a product. All invoice lines " +"should have a product for inter-company invoices." +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"This is an autogenerated multi company invoice and you're trying to modify " +"the amount, which will differ from the source one (%s)" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"WARNING!!!!! Failure in the inter-company invoice creation process: the " +"total amount of this invoice is %(dest_amount_total)s but the total amount " +"of the invoice %(invoice_name)s in the company %(company_name)s is " +"%(amount_total)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it" +msgstr "" +"Pour cette société, lorsqu'une facture est créée par une règle multisociété, " +"alors elle sera validé automatiquement" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it." +msgstr "" +"Pour cette société, lorsqu'une facture est créée par une règle multisociété, " +"alors elle sera validé automatiquement." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You can't modify this invoice as it has an inter company invoice that's in " +"posted state.\n" +"Invoice %(invoice_name)s to %(partner_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You cannot create invoice in company '%(dest_company_name)s' with product " +"'%(product_name)s' because it is not multicompany" +msgstr "" + +#, fuzzy +#~ msgid "Intercompany user for invoices" +#~ msgstr "Facturation inter-sociétés" + +#, fuzzy +#~ msgid "Invoicing" +#~ msgstr "Ligne de facture" + +#, python-format +#~ msgid "No Chart of Account Template has been defined !" +#~ msgstr "Aucun modèle de plan de comptes n'a été défini !" + +#, python-format +#~ msgid "%s - Canceled Invoice: %s" +#~ msgstr "%s - Facture Annulée: %s" + +#, python-format +#~ msgid "%s - Invoice: %s" +#~ msgstr "%s - Facture: %s" + +#, python-format +#~ msgid "Please define %s journal for this company: \"%s\" (id:%d)." +#~ msgstr "" +#~ "Merci de créer un journal de type %s dans la société: \"%s\" (id:%d)." + +#, python-format +#~ msgid "" +#~ "The invoice line '%s' doesn't have a product. All invoice lines should " +#~ "have a product for inter-company invoices." +#~ msgstr "" +#~ "La ligne de facture '%s' n'a pas de produit. Toutes les lignes sur les " +#~ "factures inter-sociétés doivent avoir un produit." + +#, python-format +#~ msgid "" +#~ "WARNING!!!!! Failure in the inter-company invoice creation process: the " +#~ "total amount of this invoice is %s but the total amount of the invoice %s " +#~ "in the company %s is %s" +#~ msgstr "" +#~ "ATTENTION!!!!! Echec dans le process de création de la facture inter-" +#~ "société: le montant total de la facture en création est %s alors que le " +#~ "montant total de la facture %s dans la société %s est %s" + +#, python-format +#~ msgid "" +#~ "You cannot create invoice in company '%s' with product '%s' because it is " +#~ "not multicompany" +#~ msgstr "" +#~ "Vous ne pouvez pas créer de facture dans la société '%s' avec le produit " +#~ "'%s' car il n'est pas multisociété" + +#~ msgid "Please define %s account for this company: \"%s\" (id:%d)." +#~ msgstr "" +#~ "Merci de créer un compte comptable de type %s dans la société: \"%s\" (id:" +#~ "%d)." + +#~ msgid "Automate inter-company invoicing" +#~ msgstr "Automatiser la facture inter-sociétés" + +#~ msgid "" +#~ "Configure company rules to automatically create invoices when one of your " +#~ "company sells/buys to another of your company." +#~ msgstr "" +#~ "Configurer les règles de la société pour créer automatiquement les " +#~ "factures quand l'une de vos sociétés vend/achète à une autre de vos " +#~ "sociétés." + +#~ msgid "" +#~ "Dear Sir/Madam,\n" +#~ "\n" +#~ "Our records indicate that some payments on your account are still due. " +#~ "Please find details below.\n" +#~ "If the amount has already been paid, please disregard this notice. " +#~ "Otherwise, please forward us the total amount stated below.\n" +#~ "If you have any queries regarding your account, Please contact us.\n" +#~ "\n" +#~ "Thank you in advance for your cooperation.\n" +#~ "Best Regards," +#~ msgstr "" +#~ "Dear Sir/Madam,\n" +#~ "\n" +#~ "Our records indicate that some payments on your account are still due. " +#~ "Please find details below.\n" +#~ "If the amount has already been paid, please disregard this notice. " +#~ "Otherwise, please forward us the total amount stated below.\n" +#~ "If you have any queries regarding your account, Please contact us.\n" +#~ "\n" +#~ "Thank you in advance for your cooperation.\n" +#~ "Best Regards," + +#~ msgid "French VAT exemption according to articles 262 I of \"CGI\"" +#~ msgstr "French VAT exemption according to articles 262 I of \"CGI\"" + +#~ msgid "" +#~ "French VAT exemption according to articles 262 ter I (for products) and/" +#~ "or 283-2 (for services) of \"CGI\"" +#~ msgstr "" +#~ "French VAT exemption according to articles 262 ter I (for products) and/" +#~ "or 283-2 (for services) of \"CGI\"" diff --git a/account_invoice_inter_company/i18n/hr.po b/account_invoice_inter_company/i18n/hr.po new file mode 100644 index 00000000000..b3d38a29688 --- /dev/null +++ b/account_invoice_inter_company/i18n/hr.po @@ -0,0 +1,282 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-10-08 12:34+0000\n" +"Last-Translator: Matija Krolo \n" +"Language-Team: none\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" +"X-Generator: Weblate 4.3.2\n" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Canceled Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_generated +msgid "Auto Generated Document" +msgstr "Automatski generirani dokument" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "" +"Automatically generate counterpart documents for orders/invoices between " +"companies" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_company +msgid "Companies" +msgstr "Tvrtke" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "Postavke" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +#, fuzzy +msgid "Inter Company Invoice User" +msgstr "Inter Company OCA značajke" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Inter Company OCA features" +msgstr "" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoice" +msgstr "Račun" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "Invoice Auto Validation" +msgstr "Automatsko potvrđivanje računa" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "Invoices Auto Validation" +msgstr "Automatsko potvrđivanje računa" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoices User" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move +msgid "Journal Entry" +msgstr "Stavka temeljnice" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"Please define %(dest_journal_type)s journal for this company: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules." +msgstr "" +"Odgovorni korisnik za kreiranje računa aktiviran međukompanijskim pravilima." + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules. " +"If not set the user initiating thetransaction will be used" +msgstr "" + +#. module: account_invoice_inter_company +#: model:product.template,name:account_invoice_inter_company.product_consultant_multi_company_product_template +msgid "Service Multi Company" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_invoice_id +msgid "Source Invoice" +msgstr "Izvorni račun" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move_line__auto_invoice_line_id +msgid "Source Invoice Line" +msgstr "Stavka izvornog računa" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"The invoice line '%(line_name)s' doesn't have a product. All invoice lines " +"should have a product for inter-company invoices." +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"This is an autogenerated multi company invoice and you're trying to modify " +"the amount, which will differ from the source one (%s)" +msgstr "" +"Ovo je automatski generiran multi kompanijski račun i pokušavate promijeniti " +"iznos, što će se razlikovati od izvornog računa (%s)" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"WARNING!!!!! Failure in the inter-company invoice creation process: the " +"total amount of this invoice is %(dest_amount_total)s but the total amount " +"of the invoice %(invoice_name)s in the company %(company_name)s is " +"%(amount_total)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it" +msgstr "" +"Kad je račun kreiran temeljem multi kompanijskog pravila za ovu kompaniju, " +"bit će automatski ovjeren" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it." +msgstr "" +"Kad je račun kreiran temeljem multi kompanijskog pravila za ovu kompaniju, " +"bit će automatski ovjeren." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You can't modify this invoice as it has an inter company invoice that's in " +"posted state.\n" +"Invoice %(invoice_name)s to %(partner_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You cannot create invoice in company '%(dest_company_name)s' with product " +"'%(product_name)s' because it is not multicompany" +msgstr "" + +#, fuzzy +#~ msgid "" +#~ "Inter Company OCA features\n" +#~ " " +#~ msgstr "" +#~ "" + +#, fuzzy +#~ msgid "Intercompany user for invoices" +#~ msgstr "Inter Company OCA značajke" + +#, fuzzy +#~ msgid "Invoicing" +#~ msgstr "Stavka računa" + +#, python-format +#~ msgid "No Chart of Account Template has been defined !" +#~ msgstr "Kontni plan nije definiran !" + +#~ msgid "Share product to all companies" +#~ msgstr "Podijeli proizvod sa svim kopanijama" + +#, python-format +#~ msgid "%s - Canceled Invoice: %s" +#~ msgstr "%s - Storniran račun: %s" + +#, python-format +#~ msgid "%s - Invoice: %s" +#~ msgstr "%s - Račun: %s" + +#~ msgid "ID" +#~ msgstr "ID" + +#, python-format +#~ msgid "Please define %s journal for this company: \"%s\" (id:%d)." +#~ msgstr "Molim definirajte %s temeljnicu za ovu kompaniju: \"%s\" (id:%d)." + +#, python-format +#~ msgid "" +#~ "The invoice line '%s' doesn't have a product. All invoice lines should " +#~ "have a product for inter-company invoices." +#~ msgstr "" +#~ "Stavka računa '%s' nema proizvod. Sve stavke računa trebaju imati " +#~ "proizvod za među-kompanijske račune." + +#, python-format +#~ msgid "" +#~ "WARNING!!!!! Failure in the inter-company invoice creation process: the " +#~ "total amount of this invoice is %s but the total amount of the invoice %s " +#~ "in the company %s is %s" +#~ msgstr "" +#~ "UPOZORENJE!!!!! Greška u procesu među kompanijskog računa: ukupni iznos " +#~ "ovog računa je %s, a ukupni iznos računa %s u kompaniji %s je %s" + +#, python-format +#~ msgid "" +#~ "You can't modify this invoice as it has an inter company invoice that's " +#~ "in posted state.\n" +#~ "Invoice %s to %s" +#~ msgstr "" +#~ "Ne možete uređivati ovaj račun pošto je povezan s među kompanijskim " +#~ "računom koji je u proknjiženom statusu.\n" +#~ "Račun %s u %s" + +#, python-format +#~ msgid "" +#~ "You cannot create invoice in company '%s' with product '%s' because it is " +#~ "not multicompany" +#~ msgstr "" +#~ "Ne možete kreirati račun u kompaniji '%s' s proizvodom '%s' jer nije " +#~ "multi kompanijski" diff --git a/account_invoice_inter_company/i18n/it.po b/account_invoice_inter_company/i18n/it.po new file mode 100644 index 00000000000..3d94a36408b --- /dev/null +++ b/account_invoice_inter_company/i18n/it.po @@ -0,0 +1,307 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-08-31 11:06+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\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 5.6.2\n" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Canceled Invoice: %(invoice_name)s" +msgstr "%(company_name)s - Fattura annullata: %(invoice_name)s" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Invoice: %(invoice_name)s" +msgstr "%(company_name)s - Fattura: %(invoice_name)s" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_generated +msgid "Auto Generated Document" +msgstr "Documento auto generato" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "" +"Automatically generate counterpart documents for orders/invoices between " +"companies" +msgstr "" +"Generare automaticamente documenti di contropartita per ordini/fatture tra " +"aziende" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_company +msgid "Companies" +msgstr "Aziende" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "Impostazioni di configurazione" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "Inter Company Invoice User" +msgstr "Utente fatturazione interaziendale" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Inter Company OCA features" +msgstr "Funzionalità OCA interaziendali" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoice" +msgstr "Fattura" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "Invoice Auto Validation" +msgstr "Auto validazione fattura" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "Invoices Auto Validation" +msgstr "Auto validazione fatture" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoices User" +msgstr "Utente fatture" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move +msgid "Journal Entry" +msgstr "Registrazione contabile" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move_line +msgid "Journal Item" +msgstr "Movimento contabile" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"Please define %(dest_journal_type)s journal for this company: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." +msgstr "" +"Defiire il giornale %(dest_journal_type)s per questa azienda: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules." +msgstr "" +"Utente responsabile per la creazione di fatture innescata dalle regole " +"intraziendali." + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules. " +"If not set the user initiating thetransaction will be used" +msgstr "" +"Utente responsabile per la creazione di fatture innescata dalle regole " +"intraziendali. Se non impostato, verrà usato l'utente che ha iniziato la " +"transazione" + +#. module: account_invoice_inter_company +#: model:product.template,name:account_invoice_inter_company.product_consultant_multi_company_product_template +msgid "Service Multi Company" +msgstr "Servizio multi azienda" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_invoice_id +msgid "Source Invoice" +msgstr "Fatture di origine" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move_line__auto_invoice_line_id +msgid "Source Invoice Line" +msgstr "Riga fattura di origine" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"The invoice line '%(line_name)s' doesn't have a product. All invoice lines " +"should have a product for inter-company invoices." +msgstr "" +"La riga fattura '%(line_name)s' non ha un prodotto. Tutte le righe fattura " +"dovrebbero avere un prodotto per le fattura interaziendali." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"This is an autogenerated multi company invoice and you're trying to modify " +"the amount, which will differ from the source one (%s)" +msgstr "" +"Questa è una fattura interaziendale generata automaticamente e stai cercando " +"di modificare l'importo, che differirà da quella originaria (%s)" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"WARNING!!!!! Failure in the inter-company invoice creation process: the " +"total amount of this invoice is %(dest_amount_total)s but the total amount " +"of the invoice %(invoice_name)s in the company %(company_name)s is " +"%(amount_total)s" +msgstr "" +"ATTENZIONE!!!!! Errore nel processo di creazione della fattura " +"interaziendale: il valore totale di questa fattura è %(dest_amount_total)s " +"ma il valore totale della fattura %(invoice_name)s nell'azienda " +"%(company_name)s è %(amount_total)s" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it" +msgstr "" +"Quando una fattura viene creata da una regola multi azienda per questa " +"azienda, verrà automaticamente validata" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it." +msgstr "" +"Quando una fattura viene creata da una regola multi azienda per questa " +"azienda, verrà automaticamente validata." + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You can't modify this invoice as it has an inter company invoice that's in " +"posted state.\n" +"Invoice %(invoice_name)s to %(partner_name)s" +msgstr "" +"Non si può modificare questa fattura perché ha una fattura interaziendale " +"che è in stato confermato.\n" +"Fattura %(invoice_name)s a %(partner_name)s" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You cannot create invoice in company '%(dest_company_name)s' with product " +"'%(product_name)s' because it is not multicompany" +msgstr "" +"Non si può create una fattura nell'azienda '%(dest_company_name)s' con il " +"prodotto '%(product_name)s' perché non è multiaziendale" + +#~ msgid "Common Product Catalog" +#~ msgstr "Catalogo prodotti comune" + +#~ msgid "" +#~ "Inter Company OCA features\n" +#~ " " +#~ msgstr "" +#~ "Funzionalità OCA interaziendali\n" +#~ " " + +#~ msgid "Intercompany user for invoices" +#~ msgstr "Utente interaziendale per fatturazione" + +#~ msgid "Invoicing" +#~ msgstr "Fatturazione" + +#, python-format +#~ msgid "No Chart of Account Template has been defined !" +#~ msgstr "Non è stato definito un modello per il piano dei conti!" + +#~ msgid "Share product to all companies" +#~ msgstr "Condividere prodotto a tutte le aziende" + +#~ msgid "" +#~ "Share your product to all companies defined in your instance.\n" +#~ " * Checked : Product are visible for every company, even if a company is " +#~ "defined on the partner.\n" +#~ " * Unchecked : Each company can see only its product (product where " +#~ "company is defined). Product not related to a company are visible for all " +#~ "companies." +#~ msgstr "" +#~ "Condividi i prodotti tra tutte le aziende nella tua istanza.\n" +#~ " * Attivato: I prodotti sono visibili per tutte le aziende, anche se c'è " +#~ "una azienda impostata nel contatto.\n" +#~ " * Disattivato : Ogni azienda può vedere solo i propri prodotti (dove " +#~ "l'azienda è specificata). I prodotti senza azienda specificata sono " +#~ "visibili per tutte le aziende." + +#, python-format +#~ msgid "%s - Canceled Invoice: %s" +#~ msgstr "%s - Fattura annullata: %s" + +#, python-format +#~ msgid "%s - Invoice: %s" +#~ msgstr "%s - Fattura: %s" + +#, python-format +#~ msgid "Please define %s journal for this company: \"%s\" (id:%d)." +#~ msgstr "Prego definire un registro %s per questa azienda: \"%s\" (id:%d)." + +#, python-format +#~ msgid "" +#~ "The invoice line '%s' doesn't have a product. All invoice lines should " +#~ "have a product for inter-company invoices." +#~ msgstr "" +#~ "La riga fattura '%s' non ha un prodotto. Tutte le righe fattura " +#~ "dovrebbero avere un prodotto per le fattura interaziendali." + +#, python-format +#~ msgid "" +#~ "WARNING!!!!! Failure in the inter-company invoice creation process: the " +#~ "total amount of this invoice is %s but the total amount of the invoice %s " +#~ "in the company %s is %s" +#~ msgstr "" +#~ "ATTENZIONE!!!!! Errore nel processo di creazione della fattura " +#~ "interaziendale: l'importo totale di questa fattura è %s ma l'importo " +#~ "totale della fattura %s nell'azienda %s è %s" + +#, python-format +#~ msgid "" +#~ "You cannot create invoice in company '%s' with product '%s' because it is " +#~ "not multicompany" +#~ msgstr "" +#~ "Impossibile creare la fattura nell'azienda '%s' con il prodotto '%s' " +#~ "perchè non è multi azienda" + +#~ msgid "Please define %s account for this company: \"%s\" (id:%d)." +#~ msgstr "Prego definire un conto %s per questa azienda: \"%s\" (id:%d)." diff --git a/account_invoice_inter_company/i18n/zh_CN.po b/account_invoice_inter_company/i18n/zh_CN.po new file mode 100644 index 00000000000..5da6a84c9bf --- /dev/null +++ b/account_invoice_inter_company/i18n/zh_CN.po @@ -0,0 +1,264 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-04-07 18:19+0000\n" +"Last-Translator: Dong \n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.10\n" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Canceled Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "%(company_name)s - Invoice: %(invoice_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_generated +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_generated +msgid "Auto Generated Document" +msgstr "自动生成的文档" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "" +"Automatically generate counterpart documents for orders/invoices between " +"companies" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_company +msgid "Companies" +msgstr "公司" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "配置设定" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "Inter Company Invoice User" +msgstr "内部公司开票用户" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Inter Company OCA features" +msgstr "" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoice" +msgstr "发票" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "Invoice Auto Validation" +msgstr "发票自动验证" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "Invoices Auto Validation" +msgstr "发票自动验证" + +#. module: account_invoice_inter_company +#: model_terms:ir.ui.view,arch_db:account_invoice_inter_company.res_config_settings_view_form +msgid "Invoices User" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model,name:account_invoice_inter_company.model_account_move_line +msgid "Journal Item" +msgstr "会计分录" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"Please define %(dest_journal_type)s journal for this company: " +"\"%(dest_company_name)s\" (id:%(dest_company_id)d)." +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules." +msgstr "公司间交易规则触发时负责创建发票的用户。" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__intercompany_invoice_user_id +msgid "" +"Responsible user for creation of invoices triggered by intercompany rules. " +"If not set the user initiating thetransaction will be used" +msgstr "" + +#. module: account_invoice_inter_company +#: model:product.template,name:account_invoice_inter_company.product_consultant_multi_company_product_template +msgid "Service Multi Company" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_bank_statement_line__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move__auto_invoice_id +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_payment__auto_invoice_id +msgid "Source Invoice" +msgstr "来源发票" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,field_description:account_invoice_inter_company.field_account_move_line__auto_invoice_line_id +msgid "Source Invoice Line" +msgstr "来源发票明细" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"The invoice line '%(line_name)s' doesn't have a product. All invoice lines " +"should have a product for inter-company invoices." +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"This is an autogenerated multi company invoice and you're trying to modify " +"the amount, which will differ from the source one (%s)" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"WARNING!!!!! Failure in the inter-company invoice creation process: the " +"total amount of this invoice is %(dest_amount_total)s but the total amount " +"of the invoice %(invoice_name)s in the company %(company_name)s is " +"%(amount_total)s" +msgstr "" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_company__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it" +msgstr "当该公司的多公司规则创建发票时,它将自动验证" + +#. module: account_invoice_inter_company +#: model:ir.model.fields,help:account_invoice_inter_company.field_res_config_settings__invoice_auto_validation +msgid "" +"When an invoice is created by a multi company rule for this company, it will " +"automatically validate it." +msgstr "当该公司的多公司规则创建发票时,它将自动验证。" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You can't modify this invoice as it has an inter company invoice that's in " +"posted state.\n" +"Invoice %(invoice_name)s to %(partner_name)s" +msgstr "" + +#. module: account_invoice_inter_company +#. odoo-python +#: code:addons/account_invoice_inter_company/models/account_move.py:0 +#, python-format +msgid "" +"You cannot create invoice in company '%(dest_company_name)s' with product " +"'%(product_name)s' because it is not multicompany" +msgstr "" + +#~ msgid "Common Product Catalog" +#~ msgstr "产品目录共用" + +#, fuzzy +#~ msgid "" +#~ "Inter Company OCA features\n" +#~ " " +#~ msgstr "" +#~ "" + +#~ msgid "Intercompany user for invoices" +#~ msgstr "公司间结算开票用户" + +#~ msgid "Invoicing" +#~ msgstr "开票" + +#, python-format +#~ msgid "No Chart of Account Template has been defined !" +#~ msgstr "没有定义会计科目表!" + +#~ msgid "Share product to all companies" +#~ msgstr "与所有公司分享产品主数据" + +#, python-format +#~ msgid "%s - Canceled Invoice: %s" +#~ msgstr "%s - 已取消的发票:%s" + +#, python-format +#~ msgid "%s - Invoice: %s" +#~ msgstr "%s - 发票:%s" + +#, python-format +#~ msgid "Please define %s journal for this company: \"%s\" (id:%d)." +#~ msgstr "请为该公司定义 %s 日记账: \"%s\" (id:%d)." + +#, python-format +#~ msgid "" +#~ "The invoice line '%s' doesn't have a product. All invoice lines should " +#~ "have a product for inter-company invoices." +#~ msgstr "" +#~ "发票明细 '%s' 没有产品。用于公司间结算的所有发票明细都应设置一个产品。" + +#, python-format +#~ msgid "" +#~ "WARNING!!!!! Failure in the inter-company invoice creation process: the " +#~ "total amount of this invoice is %s but the total amount of the invoice %s " +#~ "in the company %s is %s" +#~ msgstr "" +#~ "警告!!!!! 公司间发票创建失败:此发票的总金额为 %s ,但公司中 %s 发票 %s 总" +#~ "金额为 %s" + +#, python-format +#~ msgid "" +#~ "You cannot create invoice in company '%s' with product '%s' because it is " +#~ "not multicompany" +#~ msgstr "您无法在公司 '%s' 使用产品 '%s' 创建发票,因为该产品不支持多公司" + +#~ msgid "Journal Entries" +#~ msgstr "会计凭证" + +#~ msgid "Please define %s account for this company: \"%s\" (id:%d)." +#~ msgstr "请为该公司定义 %s 科目:\"%s\" (id:%d)." diff --git a/account_invoice_inter_company/models/__init__.py b/account_invoice_inter_company/models/__init__.py new file mode 100644 index 00000000000..6125fe2684e --- /dev/null +++ b/account_invoice_inter_company/models/__init__.py @@ -0,0 +1,7 @@ +# Copyright 2013-2014 Odoo SA +# Copyright 2015-2017 Chafique Delli +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import account_move +from . import res_config_settings +from . import res_company diff --git a/account_invoice_inter_company/models/account_move.py b/account_invoice_inter_company/models/account_move.py new file mode 100644 index 00000000000..1e0ac6d6b99 --- /dev/null +++ b/account_invoice_inter_company/models/account_move.py @@ -0,0 +1,369 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +import base64 +import logging + +from odoo import _, api, fields, models +from odoo.exceptions import AccessError, UserError +from odoo.tools import float_compare +from odoo.tools.misc import clean_context + +_logger = logging.getLogger(__name__) + + +class AccountMove(models.Model): + _inherit = "account.move" + + auto_generated = fields.Boolean( + "Auto Generated Document", copy=False, default=False + ) + auto_invoice_id = fields.Many2one( + "account.move", + string="Source Invoice", + readonly=True, + copy=False, + prefetch=False, + ) + + def _find_company_from_invoice_partner(self): + self.ensure_one() + company = ( + self.env["res.company"] + .sudo() + .search( + [ + ("partner_id", "=", self.commercial_partner_id.id), + ("id", "!=", self.company_id.id), + ], + limit=1, + ) + ) + return company or False + + def _set_intercompany_supplier_invoice_ref(self): + self.ensure_one() + supplier_invoice = self.auto_invoice_id + if not supplier_invoice.ref: + supplier_invoice.write({"ref": self.name}) + + def action_post(self): + """Validated invoice generate cross invoice base on company rules""" + res = super().action_post() + # Intercompany account entries or receipts aren't supported + supported_types = {"out_invoice", "in_invoice", "out_refund", "in_refund"} + for src_invoice in self.filtered(lambda x: x.move_type in supported_types): + # do not consider invoices that have already been auto-generated, + # nor the invoices that were already validated in the past + dest_company = src_invoice._find_company_from_invoice_partner() + if not dest_company: + continue + # Skip if one of the involved companies have intercompany setting disabled + if ( + not dest_company.intercompany_invoicing + or not src_invoice.company_id.intercompany_invoicing + ): + continue + intercompany_user = dest_company.intercompany_invoice_user_id + if intercompany_user: + src_invoice = src_invoice.with_user(intercompany_user).sudo() + else: + src_invoice = src_invoice.sudo() + if not src_invoice.auto_generated: + src_invoice.with_company(dest_company.id).with_context( + skip_check_amount_difference=True + )._inter_company_create_invoice(dest_company) + if src_invoice.is_sale_document(): + src_invoice._attach_original_pdf_report() + # set invoice ref on supplier invoice when the customer invoice is validated + # (case where the source invoice was the supplier one) + for invoice in self.filtered( + lambda i: i.is_sale_document() and i.auto_generated + ): + invoice.sudo()._set_intercompany_supplier_invoice_ref() + return res + + def _attach_original_pdf_report(self): + self.ensure_one() + supplier_invoice = self.auto_invoice_id + if not supplier_invoice: + supplier_invoice = self.search([("auto_invoice_id", "=", self.id)], limit=1) + report = self.env.ref("account.account_invoices").with_company(self.company_id) + pdf = report._render_qweb_pdf(report.report_name, [self.id])[0] + self.env["ir.attachment"].create( + { + "name": self._get_report_base_filename() + ".pdf", + "type": "binary", + "datas": base64.b64encode(pdf), + "res_model": "account.move", + "res_id": supplier_invoice.id, + "mimetype": "application/pdf", + } + ) + + def _check_intercompany_product(self, dest_company): + self.ensure_one() + domain = dest_company._get_user_domain() + dest_user = self.env["res.users"].search(domain, limit=1) + for line in self.invoice_line_ids: + try: + line.product_id.product_tmpl_id.sudo(False).with_user( + dest_user + ).with_context( + **{"allowed_company_ids": [dest_company.id]} + ).check_access("read") + except AccessError as e: + raise UserError( + _( + "You cannot create invoice in company '%(dest_company_name)s' " + "with product '%(product_name)s' because it is not multicompany" + ) + % { + "dest_company_name": dest_company.name, + "product_name": line.product_id.name, + } + ) from e + + def _check_dest_journal(self, dest_company): + self.ensure_one() + dest_journal_type = self._get_destination_journal_type() + # find the correct journal + dest_journal = self.env["account.journal"].search( + [("type", "=", dest_journal_type), ("company_id", "=", dest_company.id)], + limit=1, + ) + if not dest_journal: + raise UserError( + _( + "Please define %(dest_journal_type)s journal for " + 'this company: "%(dest_company_name)s" (id:%(dest_company_id)d).' + ) + % { + "dest_journal_type": dest_journal_type, + "dest_company_name": dest_company.name, + "dest_company_id": dest_company.id, + } + ) + + def _inter_company_create_invoice(self, dest_company): + """create an invoice for the given company : it will copy + the invoice lines in the new invoice. + :param dest_company : the company of the created invoice + :rtype dest_company : res.company record + """ + self.ensure_one() + self = self.with_context(check_move_validity=False) + # check intercompany product + self._check_intercompany_product(dest_company) + # if an invoice has already been generated + # delete it and force the same number + inter_invoice = self.search( + [("auto_invoice_id", "=", self.id), ("company_id", "=", dest_company.id)] + ) + force_number = False + if inter_invoice and inter_invoice.state in ["draft", "cancel"]: + force_number = inter_invoice.name + inter_invoice.with_context(force_delete=True).unlink() + # create destination invoice + dest_invoice_data = self._prepare_invoice_data(dest_company) + if force_number: + dest_invoice_data["name"] = force_number + dest_invoice = self.create(dest_invoice_data) + if dest_invoice.currency_id != self.currency_id: + dest_invoice.currency_id = self.currency_id + # create destination invoice lines + self._create_destination_account_move_line(dest_invoice, dest_company) + # Validation of destination invoice + precision = self.env["decimal.precision"].precision_get("Account") + if dest_company.invoice_auto_validation and not float_compare( + self.amount_total, dest_invoice.amount_total, precision_digits=precision + ): + dest_invoice.action_post() + else: + # Add warning in chatter if the total amounts are different + if float_compare( + self.amount_total, dest_invoice.amount_total, precision_digits=precision + ): + body = _( + "WARNING!!!!! Failure in the inter-company invoice " + "creation process: the total amount of this invoice " + "is %(dest_amount_total)s but the total amount " + "of the invoice %(invoice_name)s " + "in the company %(company_name)s is %(amount_total)s" + ) % { + "dest_amount_total": dest_invoice.amount_total, + "invoice_name": self.name, + "company_name": self.company_id.name, + "amount_total": self.amount_total, + } + dest_invoice.message_post(body=body) + return {"dest_invoice": dest_invoice} + + def _create_destination_account_move_line(self, dest_invoice, dest_company): + dest_move_line_data = [] + for src_line in self.invoice_line_ids.filtered( + lambda x: x.display_type == "product" + ): + if not src_line.product_id: + raise UserError( + _( + "The invoice line '%(line_name)s' doesn't have a product. " + "All invoice lines should have a product for " + "inter-company invoices." + ) + % {"line_name": src_line.name} + ) + dest_move_line_data.append( + src_line._prepare_account_move_line(dest_invoice, dest_company) + ) + self.env["account.move.line"].create(dest_move_line_data) + + def _get_destination_invoice_type(self): + self.ensure_one() + MAP_INVOICE_TYPE = { + "out_invoice": "in_invoice", + "in_invoice": "out_invoice", + "out_refund": "in_refund", + "in_refund": "out_refund", + } + return MAP_INVOICE_TYPE.get(self.move_type) + + def _get_destination_journal_type(self): + self.ensure_one() + MAP_JOURNAL_TYPE = { + "out_invoice": "purchase", + "in_invoice": "sale", + "out_refund": "purchase", + "in_refund": "sale", + } + return MAP_JOURNAL_TYPE.get(self.move_type) + + def _prepare_invoice_data(self, dest_company): + """Generate invoice values + :param dest_company : the company of the created invoice + :rtype dest_company : res.company record + """ + self.ensure_one() + self = self.with_context(**clean_context(self.env.context)) + # check if the journal is define in dest company + self._check_dest_journal(dest_company) + vals = { + "move_type": self._get_destination_invoice_type(), + "partner_id": self.company_id.partner_id.id, + "ref": self.name, + "payment_reference": self.payment_reference, + "invoice_date": self.invoice_date, + "invoice_origin": _("%(company_name)s - Invoice: %(invoice_name)s") + % {"company_name": self.company_id.name, "invoice_name": self.name}, + "auto_invoice_id": self.id, + "auto_generated": True, + } + # CHECK ME: This field is created by module sale, maybe we need add dependency? + if ( + hasattr(self, "partner_shipping_id") + and self.partner_shipping_id + and not self.partner_shipping_id.company_id + ): + # if shipping partner is shared you may want to propagate its value + # to supplier invoice allowing to analyse invoices + vals["partner_shipping_id"] = self.partner_shipping_id.id + return vals + + def button_draft(self): + for move in self: + inter_invoice_posted = self.sudo().search( + [("auto_invoice_id", "=", move.id), ("state", "=", "posted")], limit=1 + ) + if inter_invoice_posted: + raise UserError( + _( + "You can't modify this invoice as it has an inter company " + "invoice that's in posted state.\n" + "Invoice %(invoice_name)s to %(partner_name)s" + ) + % { + "invoice_name": inter_invoice_posted.name, + "partner_name": inter_invoice_posted.partner_id.display_name, + } + ) + return super().button_draft() + + def button_cancel(self): + for invoice in self: + company = invoice._find_company_from_invoice_partner() + if company and not invoice.auto_generated: + for inter_invoice in self.sudo().search( + [("auto_invoice_id", "=", invoice.id)] + ): + inter_invoice.button_draft() + inter_invoice.write( + { + "invoice_origin": _( + "%(company_name)s - Canceled Invoice: %(invoice_name)s" + ) + % { + "company_name": invoice.company_id.name, + "invoice_name": invoice.name, + } + } + ) + inter_invoice.button_cancel() + return super().button_cancel() + + def write(self, vals): + res = super().write(vals) + if self.env.context.get("skip_check_amount_difference"): + return res + for move in self.filtered("auto_invoice_id"): + if ( + float_compare( + move.amount_untaxed, + move.sudo().auto_invoice_id.amount_untaxed, + precision_rounding=move.currency_id.rounding, + ) + != 0 + ): + raise UserError( + _( + "This is an autogenerated multi company invoice and you're " + "trying to modify the amount, which will differ from the " + "source one (%s)" + ) + % (move.sudo().auto_invoice_id.name) + ) + return res + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + auto_invoice_line_id = fields.Many2one( + "account.move.line", + string="Source Invoice Line", + readonly=True, + copy=False, + prefetch=False, + ) + + @api.model + def _prepare_account_move_line(self, dest_move, dest_company): + """Generate invoice line values + :param dest_move : the created invoice + :rtype dest_move : account.move record + :param dest_company : the company of the created invoice + :rtype dest_company : res.company record + """ + self.ensure_one() + vals = { + "product_id": self.product_id.id or False, + "price_unit": self.price_unit, + "quantity": self.quantity, + "discount": self.discount, + "move_id": dest_move.id, + "sequence": self.sequence, + "auto_invoice_line_id": self.id, + } + # Compatibility with module account_invoice_start_end_dates + if hasattr(self, "start_date") and hasattr(self, "end_date"): + vals["start_date"] = self.start_date + vals["end_date"] = self.end_date + return vals diff --git a/account_invoice_inter_company/models/res_company.py b/account_invoice_inter_company/models/res_company.py new file mode 100644 index 00000000000..6e441dbc1ae --- /dev/null +++ b/account_invoice_inter_company/models/res_company.py @@ -0,0 +1,36 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = "res.company" + + invoice_auto_validation = fields.Boolean( + help="When an invoice is created by a multi company rule " + "for this company, it will automatically validate it", + default=True, + ) + intercompany_invoice_user_id = fields.Many2one( + "res.users", + string="Inter Company Invoice User", + help="Responsible user for creation of invoices triggered by " + "intercompany rules.", + ) + intercompany_invoicing = fields.Boolean( + string="Generate Inter company Invoices", + help="Enable intercompany invoicing: " + "\n* Generate a Customer Invoice when a bill with this company is created." + "\n* Generate a Vendor Bill when an invoice with this company as a customer" + " is created.", + default=True, + ) + + def _get_user_domain(self): + self.ensure_one() + group_account_invoice = self.env.ref("account.group_account_invoice") + return [ + ("id", "!=", self.env.ref("base.user_root").id), + ("company_ids", "=", self.id), + ("id", "in", group_account_invoice.users.ids), + ] diff --git a/account_invoice_inter_company/models/res_config_settings.py b/account_invoice_inter_company/models/res_config_settings.py new file mode 100644 index 00000000000..27cafe88499 --- /dev/null +++ b/account_invoice_inter_company/models/res_config_settings.py @@ -0,0 +1,32 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + invoice_auto_validation = fields.Boolean( + related="company_id.invoice_auto_validation", + string="Invoices Auto Validation", + readonly=False, + help="When an invoice is created by a multi company rule for " + "this company, it will automatically validate it.", + ) + intercompany_invoice_user_id = fields.Many2one( + related="company_id.intercompany_invoice_user_id", + readonly=False, + help="Responsible user for creation of invoices triggered by " + "intercompany rules. If not set the user initiating the" + "transaction will be used", + ) + + intercompany_invoicing = fields.Boolean( + string="Generate Inter company Invoices", + related="company_id.intercompany_invoicing", + help="Enable intercompany invoicing: " + "\n * Generate a Customer Invoice when a bill with this company is created." + "\n * Generate a Vendor Bill when an invoice with this company as a customer" + " is created.", + readonly=False, + ) diff --git a/account_invoice_inter_company/pyproject.toml b/account_invoice_inter_company/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/account_invoice_inter_company/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_invoice_inter_company/readme/CONFIGURE.md b/account_invoice_inter_company/readme/CONFIGURE.md new file mode 100644 index 00000000000..62e6f69d2c2 --- /dev/null +++ b/account_invoice_inter_company/readme/CONFIGURE.md @@ -0,0 +1,9 @@ +To configure this module, you need to go to the menu *Settings \> +General Settings*, go to the tab *Companies / Inter Company OCA +features* + +You now have access to other options *Intercompany user for invoices* and +*Invoice Auto Validation*. + +To customize products sharing don't hesitate to override +\_compute_share_product() in res.company model. diff --git a/account_invoice_inter_company/readme/CONTRIBUTORS.md b/account_invoice_inter_company/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..a8a06c569e7 --- /dev/null +++ b/account_invoice_inter_company/readme/CONTRIBUTORS.md @@ -0,0 +1,16 @@ +- Odoo S.A. (original module inter_company_rules) +- Andrea Stirpe \<\> +- Adria Gil Sorribes \<\> +- Christopher Ormaza \<\> +- Hector Villarreal \<\> +- \`Akretion \<\>\`: + - Chafique Delli \<\> + - Alexis de Lattre \<\> + - David Beal \<\> +- \`Tecnativa \<\>\`: + - Jairo Llopis + - David Vidal + - Pedro M. Baeza +- Isaac Gallart \<\> +- \`Komit \<\>\`: + - Cuong Nguyen Mtm \<\> diff --git a/account_invoice_inter_company/readme/DESCRIPTION.md b/account_invoice_inter_company/readme/DESCRIPTION.md new file mode 100644 index 00000000000..e1c0730017f --- /dev/null +++ b/account_invoice_inter_company/readme/DESCRIPTION.md @@ -0,0 +1,10 @@ +This module is usefull if there are multiple companies in the same Odoo +database and those companies sell goods or services among themselves. It +allow to create an invoice in company A from an invoice in company B. + +Imagine you have company A and company B in the same Odoo database. +First scenario: company B create an invoice with company A as customer. +The module will automate the generation of the supplier invoice in +company A. Second scenario: company A create an invoice with company B +as supplier. The module will automate the generation of the customer +invoice in company B. diff --git a/account_invoice_inter_company/readme/ROADMAP.md b/account_invoice_inter_company/readme/ROADMAP.md new file mode 100644 index 00000000000..5afce697f29 --- /dev/null +++ b/account_invoice_inter_company/readme/ROADMAP.md @@ -0,0 +1,7 @@ +> - This module cannot be fully used in combination with +> remove_odoo_entreprise module. If you need both, uninstall +> remove_odoo_entreprise, complete settings with +> account_invoice_inter_company and then re-install +> remove_odoo_entreprise. +> - Product mapping: would be nice to have a matrix with the products on +> the left side and on the top row the companies. diff --git a/account_invoice_inter_company/static/description/icon.png b/account_invoice_inter_company/static/description/icon.png new file mode 100644 index 00000000000..e432c013653 Binary files /dev/null and b/account_invoice_inter_company/static/description/icon.png differ diff --git a/account_invoice_inter_company/static/description/index.html b/account_invoice_inter_company/static/description/index.html new file mode 100644 index 00000000000..665efab0ca1 --- /dev/null +++ b/account_invoice_inter_company/static/description/index.html @@ -0,0 +1,478 @@ + + + + + +Inter Company Invoices + + + +
+

Inter Company Invoices

+ + +

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

+

This module is usefull if there are multiple companies in the same Odoo +database and those companies sell goods or services among themselves. It +allow to create an invoice in company A from an invoice in company B.

+

Imagine you have company A and company B in the same Odoo database. +First scenario: company B create an invoice with company A as customer. +The module will automate the generation of the supplier invoice in +company A. Second scenario: company A create an invoice with company B +as supplier. The module will automate the generation of the customer +invoice in company B.

+

Table of contents

+ +
+

Configuration

+

To configure this module, you need to go to the menu Settings > General +Settings, go to the tab Companies / Inter Company OCA features

+

You now have access to other options Intercompany user for invoices +and Invoice Auto Validation.

+

To customize products sharing don’t hesitate to override +_compute_share_product() in res.company model.

+
+
+

Known issues / Roadmap

+
+
    +
  • This module cannot be fully used in combination with +remove_odoo_entreprise module. If you need both, uninstall +remove_odoo_entreprise, complete settings with +account_invoice_inter_company and then re-install +remove_odoo_entreprise.
  • +
  • Product mapping: would be nice to have a matrix with the products +on the left side and on the top row the companies.
  • +
+
+
+
+

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

+
    +
  • Odoo SA
  • +
  • Akretion
  • +
+
+
+

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/multi-company project on GitHub.

+

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

+
+
+
+ + diff --git a/account_invoice_inter_company/tests/__init__.py b/account_invoice_inter_company/tests/__init__.py new file mode 100644 index 00000000000..f58d4862c5d --- /dev/null +++ b/account_invoice_inter_company/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2015-2017 Chafique Delli +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_inter_company_invoice diff --git a/account_invoice_inter_company/tests/test_inter_company_invoice.py b/account_invoice_inter_company/tests/test_inter_company_invoice.py new file mode 100644 index 00000000000..5b0314889ab --- /dev/null +++ b/account_invoice_inter_company/tests/test_inter_company_invoice.py @@ -0,0 +1,490 @@ +# Copyright 2015-2017 Chafique Delli +# Copyright 2020 Tecnativa - David Vidal +# Copyright 2020 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import Command +from odoo.exceptions import UserError +from odoo.tests import Form, TransactionCase, tagged + + +@tagged("post_install", "-at_install") +class TestAccountInvoiceInterCompanyBase(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.account_obj = cls.env["account.account"] + cls.account_move_obj = cls.env["account.move"] + + cls.company_a = cls.env["res.company"].create( + { + "name": "Company A", + "invoice_auto_validation": True, + "intercompany_invoicing": True, + } + ) + cls.partner_company_a = cls.env["res.partner"].create( + {"name": cls.company_a.name, "is_company": True} + ) + cls.company_a.partner_id = cls.partner_company_a + cls.company_b = cls.env["res.company"].create( + { + "name": "Company B", + "invoice_auto_validation": True, + "intercompany_invoicing": True, + } + ) + cls.partner_company_b = cls.env["res.partner"].create( + {"name": cls.company_b.name, "is_company": True} + ) + cls.child_partner_company_b = cls.env["res.partner"].create( + { + "name": "Child, Company B", + "is_company": False, + "company_id": False, + "parent_id": cls.partner_company_b.id, + } + ) + cls.company_b.partner_id = cls.partner_company_b + cls.user_company_a = cls.env["res.users"].create( + { + "name": "User A", + "login": "usera", + "company_type": "person", + "email": "usera@yourcompany.com", + "password": "usera_p4S$word", + "company_id": cls.company_a.id, + "company_ids": [(6, 0, [cls.company_a.id])], + "groups_id": [ + ( + 6, + 0, + [ + cls.env.ref("base.group_partner_manager").id, + cls.env.ref("account.group_account_manager").id, + cls.env.ref("account.group_account_readonly").id, + ], + ) + ], + } + ) + cls.user_company_b = cls.env["res.users"].create( + { + "name": "User B", + "login": "userb", + "company_type": "person", + "email": "userb@yourcompany.com", + "password": "userb_p4S$word", + "company_id": cls.company_b.id, + "company_ids": [(6, 0, [cls.company_b.id])], + "groups_id": [ + ( + 6, + 0, + [ + cls.env.ref("base.group_partner_manager").id, + cls.env.ref("account.group_account_manager").id, + ], + ) + ], + } + ) + + cls.a_sale_company_a = cls.account_obj.create( + { + "code": "X2001.A", + "name": "Product Sales - (company A)", + "account_type": "income_other", + "company_ids": [Command.link(cls.company_a.id)], + } + ) + cls.a_expense_company_a = cls.account_obj.create( + { + "code": "X2110.A", + "name": "Expenses - (company A)", + "account_type": "income_other", + "company_ids": [Command.link(cls.company_a.id)], + } + ) + cls.a_bank_company_a = cls.account_obj.create( + { + "code": "512001.A", + "name": "Bank - (company A)", + "account_type": "asset_cash", + "company_ids": [Command.link(cls.company_a.id)], + } + ) + cls.a_recv_company_b = cls.account_obj.create( + { + "code": "X11002.B", + "name": "Debtors - (company B)", + "account_type": "asset_receivable", + "reconcile": "True", + "company_ids": [Command.link(cls.company_b.id)], + } + ) + cls.a_pay_company_b = cls.account_obj.create( + { + "code": "X1111.B", + "name": "Creditors - (company B)", + "account_type": "liability_payable", + "reconcile": "True", + "company_ids": [Command.link(cls.company_b.id)], + } + ) + cls.a_sale_company_b = cls.account_obj.create( + { + "code": "X2001.B", + "name": "Product Sales - (company B)", + "account_type": "income_other", + "company_ids": [Command.link(cls.company_b.id)], + } + ) + cls.a_expense_company_b = cls.account_obj.create( + { + "code": "X2110.B", + "name": "Expenses - (company B)", + "account_type": "expense", + "company_ids": [Command.link(cls.company_b.id)], + } + ) + cls.a_bank_company_b = cls.account_obj.create( + { + "code": "512001.B", + "name": "Bank - (company B)", + "account_type": "asset_cash", + "company_ids": [Command.link(cls.company_b.id)], + } + ) + + cls.sales_journal_company_a = cls.env["account.journal"].create( + { + "name": "Sales Journal - (Company A)", + "code": "SAJ-A", + "type": "sale", + "default_account_id": cls.a_sale_company_a.id, + "company_id": cls.company_a.id, + } + ) + cls.sales_journal_company_b = cls.env["account.journal"].create( + { + "name": "Sales Journal - (Company B)", + "code": "SAJ-A", + "type": "sale", + "default_account_id": cls.a_sale_company_b.id, + "company_id": cls.company_b.id, + } + ) + + cls.bank_journal_company_a = cls.env["account.journal"].create( + { + "name": "Bank Journal - (Company A)", + "code": "BNK-A", + "type": "bank", + "default_account_id": cls.a_sale_company_a.id, + "company_id": cls.company_a.id, + } + ) + cls.misc_journal_company_a = cls.env["account.journal"].create( + { + "name": "Miscellaneous Operations - (Company A)", + "code": "MISC-A", + "type": "general", + "company_id": cls.company_a.id, + } + ) + cls.purchases_journal_company_a = cls.env["account.journal"].create( + { + "name": "Purchases Journal - (Company A)", + "code": "EXJ-B", + "type": "purchase", + "default_account_id": cls.a_expense_company_a.id, + "company_id": cls.company_a.id, + } + ) + cls.purchases_journal_company_b = cls.env["account.journal"].create( + { + "name": "Purchases Journal - (Company B)", + "code": "EXJ-B", + "type": "purchase", + "default_account_id": cls.a_expense_company_b.id, + "company_id": cls.company_b.id, + } + ) + cls.bank_journal_company_b = cls.env["account.journal"].create( + { + "name": "Bank Journal - (Company B)", + "code": "BNK-B", + "type": "bank", + "default_account_id": cls.a_sale_company_b.id, + "company_id": cls.company_b.id, + } + ) + cls.misc_journal_company_b = cls.env["account.journal"].create( + { + "name": "Miscellaneous Operations - (Company B)", + "code": "MISC-B", + "type": "general", + "company_id": cls.company_b.id, + } + ) + cls.product_consultant_multi_company = cls.env.ref( + "account_invoice_inter_company.product_consultant_multi_company" + ) + # if product_multi_company is installed + if "company_ids" in cls.env["product.template"]._fields: + # We have to do that because the default method added a company + cls.product_consultant_multi_company.company_ids = False + + cls.a_recv_company_a = cls.account_obj.create( + { + "code": "X11002.A", + "name": "Debtors - (company A)", + "account_type": "asset_receivable", + "reconcile": "True", + "company_ids": [Command.link(cls.company_a.id)], + } + ) + cls.a_pay_company_a = cls.account_obj.create( + { + "code": "X1111.A", + "name": "Creditors - (company A)", + "account_type": "liability_payable", + "reconcile": "True", + "company_ids": [Command.link(cls.company_a.id)], + } + ) + + cls.partner_company_a.property_account_receivable_id = cls.a_recv_company_a.id + cls.partner_company_a.property_account_payable_id = cls.a_pay_company_a.id + + cls.partner_company_b.with_user( + cls.user_company_a.id + ).property_account_receivable_id = cls.a_recv_company_a.id + cls.partner_company_b.with_user( + cls.user_company_a.id + ).property_account_payable_id = cls.a_pay_company_a.id + cls.partner_company_b.with_user( + cls.user_company_b.id + ).property_account_receivable_id = cls.a_recv_company_b.id + cls.partner_company_b.with_user( + cls.user_company_b.id + ).property_account_payable_id = cls.a_pay_company_b.id + + cls.invoice_company_a = Form( + cls.account_move_obj.with_user(cls.user_company_a.id).with_context( + default_move_type="out_invoice", + ) + ) + cls.invoice_company_a.partner_id = cls.partner_company_b + cls.invoice_company_a.journal_id = cls.sales_journal_company_a + cls.invoice_company_a.payment_reference = "Test Payment Ref" + + with cls.invoice_company_a.invoice_line_ids.new() as line_form: + line_form.product_id = cls.product_consultant_multi_company + line_form.quantity = 1 + line_form.product_uom_id = cls.env.ref("uom.product_uom_hour") + line_form.account_id = cls.a_sale_company_a + line_form.name = "Service Multi Company" + line_form.price_unit = 450.0 + cls.invoice_company_a = cls.invoice_company_a.save() + cls.invoice_line_a = cls.invoice_company_a.invoice_line_ids[0] + + cls.company_a.invoice_auto_validation = True + + cls.product_a = cls.invoice_line_a.product_id + cls.product_a.with_user( + cls.user_company_b.id + ).sudo().property_account_expense_id = cls.a_expense_company_b.id + + +class TestAccountInvoiceInterCompany(TestAccountInvoiceInterCompanyBase): + def test01_user(self): + # Check user of company B (company of destination) + # with which we check the intercompany product + self.assertNotEqual(self.user_company_b.id, 1) + orig_invoice = self.invoice_company_a + dest_company = orig_invoice._find_company_from_invoice_partner() + self.assertEqual(self.user_company_b.company_id, dest_company) + self.assertIn( + self.user_company_b.id, + self.env.ref("account.group_account_invoice").users.ids, + ) + + def test02_product(self): + # Check product is intercompany + for line in self.invoice_company_a.invoice_line_ids: + self.assertFalse(line.product_id.company_id) + + def test03_confirm_invoice_and_cancel(self): + # ensure the catalog is shared + self.env.ref("product.product_comp_rule").write({"active": False}) + # Make sure there are no taxes in target company for the used product + self.product_a.with_user( + self.user_company_b.id + ).sudo().supplier_taxes_id = False + # Confirm the invoice for company A + self.invoice_company_a.with_user(self.user_company_a.id).action_post() + # Check destination invoice created in company B + invoices = self.account_move_obj.with_user(self.user_company_b.id).search( + [("auto_invoice_id", "=", self.invoice_company_a.id)] + ) + self.assertNotEqual(invoices, False) + self.assertEqual(len(invoices), 1) + self.assertEqual(invoices[0].state, "posted") + self.assertEqual( + invoices[0].partner_id, + self.invoice_company_a.company_id.partner_id, + ) + self.assertEqual( + invoices[0].company_id.partner_id, + self.invoice_company_a.partner_id, + ) + self.assertEqual( + invoices[0].payment_reference, self.invoice_company_a.payment_reference + ) + self.assertEqual( + len(invoices[0].invoice_line_ids), + len(self.invoice_company_a.invoice_line_ids), + ) + invoice_line = invoices[0].invoice_line_ids[0] + self.assertEqual( + invoice_line.product_id, + self.invoice_company_a.invoice_line_ids[0].product_id, + ) + # Cancel the invoice for company A + invoice_origin = ( + f"{self.invoice_company_a.company_id.name} - " + f"Canceled Invoice: {self.invoice_company_a.name}" + ) + self.invoice_company_a.with_user(self.user_company_a.id).button_cancel() + # Check invoices after to cancel invoice for company A + self.assertEqual(self.invoice_company_a.state, "cancel") + self.assertEqual(invoices[0].state, "cancel") + self.assertEqual(invoices[0].invoice_origin, invoice_origin) + # Check if keep the invoice number + invoice_number = self.invoice_company_a.name + self.invoice_company_a.with_user(self.user_company_a.id).button_draft() + self.invoice_company_a.with_user(self.user_company_a.id).action_post() + self.assertEqual(self.invoice_company_a.name, invoice_number) + # When the destination invoice is posted we can't modify the origin either + with self.assertRaises(UserError): + self.invoice_company_a.with_context(breakpoint=True).button_draft() + # Check that we can't modify the destination invoice + dest_invoice = self.account_move_obj.search( + [("auto_invoice_id", "=", self.invoice_company_a.id)] + ) + dest_invoice.button_draft() + with self.assertRaises(UserError): + move_form = Form(dest_invoice) + with move_form.invoice_line_ids.edit(0) as line_form: + line_form.price_unit = 33.3 + move_form.save() + + def test_confirm_invoice_with_child_partner(self): + # ensure the catalog is shared + self.env.ref("product.product_comp_rule").write({"active": False}) + # When a contact of the company is defined as partner, + # it also must trigger the intercompany workflow + self.invoice_company_a.write({"partner_id": self.child_partner_company_b.id}) + # Confirm the invoice for company A + self.invoice_company_a.with_user(self.user_company_a.id).action_post() + # Check destination invoice created in company B + invoices = self.account_move_obj.with_user(self.user_company_b.id).search( + [("auto_invoice_id", "=", self.invoice_company_a.id)] + ) + self.assertEqual(len(invoices), 1) + + def test_confirm_invoice_with_native_product_rule_and_shared_product(self): + """With native security rule, products with access in both companies + must be present in parent and child invoices. + """ + # ensure the catalog is shared even if product is in other company + self.env.ref("product.product_comp_rule").write({"active": True}) + # Product is set to a specific company + self.product_a.sudo().write({"company_id": False}) + # If product_multi_company is installed + if "company_ids" in dir(self.product_a): + self.product_a.sudo().write({"company_ids": [(5, 0, 0)]}) + invoices = self._confirm_invoice_with_product() + self.assertEqual(invoices.invoice_line_ids[0].product_id, self.product_a) + + def test_confirm_invoice_with_native_product_rule_and_unshared_product(self): + """With native security rule, products with no access in both companies + must prevent child invoice creation. + """ + # ensure the catalog is shared even if product is in other company + self.env.ref("product.product_comp_rule").write({"active": True}) + # Product is set to a specific company + self.product_a.sudo().write({"company_id": self.company_a.id}) + # If product_multi_company is installed + if "company_ids" in dir(self.product_a): + self.product_a.sudo().write({"company_ids": [(6, 0, [self.company_a.id])]}) + with self.assertRaises(UserError): + self._confirm_invoice_with_product() + + def test_purchase_attachement_out_invoice(self): + # Sale Invoice PDF appears as attachment in the purchase invoice form. + # From a Sale Invoice. + self.invoice_company_a.action_post() + invoice_company_b = self.account_move_obj.with_user( + self.user_company_b.id + ).search([("auto_invoice_id", "=", self.invoice_company_a.id)]) + invoice_b_pdf = self.env["ir.attachment"].search( + [("res_model", "=", "account.move"), ("res_id", "=", invoice_company_b.id)] + ) + self.assertEqual(len(invoice_b_pdf), 1) + self.assertEqual(invoice_b_pdf.name, self.invoice_company_a.name + ".pdf") + + def test_purchase_attachement_in_invoice(self): + # Sale Invoice PDF appears as attachment in the purchase invoice form. + # From a Purchase Invoice. + bill_company_a = Form( + self.account_move_obj.with_company(self.company_a.id).with_context( + default_move_type="in_invoice", + ) + ) + bill_company_a.partner_id = self.partner_company_b + bill_company_a.invoice_date = bill_company_a.date + with bill_company_a.invoice_line_ids.new() as line_form: + line_form.product_id = self.product_consultant_multi_company + line_form.quantity = 1 + line_form.product_uom_id = self.env.ref("uom.product_uom_hour") + line_form.price_unit = 450.0 + bill_company_a = bill_company_a.save() + bill_company_a.action_post() + + invoice_company_b = self.account_move_obj.with_user( + self.user_company_b.id + ).search([("auto_invoice_id", "=", bill_company_a.id)]) + bill_a_pdf = self.env["ir.attachment"].search( + [("res_model", "=", "account.move"), ("res_id", "=", bill_company_a.id)] + ) + self.assertEqual(len(bill_a_pdf), 1) + self.assertEqual(bill_a_pdf.name, invoice_company_b.name + ".pdf") + invoice_company_b.button_cancel() + invoice_company_b.button_draft() + invoice_company_b.action_post() + + def _confirm_invoice_with_product(self): + # Confirm the invoice for company A + self.invoice_company_a.with_user(self.user_company_a.id).action_post() + # Check destination invoice created in company B + invoices = self.account_move_obj.with_user(self.user_company_b.id).search( + [("auto_invoice_id", "=", self.invoice_company_a.id)] + ) + self.assertEqual(len(invoices), 1) + return invoices + + def test_confirm_invoice_intercompany_disabled(self): + # ensure the catalog is shared + self.env.ref("product.product_comp_rule").write({"active": False}) + # Disable the configuration in company A + self.company_a.intercompany_invoicing = False + # Confirm the invoice of company A + self.invoice_company_a.with_user(self.user_company_a.id).action_post() + # Check that no destination invoice has been created in company B + invoices = self.account_move_obj.with_user(self.user_company_b.id).search( + [("auto_invoice_id", "=", self.invoice_company_a.id)] + ) + self.assertFalse(invoices) diff --git a/account_invoice_inter_company/views/account_move_views.xml b/account_invoice_inter_company/views/account_move_views.xml new file mode 100644 index 00000000000..798a2fcc67a --- /dev/null +++ b/account_invoice_inter_company/views/account_move_views.xml @@ -0,0 +1,16 @@ + + + + account.move.form - HACK: Extra fields for odoo.tests.Form() to work + account.move + + primary + + + + + + + diff --git a/account_invoice_inter_company/views/res_config_settings_view.xml b/account_invoice_inter_company/views/res_config_settings_view.xml new file mode 100644 index 00000000000..793a49a1696 --- /dev/null +++ b/account_invoice_inter_company/views/res_config_settings_view.xml @@ -0,0 +1,57 @@ + + + + res.config.settings + + + + 1 + + + +
Invoice
+
+
+
+
+
+
+
+
+
+
+
+
+