diff --git a/.eslintrc.yml b/.eslintrc.yml index fed88d70d23ecb3297ea28854b320c4d62ee3c26..0b382039586ae1303994e343dfca336fe46b0bdd 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -4,7 +4,7 @@ env: # See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449 parserOptions: - ecmaVersion: 2019 + ecmaVersion: 2022 overrides: - files: diff --git a/.gitignore b/.gitignore index d99361a24aa02c2d19d8165c3a057b84bc575166..c9f42387ef7051b2a868a9361f4f3cb6d562d4ed 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,15 @@ var/ *.eggs .copier-answers.yml +# Debian packages +*.deb + +# Redhat packages +*.rpm + +# MacOS packages +*.dmg + # Installer logs pip-log.txt pip-delete-this-directory.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3efb4d9157dc36d84e372eec5fc21e7f4a417a58..f58f2c6608a042bb13f2c7559889e33bf3f46733 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,8 @@ exclude: | readme/.*\.(rst|md)$| # Ignore build and dist directories in addons /build/|/dist/| + # Ignore test files in addons + /tests/samples/.*| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: @@ -35,9 +37,14 @@ repos: name: en.po files cannot exist entry: found a en.po file language: fail - files: '[a-zA-Z0-9_]*/i18n/en\.po$' + files: + '[a-zA-Z0-9_]*/i18n/en\.po$' + # - repo: https://github.com/sbidoul/whool + # rev: v0.5 + # hooks: + # - id: whool-init - repo: https://github.com/oca/maintainer-tools - rev: f71041f22b8cd68cf7c77b73a14ca8d8cd190a60 + rev: d5fab7ee87fceee858a3d01048c78a548974d935 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -46,11 +53,13 @@ repos: - id: oca-gen-addon-readme args: - --addons-dir=. - - --branch=16.0 + - --branch=17.0 - --org-name=lefilament - --repo-name=template_module - --if-source-changed - --keep-source-digest + - --convert-fragments-to-markdown + # - id: oca-gen-external-dependencies - repo: https://github.com/OCA/odoo-pre-commit-hooks rev: v0.0.25 hooks: @@ -104,7 +113,7 @@ repos: args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/OCA/pylint-odoo - rev: v8.0.19 + rev: v9.0.4 hooks: - id: pylint_odoo name: pylint with optional checks diff --git a/.pylintrc b/.pylintrc index 71c476d4f10ac08a7333729b93705c9573d240d5..4fb9ba5362fb402b42c1a587d56b28ed71e8f933 100644 --- a/.pylintrc +++ b/.pylintrc @@ -5,12 +5,12 @@ load-plugins=pylint_odoo score=n [ODOOLINT] -readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" -manifest_required_authors=Le Filament -manifest_required_keys=license -manifest_deprecated_keys=description,active -license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 -valid_odoo_versions=16.0 +readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" +manifest-required-authors=Le Filament +manifest-required-keys=license +manifest-deprecated-keys=description,active +license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 +valid-odoo-versions=17.0 [MESSAGES CONTROL] disable=all diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 99064933ef82c469ba5fda5b2904447c05c99dbe..42885e9b5eb0cde47fa65d308683c29504934143 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -9,7 +9,7 @@ manifest-required-authors=Le Filament manifest-required-keys=license manifest-deprecated-keys=description,active license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 -valid-odoo-versions=16.0 +valid-odoo-versions=17.0 [MESSAGES CONTROL] disable=all diff --git a/README.rst b/README.rst index f08db2863bb772e22cc1dd9c5acc22f7d4675ba5..a7428d81ce32bfb02c694e42c8c937060700fbd6 100644 --- a/README.rst +++ b/README.rst @@ -11,9 +11,10 @@ This module depends upon *sale* module. This module provides: -* Updated quotation tree view to display untaxed amount instead of taxed amount -* Updated sale order tree view to display untaxed amount instead of taxed amount -* Updated sale order tree view to display amount that remains to be invoiced +* Updated quotation views to display untaxed amount instead of taxed amount +* Updated sale order views to display untaxed amount instead of taxed amount +* Updated sale order tree/form views to display untax amount that remains to be invoiced +* beneficiary_id (initialized with partner_id) on invoices Credits @@ -23,7 +24,7 @@ Contributors ------------ * Benjamin Rivier <benjamin@le-filament.com> -* Remi Cazenave <remi@le-filament.com> +* Rémi Cazenave <remi@le-filament.com> * Juliana Poudou <juliana@le-filament.com> diff --git a/__manifest__.py b/__manifest__.py index 1f84bfedb450c4a45d7d0b60f06c14ee20df753d..abfde40663655aec65fee720768186156b9629f3 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Le Filament - Sales", "summary": "Generic Sales views update by Le Filament", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "license": "AGPL-3", "author": "Le Filament", "category": "Sales/Sales", diff --git a/models/account_move.py b/models/account_move.py index a5ec4af94360a41fa39965a981c3fd8080b1fa01..df5ab79f5c59369a9bd3b005c851904b7884d237 100644 --- a/models/account_move.py +++ b/models/account_move.py @@ -1,4 +1,4 @@ -# Copyright 2018-2022 Le Filament (<https://le-filament.com>) +# Copyright 2018- Le Filament (https://le-filament.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models diff --git a/models/sale.py b/models/sale.py index 538b443bae8122d4d57761e7e2b37c607910d1c0..a8e03b193f75f0253c79f3816d4e4444448c138b 100644 --- a/models/sale.py +++ b/models/sale.py @@ -1,4 +1,4 @@ -# Copyright 2018-2022 Le Filament (<https://le-filament.com>) +# Copyright 2018- Le Filament (https://le-filament.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models diff --git a/views/account_move_view.xml b/views/account_move_view.xml index bc2672ac2728723a8c6588bc2a93b434f2dc576d..a72b5a8c978fc0ccd7ee5ef0f3a4f6792c06652d 100644 --- a/views/account_move_view.xml +++ b/views/account_move_view.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2022 Le Filament (<https://le-filament.com>) +<!-- Copyright 2022- Le Filament (https://le-filament.com) License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> <record model="ir.ui.view" id="view_move_form_filament"> @@ -10,7 +10,7 @@ <field name="partner_shipping_id" position="after"> <field name="beneficiary_id" - attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}" + invisible="move_type not in ('out_invoice', 'out_refund')" /> </field> </field> diff --git a/views/sales_view.xml b/views/sales_view.xml index 7074016ec2cd58445a1d597b0df7a07caa2ee6e5..d5322fc8a0e3822bb20e8cac736f96dd282e9b9b 100644 --- a/views/sales_view.xml +++ b/views/sales_view.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2022- Le Filament (<https://le-filament.com>) +<!-- Copyright 2022- Le Filament (https://le-filament.com) License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> <record id="lf_view_sale_order_calendar" model="ir.ui.view"> @@ -59,7 +59,7 @@ <record id="lf_view_order_tree" model="ir.ui.view"> <field name="inherit_id" ref="sale.view_order_tree" /> - <field name="name">sale.order.tree</field> + <field name="name">sale.order.tree (orders)</field> <field name="model">sale.order</field> <field name="arch" type="xml"> <field name="amount_untaxed" position="attributes"> @@ -68,7 +68,7 @@ <field name="amount_total" position="attributes"> <attribute name="optional">hide</attribute> </field> - <field name="amount_total" position="after"> + <field name="amount_to_invoice" position="after"> <field name="untaxed_amount_to_invoice" widget="monetary" @@ -81,9 +81,12 @@ <record id="lf_view_quotation_tree" model="ir.ui.view"> <field name="inherit_id" ref="sale.view_quotation_tree" /> - <field name="name">sale.order.tree</field> + <field name="name">sale.order.tree (quotes)</field> <field name="model">sale.order</field> <field name="arch" type="xml"> + <field name="amount_to_invoice" position="attributes"> + <attribute name="column_invisible">1</attribute> + </field> <field name="amount_untaxed" position="attributes"> <attribute name="optional">show</attribute> </field> @@ -93,4 +96,19 @@ </field> </record> + <record id="lf_view_order_form" model="ir.ui.view"> + <field name="inherit_id" ref="sale.view_order_form" /> + <field name="name">sale.order.form</field> + <field name="model">sale.order</field> + <field name="arch" type="xml"> + <group name="sale_total" position="inside"> + <field + name="untaxed_amount_to_invoice" + widget="monetary" + invisible="state != 'sale'" + readonly="1" + /> + </group> + </field> + </record> </odoo>