diff --git a/README.md b/README.md index 293c9ed6a7..9683e2380b 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ addon | version | maintainers | summary --- | --- | --- | --- [contract](contract/) | 19.0.1.0.2 | | Recurring - Contracts Management [contract_analytic_tag](contract_analytic_tag/) | 19.0.1.0.0 | victoralmau | Contract Analytic Tag +[contract_sale](contract_sale/) | 19.0.1.0.0 | | Contract from Sale +[contract_update_last_date_invoiced](contract_update_last_date_invoiced/) | 19.0.1.0.0 | rafaelbn Andrii9090 | This module allows to update the last date invoiced if invoices are deleted. [contract_variable_quantity](contract_variable_quantity/) | 19.0.1.0.0 | | Variable quantity in contract recurrent invoicing [subscription_oca](subscription_oca/) | 19.0.1.1.3 | | Generate recurring invoices. diff --git a/contract_sale/README.rst b/contract_sale/README.rst new file mode 100644 index 0000000000..9f730ab6a3 --- /dev/null +++ b/contract_sale/README.rst @@ -0,0 +1,100 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +================== +Contract from Sale +================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:95f0bfd97f75f7aad9750404d3ba010b0b1c668cada84fc69921412600108424 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/license-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%2Fcontract-lightgray.png?logo=github + :target: https://github.com/OCA/contract/tree/19.0/contract_sale + :alt: OCA/contract +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/contract-19-0/contract-19-0-contract_sale + :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/contract&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows access to contracts for sale employees without +account permissions. + +Employees in sale security group "User: Only Own Documents", can only +access contracts created by themselves. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +1. Log with an user having sale but not account permissions. +2. Go to Sales > Sales > Contracts. +3. Create a new record or edit another one. + +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 +------- + +* Tecnativa + +Contributors +------------ + +- `Tecnativa `__: + + - Luis M. Ontalba + - Pedro M. Baeza + - Víctor Martínez + +- Levent Karakaş +- Bejaoui Souheil +- Dhara Solanki +- Joan Mateu + +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/contract `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/contract_sale/__init__.py b/contract_sale/__init__.py new file mode 100644 index 0000000000..b409d31914 --- /dev/null +++ b/contract_sale/__init__.py @@ -0,0 +1 @@ +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html diff --git a/contract_sale/__manifest__.py b/contract_sale/__manifest__.py new file mode 100644 index 0000000000..c80dd95f5e --- /dev/null +++ b/contract_sale/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2017 Tecnativa - Luis M. Ontalba +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + "name": "Contract from Sale", + "version": "19.0.1.0.0", + "category": "Sales", + "author": "Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/contract", + "depends": ["sale", "contract"], + "development_status": "Production/Stable", + "data": [ + "security/ir.model.access.csv", + "security/contract_security.xml", + "views/contract.xml", + "views/res_partner_view.xml", + ], + "license": "AGPL-3", + "installable": True, + "auto_install": False, +} diff --git a/contract_sale/i18n/ca_ES.po b/contract_sale/i18n/ca_ES.po new file mode 100644 index 0000000000..11f9aa8a3f --- /dev/null +++ b/contract_sale/i18n/ca_ES.po @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ca_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" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "" diff --git a/contract_sale/i18n/contract_sale.pot b/contract_sale/i18n/contract_sale.pot new file mode 100644 index 0000000000..606f5c301c --- /dev/null +++ b/contract_sale/i18n/contract_sale.pot @@ -0,0 +1,19 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "" diff --git a/contract_sale/i18n/de.po b/contract_sale/i18n/de.po new file mode 100644 index 0000000000..64be3f993e --- /dev/null +++ b/contract_sale/i18n/de.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: OCA Transbot , 2017\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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Verträge" diff --git a/contract_sale/i18n/es.po b/contract_sale/i18n/es.po new file mode 100644 index 0000000000..c8c60ca94a --- /dev/null +++ b/contract_sale/i18n/es.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-10-12 10:50+0000\n" +"PO-Revision-Date: 2017-10-12 10:50+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contratos" diff --git a/contract_sale/i18n/es_AR.po b/contract_sale/i18n/es_AR.po new file mode 100644 index 0000000000..9658bb7230 --- /dev/null +++ b/contract_sale/i18n/es_AR.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-24 20:47+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 4.3.2\n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contratos" diff --git a/contract_sale/i18n/es_CL.po b/contract_sale/i18n/es_CL.po new file mode 100644 index 0000000000..84fb101ad4 --- /dev/null +++ b/contract_sale/i18n/es_CL.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-05-07 20:19+0000\n" +"Last-Translator: Maxime Chambreuil \n" +"Language-Team: none\n" +"Language: es_CL\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 3.10\n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contratos" diff --git a/contract_sale/i18n/fr.po b/contract_sale/i18n/fr.po new file mode 100644 index 0000000000..de78e992dc --- /dev/null +++ b/contract_sale/i18n/fr.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-10 16:04+0000\n" +"PO-Revision-Date: 2024-02-10 16:04+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contrats" diff --git a/contract_sale/i18n/gl.po b/contract_sale/i18n/gl.po new file mode 100644 index 0000000000..139fe4856e --- /dev/null +++ b/contract_sale/i18n/gl.po @@ -0,0 +1,23 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-05-29 10:00+0000\n" +"PO-Revision-Date: 2019-02-04 18:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \n" +"Language-Team: none\n" +"Language: gl\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 3.4\n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contratos" diff --git a/contract_sale/i18n/hi_IN.po b/contract_sale/i18n/hi_IN.po new file mode 100644 index 0000000000..3c9f943933 --- /dev/null +++ b/contract_sale/i18n/hi_IN.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Ashish Deshmukh , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Ashish Deshmukh , 2017\n" +"Language-Team: Hindi (India) (https://www.transifex.com/oca/teams/23907/" +"hi_IN/)\n" +"Language: hi_IN\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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "अनुबंध" diff --git a/contract_sale/i18n/hr.po b/contract_sale/i18n/hr.po new file mode 100644 index 0000000000..1b2ca313b3 --- /dev/null +++ b/contract_sale/i18n/hr.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\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" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Ugovori" diff --git a/contract_sale/i18n/hr_HR.po b/contract_sale/i18n/hr_HR.po new file mode 100644 index 0000000000..8f522776d9 --- /dev/null +++ b/contract_sale/i18n/hr_HR.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_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" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Ugovori" diff --git a/contract_sale/i18n/it.po b/contract_sale/i18n/it.po new file mode 100644 index 0000000000..17f68c3d5d --- /dev/null +++ b/contract_sale/i18n/it.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Lorenzo Battistini , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Lorenzo Battistini , 2017\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\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" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contratti" diff --git a/contract_sale/i18n/nl.po b/contract_sale/i18n/nl.po new file mode 100644 index 0000000000..7a0e4ed55d --- /dev/null +++ b/contract_sale/i18n/nl.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Erwin van der Ploeg , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Erwin van der Ploeg , 2017\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"Language: nl\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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contracten" diff --git a/contract_sale/i18n/nl_NL.po b/contract_sale/i18n/nl_NL.po new file mode 100644 index 0000000000..db5aede488 --- /dev/null +++ b/contract_sale/i18n/nl_NL.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contracten" diff --git a/contract_sale/i18n/pt.po b/contract_sale/i18n/pt.po new file mode 100644 index 0000000000..be60d87bce --- /dev/null +++ b/contract_sale/i18n/pt.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Pedro Castro Silva , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Pedro Castro Silva , " +"2017\n" +"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" +"Language: pt\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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contratos" diff --git a/contract_sale/i18n/pt_BR.po b/contract_sale/i18n/pt_BR.po new file mode 100644 index 0000000000..1ed828aa77 --- /dev/null +++ b/contract_sale/i18n/pt_BR.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Albert Vonpupp , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Albert Vonpupp , 2017\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contratos" diff --git a/contract_sale/i18n/ro.po b/contract_sale/i18n/ro.po new file mode 100644 index 0000000000..b4e2c771a7 --- /dev/null +++ b/contract_sale/i18n/ro.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Dorin Hongu , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-06 03:17+0000\n" +"PO-Revision-Date: 2018-01-06 03:17+0000\n" +"Last-Translator: Dorin Hongu , 2018\n" +"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contracte" diff --git a/contract_sale/i18n/ru.po b/contract_sale/i18n/ru.po new file mode 100644 index 0000000000..0262142926 --- /dev/null +++ b/contract_sale/i18n/ru.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Мед Ведь , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Мед Ведь , 2017\n" +"Language-Team: Russian (https://www.transifex.com/oca/teams/23907/ru/)\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " +"(n%100>=11 && n%100<=14)? 2 : 3);\n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Договоры" diff --git a/contract_sale/i18n/sv.po b/contract_sale/i18n/sv.po new file mode 100644 index 0000000000..bf643b8f1e --- /dev/null +++ b/contract_sale/i18n/sv.po @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "" diff --git a/contract_sale/i18n/tr.po b/contract_sale/i18n/tr.po new file mode 100644 index 0000000000..097f31abdf --- /dev/null +++ b/contract_sale/i18n/tr.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Ediz Duman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Ediz Duman , 2017\n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" +"Language: tr\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: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Sözleşmeler" diff --git a/contract_sale/i18n/tr_TR.po b/contract_sale/i18n/tr_TR.po new file mode 100644 index 0000000000..314ba2013a --- /dev/null +++ b/contract_sale/i18n/tr_TR.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +# Translators: +# Ediz Duman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 01:41+0000\n" +"PO-Revision-Date: 2017-11-30 01:41+0000\n" +"Last-Translator: Ediz Duman , 2017\n" +"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/" +"tr_TR/)\n" +"Language: tr_TR\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" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Sözleşmeler" diff --git a/contract_sale/i18n/zh_CN.po b/contract_sale/i18n/zh_CN.po new file mode 100644 index 0000000000..a825b03236 --- /dev/null +++ b/contract_sale/i18n/zh_CN.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-09-05 19:23+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\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.8\n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "合同" diff --git a/contract_sale/pyproject.toml b/contract_sale/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/contract_sale/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/contract_sale/readme/CONTRIBUTORS.md b/contract_sale/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..7cbcb807fa --- /dev/null +++ b/contract_sale/readme/CONTRIBUTORS.md @@ -0,0 +1,8 @@ +- [Tecnativa](https://www.tecnativa.com): + - Luis M. Ontalba + - Pedro M. Baeza + - Víctor Martínez +- Levent Karakaş +- Bejaoui Souheil \<\> +- Dhara Solanki \<\> +- Joan Mateu \<\> diff --git a/contract_sale/readme/DESCRIPTION.md b/contract_sale/readme/DESCRIPTION.md new file mode 100644 index 0000000000..aeb5e2468e --- /dev/null +++ b/contract_sale/readme/DESCRIPTION.md @@ -0,0 +1,5 @@ +This module allows access to contracts for sale employees without +account permissions. + +Employees in sale security group "User: Only Own Documents", can only +access contracts created by themselves. diff --git a/contract_sale/readme/USAGE.md b/contract_sale/readme/USAGE.md new file mode 100644 index 0000000000..31177f0726 --- /dev/null +++ b/contract_sale/readme/USAGE.md @@ -0,0 +1,3 @@ +1. Log with an user having sale but not account permissions. +2. Go to Sales \> Sales \> Contracts. +3. Create a new record or edit another one. diff --git a/contract_sale/security/contract_security.xml b/contract_sale/security/contract_security.xml new file mode 100644 index 0000000000..8d84fd9a3d --- /dev/null +++ b/contract_sale/security/contract_security.xml @@ -0,0 +1,23 @@ + + + + See Own Contracts + + ['|', ('user_id','=',user.id), ('user_id','=',False)] + + + + See All Contracts + + [(1,'=',1)] + + + diff --git a/contract_sale/security/ir.model.access.csv b/contract_sale/security/ir.model.access.csv new file mode 100644 index 0000000000..b38bf505c7 --- /dev/null +++ b/contract_sale/security/ir.model.access.csv @@ -0,0 +1,13 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"contract_template_salesman","Recurring Salesman","contract.model_contract_template","sales_team.group_sale_salesman",1,1,1,0 +"contract_template_sale_manager","Recurring Sale Manager","contract.model_contract_template","sales_team.group_sale_manager",1,1,1,1 +"contract_line_saleman","Recurring Invoice Line Saleman","contract.model_contract_line","sales_team.group_sale_salesman",1,1,1,0 +"contract_modification_salesman","Contract Modification Salesman","contract.model_contract_modification","sales_team.group_sale_salesman",1,1,1,0 +"contract_line_manager","Recurring Invoice Line Manager","contract.model_contract_line","sales_team.group_sale_manager",1,1,1,1 +"contract_template_line_salesman","Recurring Contract Line Salesman","contract.model_contract_template_line","sales_team.group_sale_salesman",1,1,1,0 +"contract_template_line_manager","Recurring Contract Line Manager","contract.model_contract_template_line","sales_team.group_sale_manager",1,1,1,1 +"account_analytic_line_contract_salesman","Recurring Analytic Line Salesman","analytic.model_account_analytic_line","sales_team.group_sale_salesman",1,1,1,0 +"contract_contract_salesman","Recurring Analytic Account Salesman","contract.model_contract_contract","sales_team.group_sale_salesman",1,1,1,0 +"model_account_analytic_plan_contract_salesman","Recurring Account Analytic Tag Salesman","analytic.model_account_analytic_plan","sales_team.group_sale_salesman",1,1,1,0 +"account_move_contract_salesman","Recurring Account Invoice Salesman","account.model_account_move","sales_team.group_sale_salesman",1,0,0,0 +"account_journal_contract_salesman","Recurring Account Journal Salesman","account.model_account_journal","sales_team.group_sale_salesman",1,0,0,0 diff --git a/contract_sale/static/description/icon.png b/contract_sale/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/contract_sale/static/description/icon.png differ diff --git a/contract_sale/static/description/index.html b/contract_sale/static/description/index.html new file mode 100644 index 0000000000..aa5f222e25 --- /dev/null +++ b/contract_sale/static/description/index.html @@ -0,0 +1,450 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Contract from Sale

+ +

Production/Stable License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runboat

+

This module allows access to contracts for sale employees without +account permissions.

+

Employees in sale security group “User: Only Own Documents”, can only +access contracts created by themselves.

+

Table of contents

+ +
+

Usage

+
    +
  1. Log with an user having sale but not account permissions.
  2. +
  3. Go to Sales > Sales > Contracts.
  4. +
  5. Create a new record or edit another one.
  6. +
+
+
+

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

+
    +
  • Tecnativa
  • +
+
+
+

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

+

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

+
+
+
+
+ + diff --git a/contract_sale/tests/__init__.py b/contract_sale/tests/__init__.py new file mode 100644 index 0000000000..81bd544465 --- /dev/null +++ b/contract_sale/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2022 ForgeFlow - Joan Mateu +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_sale_contract diff --git a/contract_sale/tests/test_sale_contract.py b/contract_sale/tests/test_sale_contract.py new file mode 100644 index 0000000000..4a1395169f --- /dev/null +++ b/contract_sale/tests/test_sale_contract.py @@ -0,0 +1,122 @@ +# Copyright 2022 ForgeFlow - Joan Mateu +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) + +from odoo import Command + +from odoo.addons.base.tests.common import BaseCommon + + +class TestSaleContract(BaseCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + + cls.user_sales_all_documents = cls.env["res.users"].create( + { + "name": "user rights all documents ", + "login": "test1", + "group_ids": [ + Command.set( + cls.env.ref("sales_team.group_sale_salesman_all_leads").ids + ) + ], + } + ) + cls.user_sales_own_documents = cls.env["res.users"].create( + { + "name": "user rights own documents ", + "login": "test2", + "group_ids": [ + Command.set(cls.env.ref("sales_team.group_sale_salesman").ids) + ], + } + ) + + cls.pricelist = cls.env["product.pricelist"].create( + {"name": "pricelist for contract test"} + ) + + cls.partner = cls.env["res.partner"].create( + { + "name": "Test contract partner", + "property_product_pricelist": cls.pricelist.id, + } + ) + + def _create_contract(self, user): + self.contract = ( + self.env["contract.contract"] + .with_user(user) + .create( + { + "name": "Test Contract", + "partner_id": self.partner.id, + "pricelist_id": self.partner.property_product_pricelist.id, + "line_recurrence": False, + "contract_type": "sale", + "recurring_interval": 1, + "recurring_rule_type": "monthly", + "date_start": "2018-02-15", + "contract_line_ids": [], + } + ) + ) + + def test_01_create_contract_with_sale_perm_not_acc(self): + self._create_contract(self.user_sales_all_documents) + + contracts = ( + self.env["contract.contract"] + .with_user(self.user_sales_all_documents) + .search([]) + ) + self.assertEqual(len(contracts), 1) + + def test_02_see_just_own_contracts(self): + self._create_contract(self.user_sales_all_documents) + self._create_contract(self.user_sales_all_documents) + self._create_contract(self.user_sales_own_documents) + self._create_contract(self.user_sales_own_documents) + + contracts = ( + self.env["contract.contract"] + .with_user(self.user_sales_own_documents) + .search([]) + ) + self.assertEqual(len(contracts), 2) + + def test_03_see_all_contracts(self): + self._create_contract(self.user_sales_all_documents) + self._create_contract(self.user_sales_all_documents) + self._create_contract(self.user_sales_own_documents) + self._create_contract(self.user_sales_own_documents) + contracts = ( + self.env["contract.contract"] + .with_user(self.user_sales_all_documents) + .search([]) + ) + self.assertEqual(len(contracts), 4) + + def test_04_edit_existing_contract(self): + self._create_contract(self.user_sales_own_documents) + contract_modify = ( + self.env["contract.contract"] + .with_user(self.user_sales_own_documents) + .search([]) + ) + self.assertEqual(len(contract_modify), 1) + self.assertEqual(contract_modify.name, "Test Contract") + + self.env["contract.contract"].with_user(self.user_sales_own_documents).search( + [] + ).write( + { + "name": "Test_contract_to_modify", + } + ) + contract_modify = ( + self.env["contract.contract"] + .with_user(self.user_sales_own_documents) + .search([]) + ) + self.assertEqual(contract_modify.name, "Test_contract_to_modify") diff --git a/contract_sale/views/contract.xml b/contract_sale/views/contract.xml new file mode 100644 index 0000000000..d27ed1b8c6 --- /dev/null +++ b/contract_sale/views/contract.xml @@ -0,0 +1,11 @@ + + + + diff --git a/contract_sale/views/res_partner_view.xml b/contract_sale/views/res_partner_view.xml new file mode 100644 index 0000000000..3b660dbc62 --- /dev/null +++ b/contract_sale/views/res_partner_view.xml @@ -0,0 +1,15 @@ + + + + + res.partner + + + + + + + + + + diff --git a/contract_update_last_date_invoiced/README.rst b/contract_update_last_date_invoiced/README.rst new file mode 100644 index 0000000000..32d9da96c7 --- /dev/null +++ b/contract_update_last_date_invoiced/README.rst @@ -0,0 +1,111 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +========================= +Contract Last Date Update +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f6f4bab935468853faa69778983b570cd06daf35aa709fedfed13c41e40e4034 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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%2Fcontract-lightgray.png?logo=github + :target: https://github.com/OCA/contract/tree/19.0/contract_update_last_date_invoiced + :alt: OCA/contract +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/contract-19-0/contract-19-0-contract_update_last_date_invoiced + :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/contract&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows users to update the last date invoiced (e.g.: +deletion of invoices). + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +- Go to Invoicing > Customers > Customer Contracts +- Select a contract and click on contract line, in the pop-up is a + button ``Update Last Date Invoiced`` +- Fill in the last date invoiced with the desired value + +Note: Make sure the user has the permissions "Contract: Can update last +date invoiced". + +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 +------- + +* ACSONE SA/NV + +Contributors +------------ + +- Souheil Bejaoui +- Denis Roussel +- `Moduon `__: + + - Eduardo López + +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia + +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. + +.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px + :target: https://github.com/rafaelbn + :alt: rafaelbn +.. |maintainer-Andrii9090| image:: https://github.com/Andrii9090.png?size=40px + :target: https://github.com/Andrii9090 + :alt: Andrii9090 + +Current `maintainers `__: + +|maintainer-rafaelbn| |maintainer-Andrii9090| + +This module is part of the `OCA/contract `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/contract_update_last_date_invoiced/__init__.py b/contract_update_last_date_invoiced/__init__.py new file mode 100644 index 0000000000..aee8895e7a --- /dev/null +++ b/contract_update_last_date_invoiced/__init__.py @@ -0,0 +1,2 @@ +from . import models +from . import wizards diff --git a/contract_update_last_date_invoiced/__manifest__.py b/contract_update_last_date_invoiced/__manifest__.py new file mode 100644 index 0000000000..5e6a5e5295 --- /dev/null +++ b/contract_update_last_date_invoiced/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2022 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Contract Last Date Update", + "summary": """ + This module allows to update the last date invoiced if invoices are deleted.""", + "version": "19.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/contract", + "depends": ["contract"], + "data": [ + "security/security.xml", + "views/contract_views.xml", + "views/contract_line.xml", + "wizards/update_last_date_invoiced.xml", + ], + "maintainers": ["rafaelbn", "Andrii9090"], +} diff --git a/contract_update_last_date_invoiced/i18n/contract_update_last_date_invoiced.pot b/contract_update_last_date_invoiced/i18n/contract_update_last_date_invoiced.pot new file mode 100644 index 0000000000..1cdd2917e2 --- /dev/null +++ b/contract_update_last_date_invoiced/i18n/contract_update_last_date_invoiced.pot @@ -0,0 +1,89 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_update_last_date_invoiced +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.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: contract_update_last_date_invoiced +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +msgid "Cancel" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_line +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__contract_line_id +msgid "Contract Line" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:res.groups,name:contract_update_last_date_invoiced.group_contract_line_update_last_date_invoiced +msgid "Contract: Can update last date invoiced" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_uid +msgid "Created by" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_date +msgid "Created on" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__recurring_next_date +msgid "Date of Next Invoice" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_line__display_name +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__display_name +msgid "Display Name" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_line__id +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__id +msgid "ID" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__last_date_invoiced +msgid "Last Date Invoiced" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_date +msgid "Last Updated on" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_update_last_date_invoiced +msgid "Update Contract Last Date Invoiced Wizard" +msgstr "" + +#. module: contract_update_last_date_invoiced +#. odoo-python +#: code:addons/contract_update_last_date_invoiced/models/contract_line.py:0 +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +msgid "Update Invoice Dates" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_line_form_view +msgid "Update Last Date Invoiced" +msgstr "" diff --git a/contract_update_last_date_invoiced/i18n/es.po b/contract_update_last_date_invoiced/i18n/es.po new file mode 100644 index 0000000000..3e0a409f44 --- /dev/null +++ b/contract_update_last_date_invoiced/i18n/es.po @@ -0,0 +1,87 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_update_last_date_invoiced +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-11-13 13:07+0000\n" +"PO-Revision-Date: 2025-11-13 14:07+0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.5\n" + +#. module: contract_update_last_date_invoiced +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +msgid "Cancel" +msgstr "Cancelar" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_line +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__contract_line_id +msgid "Contract Line" +msgstr "Línea de contrato" + +#. module: contract_update_last_date_invoiced +#: model:res.groups,name:contract_update_last_date_invoiced.group_contract_line_update_last_date_invoiced +msgid "Contract: Can update last date invoiced" +msgstr "Contrato: Puede actualizar la última fecha facturada" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__recurring_next_date +msgid "Date of Next Invoice" +msgstr "Fecha de la siguiente factura" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__display_name +msgid "Display Name" +msgstr "Mostrar Nombre" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__id +msgid "ID" +msgstr "ID (identificación)" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__last_date_invoiced +msgid "Last Date Invoiced" +msgstr "Última Fecha Facturada" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_uid +msgid "Last Updated by" +msgstr "Última Actualización por" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_date +msgid "Last Updated on" +msgstr "Última Actualización el" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_update_last_date_invoiced +msgid "Update Contract Last Date Invoiced Wizard" +msgstr "Asistente de Actualización de la Última Fecha de Facturación del Contrato" + +#. module: contract_update_last_date_invoiced +#. odoo-python +#: code:addons/contract_update_last_date_invoiced/models/contract_line.py:0 +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_line_form_view +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +msgid "Update Invoice Dates" +msgstr "Actualizar fechas de factura" diff --git a/contract_update_last_date_invoiced/i18n/fr.po b/contract_update_last_date_invoiced/i18n/fr.po new file mode 100644 index 0000000000..48f875a669 --- /dev/null +++ b/contract_update_last_date_invoiced/i18n/fr.po @@ -0,0 +1,92 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_update_last_date_invoiced +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-11-04 16:45+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: none\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" +"X-Generator: Weblate 4.14.1\n" + +#. module: contract_update_last_date_invoiced +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +msgid "Cancel" +msgstr "Annuler" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_line +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__contract_line_id +msgid "Contract Line" +msgstr "Ligne de contrat" + +#. module: contract_update_last_date_invoiced +#: model:res.groups,name:contract_update_last_date_invoiced.group_contract_line_update_last_date_invoiced +msgid "Contract: Can update last date invoiced" +msgstr "Contrat: Peut mettre à jour la dernière date facturée" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__id +msgid "ID" +msgstr "" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__last_date_invoiced +msgid "Last Date Invoiced" +msgstr "Dernière date facturée" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_date +msgid "Last Updated on" +msgstr "Mis à jour le" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__recurring_next_date +msgid "Recurring Next Date" +msgstr "Date de la prochaine facture" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_update_last_date_invoiced +msgid "Update Contract Last Date Invoiced Wizard" +msgstr "Assistant de mise à jour de la dernière date facturée" + +#. module: contract_update_last_date_invoiced +#. odoo-python +#: code:addons/contract_update_last_date_invoiced/models/contract_line.py:0 +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_line_form_view +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +#, python-format +msgid "Update Last Date Invoiced" +msgstr "Mettre à jour la dernière date facturée" diff --git a/contract_update_last_date_invoiced/i18n/it.po b/contract_update_last_date_invoiced/i18n/it.po new file mode 100644 index 0000000000..8ebfbef5c1 --- /dev/null +++ b/contract_update_last_date_invoiced/i18n/it.po @@ -0,0 +1,92 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_update_last_date_invoiced +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-12-21 14: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: contract_update_last_date_invoiced +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +msgid "Cancel" +msgstr "Annulla" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_line +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__contract_line_id +msgid "Contract Line" +msgstr "Riga contratto" + +#. module: contract_update_last_date_invoiced +#: model:res.groups,name:contract_update_last_date_invoiced.group_contract_line_update_last_date_invoiced +msgid "Contract: Can update last date invoiced" +msgstr "Contratto: si può aggiornare l'ultima data fatturata" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__id +msgid "ID" +msgstr "ID" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__last_date_invoiced +msgid "Last Date Invoiced" +msgstr "Ultima data fatturata" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__recurring_next_date +msgid "Recurring Next Date" +msgstr "Data ricorrente successiva" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_update_last_date_invoiced +msgid "Update Contract Last Date Invoiced Wizard" +msgstr "Procedura guidata aggiornamento ultima data contratto fatturata" + +#. module: contract_update_last_date_invoiced +#. odoo-python +#: code:addons/contract_update_last_date_invoiced/models/contract_line.py:0 +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_line_form_view +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +#, python-format +msgid "Update Last Date Invoiced" +msgstr "Aggiorna ultima data fatturata" diff --git a/contract_update_last_date_invoiced/i18n/nl.po b/contract_update_last_date_invoiced/i18n/nl.po new file mode 100644 index 0000000000..3624540deb --- /dev/null +++ b/contract_update_last_date_invoiced/i18n/nl.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_update_last_date_invoiced +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-12-29 17:49+0000\n" +"Last-Translator: Bosd \n" +"Language-Team: none\n" +"Language: nl\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.10.4\n" + +#. module: contract_update_last_date_invoiced +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +msgid "Cancel" +msgstr "Annuleren" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_line +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__contract_line_id +msgid "Contract Line" +msgstr "Contractregel" + +#. module: contract_update_last_date_invoiced +#: model:res.groups,name:contract_update_last_date_invoiced.group_contract_line_update_last_date_invoiced +msgid "Contract: Can update last date invoiced" +msgstr "Contract: Kan laatste factuurdatum bijwerken" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_uid +msgid "Created by" +msgstr "Aangemaakt door" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__create_date +msgid "Created on" +msgstr "Aangemaakt op" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__recurring_next_date +msgid "Date of Next Invoice" +msgstr "Datum van volgende factuur" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__display_name +msgid "Display Name" +msgstr "Schermnaam" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__id +msgid "ID" +msgstr "ID" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__last_date_invoiced +msgid "Last Date Invoiced" +msgstr "Laatste factuurdatum" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_uid +msgid "Last Updated by" +msgstr "Laatst bijgewerkt door" + +#. module: contract_update_last_date_invoiced +#: model:ir.model.fields,field_description:contract_update_last_date_invoiced.field_contract_update_last_date_invoiced__write_date +msgid "Last Updated on" +msgstr "Laatst bijgewerkt op" + +#. module: contract_update_last_date_invoiced +#: model:ir.model,name:contract_update_last_date_invoiced.model_contract_update_last_date_invoiced +msgid "Update Contract Last Date Invoiced Wizard" +msgstr "Wizard laatste factuurdatum contract bijwerken" + +#. module: contract_update_last_date_invoiced +#. odoo-python +#: code:addons/contract_update_last_date_invoiced/models/contract_line.py:0 +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_line_form_view +#: model_terms:ir.ui.view,arch_db:contract_update_last_date_invoiced.contract_update_last_date_invoiced_wizard_form_view +msgid "Update Invoice Dates" +msgstr "Factuurdata bijwerken" diff --git a/contract_update_last_date_invoiced/models/__init__.py b/contract_update_last_date_invoiced/models/__init__.py new file mode 100644 index 0000000000..6143a36501 --- /dev/null +++ b/contract_update_last_date_invoiced/models/__init__.py @@ -0,0 +1 @@ +from . import contract_line diff --git a/contract_update_last_date_invoiced/models/contract_line.py b/contract_update_last_date_invoiced/models/contract_line.py new file mode 100644 index 0000000000..bb56bc5e02 --- /dev/null +++ b/contract_update_last_date_invoiced/models/contract_line.py @@ -0,0 +1,35 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class ContractLine(models.Model): + _inherit = "contract.line" + + def action_update_last_date_invoiced(self): + self.ensure_one() + context = { + "default_contract_line_id": self.id, + "default_last_date_invoiced": self.last_date_invoiced, + "default_recurring_next_date": self.recurring_next_date, + } + context.update(self.env.context) + return { + "type": "ir.actions.act_window", + "name": self.env._("Update Invoice Dates"), + "res_model": "contract.update.last.date.invoiced", + "view_mode": "form", + "target": "new", + "context": context, + } + + def _update_contract_last_date_invoiced( + self, last_date_invoiced, recurring_next_date + ): + self.write( + { + "last_date_invoiced": last_date_invoiced, + "recurring_next_date": recurring_next_date, + } + ) diff --git a/contract_update_last_date_invoiced/pyproject.toml b/contract_update_last_date_invoiced/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/contract_update_last_date_invoiced/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/contract_update_last_date_invoiced/readme/CONFIGURATION.rst b/contract_update_last_date_invoiced/readme/CONFIGURATION.rst new file mode 100644 index 0000000000..2ea54f3d50 --- /dev/null +++ b/contract_update_last_date_invoiced/readme/CONFIGURATION.rst @@ -0,0 +1,4 @@ +- Access in development mode +- Go to Settings > Users & Companies > Users +- Select the user you want to configure +- Give the user "Contract: Can update last date invoiced?" permission diff --git a/contract_update_last_date_invoiced/readme/CONTRIBUTORS.md b/contract_update_last_date_invoiced/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..0aa79ffd76 --- /dev/null +++ b/contract_update_last_date_invoiced/readme/CONTRIBUTORS.md @@ -0,0 +1,6 @@ +- Souheil Bejaoui \<\> +- Denis Roussel \<\> +- [Moduon](https://www.moduon.team): + - Eduardo López +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia diff --git a/contract_update_last_date_invoiced/readme/DESCRIPTION.md b/contract_update_last_date_invoiced/readme/DESCRIPTION.md new file mode 100644 index 0000000000..6fa5c22730 --- /dev/null +++ b/contract_update_last_date_invoiced/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module allows users to update the last date invoiced (e.g.: +deletion of invoices). diff --git a/contract_update_last_date_invoiced/readme/USAGE.md b/contract_update_last_date_invoiced/readme/USAGE.md new file mode 100644 index 0000000000..4519bde796 --- /dev/null +++ b/contract_update_last_date_invoiced/readme/USAGE.md @@ -0,0 +1,5 @@ +- Go to Invoicing \> Customers \> Customer Contracts +- Select a contract and click on contract line, in the pop-up is a button `Update Last Date Invoiced` +- Fill in the last date invoiced with the desired value + +Note: Make sure the user has the permissions "Contract: Can update last date invoiced". diff --git a/contract_update_last_date_invoiced/security/security.xml b/contract_update_last_date_invoiced/security/security.xml new file mode 100644 index 0000000000..f1d6fe4235 --- /dev/null +++ b/contract_update_last_date_invoiced/security/security.xml @@ -0,0 +1,26 @@ + + + + + Contract: Can update last date invoiced + + + + contract.update.last.date.invoiced.access (in contract_update_last_date_invoiced) + + + + + + + + diff --git a/contract_update_last_date_invoiced/static/description/icon.png b/contract_update_last_date_invoiced/static/description/icon.png new file mode 100644 index 0000000000..1dcc49c24f Binary files /dev/null and b/contract_update_last_date_invoiced/static/description/icon.png differ diff --git a/contract_update_last_date_invoiced/static/description/index.html b/contract_update_last_date_invoiced/static/description/index.html new file mode 100644 index 0000000000..37c6cc50ff --- /dev/null +++ b/contract_update_last_date_invoiced/static/description/index.html @@ -0,0 +1,453 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Contract Last Date Update

+ +

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

+

This module allows users to update the last date invoiced (e.g.: +deletion of invoices).

+

Table of contents

+ +
+

Usage

+
    +
  • Go to Invoicing > Customers > Customer Contracts
  • +
  • Select a contract and click on contract line, in the pop-up is a +button Update Last Date Invoiced
  • +
  • Fill in the last date invoiced with the desired value
  • +
+

Note: Make sure the user has the permissions “Contract: Can update last +date invoiced”.

+
+
+

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

+
    +
  • ACSONE SA/NV
  • +
+
+
+

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.

+

Current maintainers:

+

rafaelbn Andrii9090

+

This module is part of the OCA/contract project on GitHub.

+

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

+
+
+
+
+ + diff --git a/contract_update_last_date_invoiced/tests/__init__.py b/contract_update_last_date_invoiced/tests/__init__.py new file mode 100644 index 0000000000..2cefac43fb --- /dev/null +++ b/contract_update_last_date_invoiced/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_contract_update_last_date_invoiced diff --git a/contract_update_last_date_invoiced/tests/test_contract_update_last_date_invoiced.py b/contract_update_last_date_invoiced/tests/test_contract_update_last_date_invoiced.py new file mode 100644 index 0000000000..70225dd8e1 --- /dev/null +++ b/contract_update_last_date_invoiced/tests/test_contract_update_last_date_invoiced.py @@ -0,0 +1,55 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from datetime import date + +from odoo.addons.base.tests.common import BaseCommon + + +class TestContractLine(BaseCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.contract = cls.env["contract.contract"].create( + { + "name": "Test Contract", + "partner_id": cls.partner.id, + } + ) + cls.contract_line = cls.env["contract.line"].create( + { + "name": "Test Contract Line", + "contract_id": cls.contract.id, + "date_start": date(2024, 2, 1), + "last_date_invoiced": date(2024, 2, 1), + "recurring_next_date": date(2024, 3, 1), + } + ) + cls.wizard = cls.env["contract.update.last.date.invoiced"].create( + { + "contract_line_id": cls.contract_line.id, + "last_date_invoiced": "2024-02-15", + "recurring_next_date": "2024-03-15", + } + ) + + def test_action_update_last_date_invoiced(self): + action = self.contract_line.action_update_last_date_invoiced() + self.assertEqual( + action["context"]["default_recurring_next_date"], + self.contract_line.recurring_next_date, + ) + + def test_update_last_date_invoiced(self): + new_last_date = date(2024, 2, 15) # Convert to date + new_next_date = date(2024, 3, 15) + self.contract_line._update_contract_last_date_invoiced( + new_last_date, new_next_date + ) + self.assertEqual(self.contract_line.last_date_invoiced, new_last_date) + self.assertEqual(self.contract_line.recurring_next_date, new_next_date) + + def test_update_last_date_invoiced_wizard(self): + self.wizard.update_last_date_invoiced() + self.assertEqual(self.contract_line.last_date_invoiced, date(2024, 2, 15)) + self.assertEqual(self.contract_line.recurring_next_date, date(2024, 3, 15)) diff --git a/contract_update_last_date_invoiced/views/contract_line.xml b/contract_update_last_date_invoiced/views/contract_line.xml new file mode 100644 index 0000000000..f36912f7b7 --- /dev/null +++ b/contract_update_last_date_invoiced/views/contract_line.xml @@ -0,0 +1,37 @@ + + + + + contract.line + contract.line.form (in contract_update_last_date_invoiced) + + + + + + oe_inline + + + +