From 969888ffca292d300776f4447f988a016f54d8ac Mon Sep 17 00:00:00 2001
From: Laszlo Krajnikovszkij
Date: Mon, 9 Sep 2024 10:57:46 +0200
Subject: [PATCH] [IMP] account_move_line_accounting_description: pre-commit
stuff
---
.../README.rst | 10 +++++-----
.../__manifest__.py | 2 +-
.../models/account_move.py | 3 ++-
.../static/description/index.html | 18 ++++++++++--------
.../test_account_move_line_description.py | 1 -
.../account_move_line_accounting_description | 1 +
.../setup.py | 6 ++++++
7 files changed, 25 insertions(+), 16 deletions(-)
create mode 120000 setup/account_move_line_accounting_description/odoo/addons/account_move_line_accounting_description
create mode 100644 setup/account_move_line_accounting_description/setup.py
diff --git a/account_move_line_accounting_description/README.rst b/account_move_line_accounting_description/README.rst
index 20bc72a9447b..f9414e06672c 100644
--- a/account_move_line_accounting_description/README.rst
+++ b/account_move_line_accounting_description/README.rst
@@ -17,13 +17,13 @@ Acccount Move Accounting Description
: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--invoicing-lightgray.png?logo=github
- :target: https://github.com/OCA/account-invoicing/tree/14.0/account_move_line_accounting_description
+ :target: https://github.com/OCA/account-invoicing/tree/16.0/account_move_line_accounting_description
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_move_line_accounting_description
+ :target: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_move_line_accounting_description
: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-invoicing&target_branch=14.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -43,7 +43,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.
@@ -73,6 +73,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-invoicing `_ project on GitHub.
+This module is part of the `OCA/account-invoicing `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_move_line_accounting_description/__manifest__.py b/account_move_line_accounting_description/__manifest__.py
index 3f28e3c28ab2..c17dcaa3fb44 100644
--- a/account_move_line_accounting_description/__manifest__.py
+++ b/account_move_line_accounting_description/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Acccount Move Accounting Description",
- "version": "14.0.1.0.1",
+ "version": "16.0.1.0.0",
"summary": "Adds an 'accounting description' on products",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-invoicing",
diff --git a/account_move_line_accounting_description/models/account_move.py b/account_move_line_accounting_description/models/account_move.py
index 3de12c5679a1..cc78a50e4c39 100644
--- a/account_move_line_accounting_description/models/account_move.py
+++ b/account_move_line_accounting_description/models/account_move.py
@@ -7,7 +7,7 @@
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
- external_name = fields.Char(string="External Name")
+ external_name = fields.Char()
@api.onchange("product_id")
def _onchange_product_id(self):
@@ -16,3 +16,4 @@ def _onchange_product_id(self):
line.external_name = line.name
if line.product_id.accounting_description:
line.name = line.product_id.accounting_description
+ return
diff --git a/account_move_line_accounting_description/static/description/index.html b/account_move_line_accounting_description/static/description/index.html
index 59ededb4adf6..4d2fe0c7405d 100644
--- a/account_move_line_accounting_description/static/description/index.html
+++ b/account_move_line_accounting_description/static/description/index.html
@@ -1,4 +1,3 @@
-
@@ -9,10 +8,11 @@
/*
:Author: David Goodger (goodger@python.org)
-:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
+:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
+Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
@@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }
-pre.code .ln { color: grey; } /* line numbers */
+pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@
span.pre {
white-space: pre }
-span.problematic {
+span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -369,7 +369,7 @@ Acccount Move Accounting Description
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:05f6b52e58885f0830fe5b48758ba438180f68aa94516f6783e61246c7ad57de
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module adds:
- accounting description on product to use instead of product name on the invoice.
- external name on account move to keep original product’s name on invoice report
@@ -390,7 +390,7 @@
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.
@@ -410,11 +410,13 @@
This module is maintained by the OCA.
-
+
+
+
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-invoicing project on GitHub.
+
This module is part of the OCA/account-invoicing project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_move_line_accounting_description/tests/test_account_move_line_description.py b/account_move_line_accounting_description/tests/test_account_move_line_description.py
index c14f3c2a5242..0e9c410eccb7 100644
--- a/account_move_line_accounting_description/tests/test_account_move_line_description.py
+++ b/account_move_line_accounting_description/tests/test_account_move_line_description.py
@@ -24,7 +24,6 @@ def setUpClass(cls):
cls.account_move = cls.env["account.move"]
-
def test_invoice_line_with_accounting_description(self):
invoice_form_acc_desc = Form(
self.account_move.with_context(default_move_type="out_invoice")
diff --git a/setup/account_move_line_accounting_description/odoo/addons/account_move_line_accounting_description b/setup/account_move_line_accounting_description/odoo/addons/account_move_line_accounting_description
new file mode 120000
index 000000000000..7b0cc739530c
--- /dev/null
+++ b/setup/account_move_line_accounting_description/odoo/addons/account_move_line_accounting_description
@@ -0,0 +1 @@
+../../../../account_move_line_accounting_description
\ No newline at end of file
diff --git a/setup/account_move_line_accounting_description/setup.py b/setup/account_move_line_accounting_description/setup.py
new file mode 100644
index 000000000000..28c57bb64031
--- /dev/null
+++ b/setup/account_move_line_accounting_description/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)