diff --git a/account_move_template/README.rst b/account_move_template/README.rst
index c139f1f41..f404e1bc9 100644
--- a/account_move_template/README.rst
+++ b/account_move_template/README.rst
@@ -17,46 +17,50 @@ Account Move Template
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github
- :target: https://github.com/OCA/account-financial-tools/tree/16.0/account_move_template
+ :target: https://github.com/OCA/account-financial-tools/tree/17.0/account_move_template
:alt: OCA/account-financial-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_move_template
+ :target: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_move_template
: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/account-financial-tools&target_branch=16.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=17.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
-The user can configure journal entries templates, useful for recurring entries.
-The amount of each template line can be computed (through python code)
-or kept as user input.
+The user can configure journal entries templates, useful for recurring
+entries. The amount of each template line can be computed (through
+python code) or kept as user input.
-If user input, when using the template, user has to fill
-the amount of every input lines.
+If user input, when using the template, user has to fill the amount of
+every input lines.
-The journal entry form allows lo load, through a wizard,
-the template to use and the amounts to fill.
+The journal entry form allows lo load, through a wizard, the template to
+use and the amounts to fill.
**Notable features:**
-This module enhance the capability of module account_move_template with following features,
+This module enhance the capability of module account_move_template with
+following features,
-#. Optional account for negative amount.
+1. Optional account for negative amount.
- When the Journal entry is created, and credit/debit is negative value, change debit/credit
- side and use the opt_account_id
+ When the Journal entry is created, and credit/debit is negative
+ value, change debit/credit side and use the opt_account_id
-#. Allow overwrite move line values with overwrite dict.
+2. Allow overwrite move line values with overwrite dict.
- Normally, the journal items created by the template will require user input on wizard.
- This feature allow passing the overwrite values with a dictionary.
- This is particularly useful when the wizard is called by code.
+ Normally, the journal items created by the template will require
+ user input on wizard. This feature allow passing the overwrite
+ values with a dictionary. This is particularly useful when the
+ wizard is called by code.
- Sample of dictionary to overwrite move lines::
+ Sample of dictionary to overwrite move lines:
- {'L1': {'partner_id': 1, 'amount': 100, 'name': 'some label'},
- 'L2': {'partner_id': 2, 'amount': 200, 'name': 'some label 2'}, }
+ ::
+
+ {'L1': {'partner_id': 1, 'amount': 100, 'name': 'some label'},
+ 'L2': {'partner_id': 2, 'amount': 200, 'name': 'some label 2'}, }
**Table of contents**
@@ -68,17 +72,19 @@ Usage
To create new templates:
-#. Make sure that you have flagged *Show Full Accounting Features* on your
- user, and that the user belongs to the *Billing Manager* group.
-#. Go to *Invoicing / Configuration / Accounting / Journal Entry Templates* and
- define there your templates. You can choose to complete a line using a
- defined formula, based on other lines, or by requiring user input.
+1. Make sure that you have flagged *Show Full Accounting Features* on
+ your user, and that the user belongs to the *Billing Manager* group.
+2. Go to *Invoicing / Configuration / Accounting / Journal Entry
+ Templates* and define there your templates. You can choose to
+ complete a line using a defined formula, based on other lines, or by
+ requiring user input.
To use an existing template:
-#. Go to *Invoicing / Accounting / Actions / Create Entry from Template*
-#. Select one of the available templates.
-#. Complete the entries according to the template and click on the button *Generate Journal Entry*.
+1. Go to *Invoicing / Accounting / Actions / Create Entry from Template*
+2. Select one of the available templates.
+3. Complete the entries according to the template and click on the
+ button *Generate Journal Entry*.
Bug Tracker
===========
@@ -86,7 +92,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -94,7 +100,7 @@ Credits
=======
Authors
-~~~~~~~
+-------
* Agile Business Group
* Aurium Technologies
@@ -103,38 +109,40 @@ Authors
* Akretion
Contributors
-~~~~~~~~~~~~
+------------
Module Authors
---------------
+~~~~~~~~~~~~~~
-* Davide Corio
-* Lorenzo Battistini
-* Paolo Chiara
-* Franco Tampieri
-* Alexis de Lattre (full re-write for v12)
+- Davide Corio
+- Lorenzo Battistini
+- Paolo Chiara
+- Franco Tampieri
+- Alexis de Lattre (full re-write for
+ v12)
Module Contributors
--------------------
+~~~~~~~~~~~~~~~~~~~
-* Jalal ZAHID (port to v10)
-* Alex Comba (Port to V8)
-* Guewen Baconnier
-* Raf Ven (port to v11)
-* Jordi Ballester (ForgeFlow)
-* `Sygel `_:
+- Jalal ZAHID (port to v10)
+- Alex Comba (Port to V8)
+- Guewen Baconnier
+- Raf Ven (port to v11)
+- Jordi Ballester (ForgeFlow)
+- `Sygel `__:
- * Harald Panten
- * Valentin Vinagre
- * Manuel Regidor
+ - Harald Panten
+ - Valentin Vinagre
+ - Manuel Regidor
-* `Ecosoft `_:
+- `Ecosoft `__:
- * Kitti U. (Add context overwrite)
-* Abraham Anes
+ - Kitti U. (Add context overwrite)
+
+- Abraham Anes
Maintainers
-~~~~~~~~~~~
+-----------
This module is maintained by the OCA.
@@ -146,6 +154,6 @@ 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/account-financial-tools `_ project on GitHub.
+This module is part of the `OCA/account-financial-tools `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_move_template/pyproject.toml b/account_move_template/pyproject.toml
new file mode 100644
index 000000000..4231d0ccc
--- /dev/null
+++ b/account_move_template/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["whool"]
+build-backend = "whool.buildapi"
diff --git a/account_move_template/readme/CONTRIBUTORS.md b/account_move_template/readme/CONTRIBUTORS.md
new file mode 100644
index 000000000..ca81feaca
--- /dev/null
+++ b/account_move_template/readme/CONTRIBUTORS.md
@@ -0,0 +1,23 @@
+## Module Authors
+
+- Davide Corio \<\>
+- Lorenzo Battistini \<\>
+- Paolo Chiara \<\>
+- Franco Tampieri \<\>
+- Alexis de Lattre \<\> (full re-write for
+ v12)
+
+## Module Contributors
+
+- Jalal ZAHID \<\> (port to v10)
+- Alex Comba \<\> (Port to V8)
+- Guewen Baconnier \<\>
+- Raf Ven \<\> (port to v11)
+- Jordi Ballester \<\> (ForgeFlow)
+- [Sygel](https://www.sygel.es):
+ - Harald Panten \<\>
+ - Valentin Vinagre \<\>
+ - Manuel Regidor \<\>
+- [Ecosoft](http://ecosoft.co.th):
+ - Kitti U. \<\> (Add context overwrite)
+- Abraham Anes \<\>
diff --git a/account_move_template/readme/CONTRIBUTORS.rst b/account_move_template/readme/CONTRIBUTORS.rst
deleted file mode 100644
index 6d9a36771..000000000
--- a/account_move_template/readme/CONTRIBUTORS.rst
+++ /dev/null
@@ -1,27 +0,0 @@
-Module Authors
---------------
-
-* Davide Corio
-* Lorenzo Battistini
-* Paolo Chiara
-* Franco Tampieri
-* Alexis de Lattre (full re-write for v12)
-
-Module Contributors
--------------------
-
-* Jalal ZAHID (port to v10)
-* Alex Comba (Port to V8)
-* Guewen Baconnier
-* Raf Ven (port to v11)
-* Jordi Ballester (ForgeFlow)
-* `Sygel `_:
-
- * Harald Panten
- * Valentin Vinagre
- * Manuel Regidor
-
-* `Ecosoft `_:
-
- * Kitti U. (Add context overwrite)
-* Abraham Anes
diff --git a/account_move_template/readme/DESCRIPTION.md b/account_move_template/readme/DESCRIPTION.md
new file mode 100644
index 000000000..8a3aad58c
--- /dev/null
+++ b/account_move_template/readme/DESCRIPTION.md
@@ -0,0 +1,31 @@
+The user can configure journal entries templates, useful for recurring
+entries. The amount of each template line can be computed (through
+python code) or kept as user input.
+
+If user input, when using the template, user has to fill the amount of
+every input lines.
+
+The journal entry form allows lo load, through a wizard, the template to
+use and the amounts to fill.
+
+**Notable features:**
+
+This module enhance the capability of module account_move_template with
+following features,
+
+1. Optional account for negative amount.
+
+ > When the Journal entry is created, and credit/debit is negative
+ > value, change debit/credit side and use the opt_account_id
+
+2. Allow overwrite move line values with overwrite dict.
+
+ > Normally, the journal items created by the template will require
+ > user input on wizard. This feature allow passing the overwrite
+ > values with a dictionary. This is particularly useful when the
+ > wizard is called by code.
+ >
+ > Sample of dictionary to overwrite move lines:
+ >
+ > {'L1': {'partner_id': 1, 'amount': 100, 'name': 'some label'},
+ > 'L2': {'partner_id': 2, 'amount': 200, 'name': 'some label 2'}, }
diff --git a/account_move_template/readme/DESCRIPTION.rst b/account_move_template/readme/DESCRIPTION.rst
deleted file mode 100644
index d43635a01..000000000
--- a/account_move_template/readme/DESCRIPTION.rst
+++ /dev/null
@@ -1,29 +0,0 @@
-The user can configure journal entries templates, useful for recurring entries.
-The amount of each template line can be computed (through python code)
-or kept as user input.
-
-If user input, when using the template, user has to fill
-the amount of every input lines.
-
-The journal entry form allows lo load, through a wizard,
-the template to use and the amounts to fill.
-
-**Notable features:**
-
-This module enhance the capability of module account_move_template with following features,
-
-#. Optional account for negative amount.
-
- When the Journal entry is created, and credit/debit is negative value, change debit/credit
- side and use the opt_account_id
-
-#. Allow overwrite move line values with overwrite dict.
-
- Normally, the journal items created by the template will require user input on wizard.
- This feature allow passing the overwrite values with a dictionary.
- This is particularly useful when the wizard is called by code.
-
- Sample of dictionary to overwrite move lines::
-
- {'L1': {'partner_id': 1, 'amount': 100, 'name': 'some label'},
- 'L2': {'partner_id': 2, 'amount': 200, 'name': 'some label 2'}, }
diff --git a/account_move_template/readme/USAGE.md b/account_move_template/readme/USAGE.md
new file mode 100644
index 000000000..ad02a91a4
--- /dev/null
+++ b/account_move_template/readme/USAGE.md
@@ -0,0 +1,16 @@
+To create new templates:
+
+1. Make sure that you have flagged *Show Full Accounting Features* on
+ your user, and that the user belongs to the *Billing Manager* group.
+2. Go to *Invoicing / Configuration / Accounting / Journal Entry
+ Templates* and define there your templates. You can choose to
+ complete a line using a defined formula, based on other lines, or by
+ requiring user input.
+
+To use an existing template:
+
+1. Go to *Invoicing / Accounting / Actions / Create Entry from
+ Template*
+2. Select one of the available templates.
+3. Complete the entries according to the template and click on the
+ button *Generate Journal Entry*.
diff --git a/account_move_template/readme/USAGE.rst b/account_move_template/readme/USAGE.rst
deleted file mode 100644
index 1ea7d7266..000000000
--- a/account_move_template/readme/USAGE.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-To create new templates:
-
-#. Make sure that you have flagged *Show Full Accounting Features* on your
- user, and that the user belongs to the *Billing Manager* group.
-#. Go to *Invoicing / Configuration / Accounting / Journal Entry Templates* and
- define there your templates. You can choose to complete a line using a
- defined formula, based on other lines, or by requiring user input.
-
-To use an existing template:
-
-#. Go to *Invoicing / Accounting / Actions / Create Entry from Template*
-#. Select one of the available templates.
-#. Complete the entries according to the template and click on the button *Generate Journal Entry*.
diff --git a/account_move_template/static/description/index.html b/account_move_template/static/description/index.html
index e91248a71..55d1e3ff9 100644
--- a/account_move_template/static/description/index.html
+++ b/account_move_template/static/description/index.html
@@ -369,28 +369,30 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:34347dc298f9465b955bbe2b251cdb66a8a945f650f447ac04b72f2a0d53734e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

-The user can configure journal entries templates, useful for recurring entries.
-The amount of each template line can be computed (through python code)
-or kept as user input.
-If user input, when using the template, user has to fill
-the amount of every input lines.
-The journal entry form allows lo load, through a wizard,
-the template to use and the amounts to fill.
+

+The user can configure journal entries templates, useful for recurring
+entries. The amount of each template line can be computed (through
+python code) or kept as user input.
+If user input, when using the template, user has to fill the amount of
+every input lines.
+The journal entry form allows lo load, through a wizard, the template to
+use and the amounts to fill.
Notable features:
-This module enhance the capability of module account_move_template with following features,
+This module enhance the capability of module account_move_template with
+following features,
Optional account for negative amount.
-When the Journal entry is created, and credit/debit is negative value, change debit/credit
-side and use the opt_account_id
+When the Journal entry is created, and credit/debit is negative
+value, change debit/credit side and use the opt_account_id
Allow overwrite move line values with overwrite dict.
-Normally, the journal items created by the template will require user input on wizard.
-This feature allow passing the overwrite values with a dictionary.
-This is particularly useful when the wizard is called by code.
+Normally, the journal items created by the template will require
+user input on wizard. This feature allow passing the overwrite
+values with a dictionary. This is particularly useful when the
+wizard is called by code.
Sample of dictionary to overwrite move lines:
{'L1': {'partner_id': 1, 'amount': 100, 'name': 'some label'},
@@ -420,17 +422,19 @@ This is particularly useful when the wizard is called by code.
To create new templates:
-- Make sure that you have flagged Show Full Accounting Features on your
-user, and that the user belongs to the Billing Manager group.
-- Go to Invoicing / Configuration / Accounting / Journal Entry Templates and
-define there your templates. You can choose to complete a line using a
-defined formula, based on other lines, or by requiring user input.
+- Make sure that you have flagged Show Full Accounting Features on
+your user, and that the user belongs to the Billing Manager group.
+- Go to Invoicing / Configuration / Accounting / Journal Entry
+Templates and define there your templates. You can choose to
+complete a line using a defined formula, based on other lines, or by
+requiring user input.
To use an existing template:
- Go to Invoicing / Accounting / Actions / Create Entry from Template
- Select one of the available templates.
-- Complete the entries according to the template and click on the button Generate Journal Entry.
+- Complete the entries according to the template and click on the
+button Generate Journal Entry.
@@ -438,7 +442,7 @@ defined formula, based on other lines, or by requiring user input.
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.
+
feedback.
Do not contact contributors directly about support or help with technical issues.
diff --git a/account_move_template/wizard/account_move_template_run.py b/account_move_template/wizard/account_move_template_run.py
index 9187f5348..0ccb926e9 100644
--- a/account_move_template/wizard/account_move_template_run.py
+++ b/account_move_template/wizard/account_move_template_run.py
@@ -160,7 +160,7 @@ Valid dictionary to overwrite template lines:
def _overwrite_line(self, overwrite_vals):
self.ensure_one()
for line in self.line_ids:
- vals = overwrite_vals.get("L{}".format(line.sequence), {})
+ vals = overwrite_vals.get(f"L{line.sequence}", {})
safe_vals = self._safe_vals(line._name, vals)
line.write(safe_vals)
@@ -239,7 +239,7 @@ Valid dictionary to overwrite template lines:
]
# With overwrite options
overwrite = self._context.get("overwrite", {})
- move_line_vals = overwrite.get("L{}".format(line.sequence), {})
+ move_line_vals = overwrite.get(f"L{line.sequence}", {})
values.update(move_line_vals)
# Use optional account, when amount is negative
self._update_account_on_negative(line, values)