From 2ddac026f17c8e15a9fdd8e7828b889b5ba0f648 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Wed, 12 May 2021 13:22:41 +0200 Subject: [PATCH 1/4] [FIX] extensions: support parallel read Now that patchqueue was removed, we can consider supporting the parallel read with our local extensions. Since we only have basic extensions, not storing any data on the build environment, the change mainly consists of specifying the extensions as parallelizable. The only specific case is the html domain, since the base html domain requires the support of the method merge_domaindata in parallel read mode. Since we do not need to share anything between the envs for this extension, we can simply ignore the method. --- extensions/autodoc_placeholder/__init__.py | 2 +- extensions/embedded_video/__init__.py | 2 +- extensions/exercise_admonition/__init__.py | 2 +- extensions/github_link/__init__.py | 2 +- extensions/html_domain/__init__.py | 10 +++++++++- extensions/odoo_theme/__init__.py | 2 +- extensions/redirects/__init__.py | 2 +- extensions/switcher/__init__.py | 2 +- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/extensions/autodoc_placeholder/__init__.py b/extensions/autodoc_placeholder/__init__.py index 1f4e088b2..470f53830 100644 --- a/extensions/autodoc_placeholder/__init__.py +++ b/extensions/autodoc_placeholder/__init__.py @@ -21,6 +21,6 @@ def setup(app): directives.register_directive('autoattribute', PlaceHolder) return { - 'parallel_read_safe': False, + 'parallel_read_safe': True, 'parallel_write_safe': True } diff --git a/extensions/embedded_video/__init__.py b/extensions/embedded_video/__init__.py index 9119e01c9..f200deeed 100644 --- a/extensions/embedded_video/__init__.py +++ b/extensions/embedded_video/__init__.py @@ -66,6 +66,6 @@ def setup(app): directives.register_directive('vimeo', Vimeo) return { - 'parallel_read_safe': False, + 'parallel_read_safe': True, 'parallel_write_safe': True } diff --git a/extensions/exercise_admonition/__init__.py b/extensions/exercise_admonition/__init__.py index fd0b0b6a5..82be4d755 100644 --- a/extensions/exercise_admonition/__init__.py +++ b/extensions/exercise_admonition/__init__.py @@ -21,7 +21,7 @@ def setup(app): )) return { - 'parallel_read_safe': False, + 'parallel_read_safe': True, 'parallel_write_safe': True } diff --git a/extensions/github_link/__init__.py b/extensions/github_link/__init__.py index 6bde1c906..5d1752c5e 100644 --- a/extensions/github_link/__init__.py +++ b/extensions/github_link/__init__.py @@ -75,7 +75,7 @@ def setup(app): app.config.linkcode_resolve = linkcode_resolve return { - 'parallel_read_safe': False, + 'parallel_read_safe': True, 'parallel_write_safe': True } diff --git a/extensions/html_domain/__init__.py b/extensions/html_domain/__init__.py index f3e20b465..2b2997bde 100644 --- a/extensions/html_domain/__init__.py +++ b/extensions/html_domain/__init__.py @@ -40,7 +40,7 @@ def setup(app): addnode(app, node, name) return { - 'parallel_read_safe': False, + 'parallel_read_safe': True, 'parallel_write_safe': True } @@ -183,3 +183,11 @@ class HtmlDomain(Domain): 'var': makerole(var), 'samp': makerole(samp), } + + def merge_domaindata(self, docnames, otherdata) -> None: + """Merge in data regarding *docnames* from a different domaindata + inventory (coming from a subprocess in parallel builds). + """ + # This extension doesn't store any data on the env + # and therefore doesn't need to support this method. + pass diff --git a/extensions/odoo_theme/__init__.py b/extensions/odoo_theme/__init__.py index 041f9a14e..4e61aaefb 100644 --- a/extensions/odoo_theme/__init__.py +++ b/extensions/odoo_theme/__init__.py @@ -16,7 +16,7 @@ def setup(app): app.add_js_file('js/page_toc.js') return { - 'parallel_read_safe': False, + 'parallel_read_safe': True, 'parallel_write_safe': True } diff --git a/extensions/redirects/__init__.py b/extensions/redirects/__init__.py index f66c6b6fa..054baf733 100644 --- a/extensions/redirects/__init__.py +++ b/extensions/redirects/__init__.py @@ -64,6 +64,6 @@ def setup(app): app.connect('builder-inited', generate_redirects) return { - 'parallel_read_safe': False, + 'parallel_read_safe': True, 'parallel_write_safe': True } diff --git a/extensions/switcher/__init__.py b/extensions/switcher/__init__.py index 87c36e74b..d71316786 100644 --- a/extensions/switcher/__init__.py +++ b/extensions/switcher/__init__.py @@ -13,7 +13,7 @@ def setup(app): app.connect('env-updated', add_statics) return { - 'parallel_read_safe': False, + 'parallel_read_safe': True, 'parallel_write_safe': True } From 46c21826fcf26f6a46339b5f152f0f6bee2d864e Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Wed, 19 May 2021 14:53:23 +0200 Subject: [PATCH 2/4] [IMP] Makefile: build in parallel by default --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 02ca83d8d..6cf6b2267 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Pass WORKERS=auto for parallel build ifndef WORKERS - WORKERS = 1 + WORKERS = auto endif SPHINX_BUILD = sphinx-build @@ -67,7 +67,7 @@ extensions/odoo_theme/static/style.css: extensions/odoo_theme/static/style.scss #=== Development and debugging rules ===# -fast: SPHINXOPTS += -A collapse_menu=True -j auto +fast: SPHINXOPTS += -A collapse_menu=True fast: html static: extensions/odoo_theme/static/style.css From c135e4966809bcdc4437392e57997d81e1f1c7c7 Mon Sep 17 00:00:00 2001 From: BVE Date: Thu, 7 Jan 2021 11:57:51 +0100 Subject: [PATCH 3/4] [IMP] accounting: removing none existing module The module ' l10n_fr_certification ' has been integrate in the account module. so this is not installable anymore. Removed this but kept the explanation for the POS. opw-2389435 --- .../fiscal_localizations/localizations/france.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/content/applications/finance/accounting/fiscal_localizations/localizations/france.rst b/content/applications/finance/accounting/fiscal_localizations/localizations/france.rst index e4a224723..d098c498d 100644 --- a/content/applications/finance/accounting/fiscal_localizations/localizations/france.rst +++ b/content/applications/finance/accounting/fiscal_localizations/localizations/france.rst @@ -59,11 +59,9 @@ In case of non-conformity, your company risks a fine of €7,500. To get the certification just follow the following steps: -* Install the anti-fraud module fitting your Odoo environment from the - *Apps* menu: - - * if you use Odoo Point of Sale: *l10n_fr_pos_cert*: France - VAT Anti-Fraud Certification for Point of Sale (CGI 286 I-3 bis) - * in any other case: *l10n_fr_certification*: France - VAT Anti-Fraud Certification (CGI 286 I-3 bis) +* If you use **Odoo Point of Sale**, install the **France - VAT Anti-Fraud Certification for Point + of Sale (CGI 286 I-3 bis)** module by going to :menuselection:`Apps`, removing the *Apps* filter, + then searching for *l10n_fr_pos_cert*, and installing the module. * Make sure a country is set on your company, otherwise your entries won’t be encrypted for the inalterability check. To edit your company’s data, From defd620d5eea1e5629d462524d4af0a921d9abc2 Mon Sep 17 00:00:00 2001 From: BVE Date: Thu, 7 Jan 2021 14:19:12 +0100 Subject: [PATCH 4/4] [ADD] accounting: restriction for re sequencing The re sequencing feature done by WAN is perturbing our french customer In order to explain the reason the feature is, let's state what has been decided by the product owner (TSB) opw-2389435 --- .../receivables/customer_invoices/overview.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/applications/finance/accounting/receivables/customer_invoices/overview.rst b/content/applications/finance/accounting/receivables/customer_invoices/overview.rst index f080107ed..499aca350 100644 --- a/content/applications/finance/accounting/receivables/customer_invoices/overview.rst +++ b/content/applications/finance/accounting/receivables/customer_invoices/overview.rst @@ -135,3 +135,15 @@ Some specific modules are also able to generate draft invoices: - **membership**: invoice your members every year - **repairs**: invoice your after-sale services + +Resequencing of the invoices +---------------------------- + +It remains possible to resequence the invoices but with some restrictions: + +#. The feature does not work when entries are previous to a lock date. +#. The feature does not work if the sequence is inconsistent with the month of the entry. +#. It does not work if the sequence leads to a duplicate. +#. The order of the invoice remains unchanged. +#. It is useful for people who use a numbering from another software and who want to continue the + current year without starting over from the beginning.