Skip to content

Commit 888564d

Browse files
committed
Merge PR #352 into 17.0
Signed-off-by dreispt
2 parents 196ba09 + baf9411 commit 888564d

File tree

18 files changed

+818
-0
lines changed

18 files changed

+818
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
=======================================
2+
Account Invoice Line Sale Line Position
3+
=======================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:036f7ade4829c27746437cd1162ca52a1a1cfd5a2e70fffc8fa789b217014329
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github
20+
:target: https://github.com/OCA/account-invoice-reporting/tree/17.0/account_invoice_line_sale_line_position
21+
:alt: OCA/account-invoice-reporting
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/account-invoice-reporting-17-0/account-invoice-reporting-17-0-account_invoice_line_sale_line_position
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoice-reporting&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module is build on top of the module sale_order_line_position.
32+
33+
It adds (if any) the sale line position on the invoice line. There can
34+
be multiple positions for one invoicing line. And they are added to the
35+
report.
36+
37+
**Table of contents**
38+
39+
.. contents::
40+
:local:
41+
42+
Bug Tracker
43+
===========
44+
45+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-reporting/issues>`_.
46+
In case of trouble, please check there if your issue has already been reported.
47+
If you spotted it first, help us to smash it by providing a detailed and welcomed
48+
`feedback <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_line_sale_line_position%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
49+
50+
Do not contact contributors directly about support or help with technical issues.
51+
52+
Credits
53+
=======
54+
55+
Authors
56+
-------
57+
58+
* Camptocamp
59+
60+
Contributors
61+
------------
62+
63+
- Thierry Ducrest <[email protected]>
64+
- `Trobz <https://trobz.com>`__:
65+
- Nguyen Ho <[email protected]>
66+
67+
Other credits
68+
-------------
69+
70+
The migration of this module from 13.0 to 14.0 was financially supported
71+
by Camptocamp
72+
73+
Maintainers
74+
-----------
75+
76+
This module is maintained by the OCA.
77+
78+
.. image:: https://odoo-community.org/logo.png
79+
:alt: Odoo Community Association
80+
:target: https://odoo-community.org
81+
82+
OCA, or the Odoo Community Association, is a nonprofit organization whose
83+
mission is to support the collaborative development of Odoo features and
84+
promote its widespread use.
85+
86+
This module is part of the `OCA/account-invoice-reporting <https://github.com/OCA/account-invoice-reporting/tree/17.0/account_invoice_line_sale_line_position>`_ project on GitHub.
87+
88+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2021 Camptocamp SA
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
3+
4+
{
5+
"name": "Account Invoice Line Sale Line Position",
6+
"summary": "Adds the related sale line position on invoice line.",
7+
"version": "17.0.1.0.0",
8+
"category": "Sale",
9+
"author": "Camptocamp, Odoo Community Association (OCA)",
10+
"license": "AGPL-3",
11+
"website": "https://github.com/OCA/account-invoice-reporting",
12+
"depends": ["sale_order_line_position"],
13+
"data": ["views/account_move_views.xml", "report/invoice_report.xml"],
14+
"installable": True,
15+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_invoice_line_sale_line_position
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: account_invoice_line_sale_line_position
17+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_bank_statement_line__has_order_position
18+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_move__has_order_position
19+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_payment__has_order_position
20+
msgid "Has Order Position"
21+
msgstr ""
22+
23+
#. module: account_invoice_line_sale_line_position
24+
#: model:ir.model,name:account_invoice_line_sale_line_position.model_account_move
25+
msgid "Journal Entry"
26+
msgstr ""
27+
28+
#. module: account_invoice_line_sale_line_position
29+
#: model:ir.model,name:account_invoice_line_sale_line_position.model_account_move_line
30+
msgid "Journal Item"
31+
msgstr ""
32+
33+
#. module: account_invoice_line_sale_line_position
34+
#: model_terms:ir.ui.view,arch_db:account_invoice_line_sale_line_position.report_invoice_document
35+
#: model_terms:ir.ui.view,arch_db:account_invoice_line_sale_line_position.view_move_form
36+
msgid "Pos"
37+
msgstr ""
38+
39+
#. module: account_invoice_line_sale_line_position
40+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_move_line__position_formatted
41+
msgid "Position Formatted"
42+
msgstr ""
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_invoice_line_sale_line_position
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 14.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2022-05-11 13:05+0000\n"
10+
"Last-Translator: Maria Sparenberg <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: de\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.3.2\n"
18+
19+
#. module: account_invoice_line_sale_line_position
20+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_bank_statement_line__has_order_position
21+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_move__has_order_position
22+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_payment__has_order_position
23+
msgid "Has Order Position"
24+
msgstr "Hat Auftragsposition"
25+
26+
#. module: account_invoice_line_sale_line_position
27+
#: model:ir.model,name:account_invoice_line_sale_line_position.model_account_move
28+
msgid "Journal Entry"
29+
msgstr "Journalbuchung"
30+
31+
#. module: account_invoice_line_sale_line_position
32+
#: model:ir.model,name:account_invoice_line_sale_line_position.model_account_move_line
33+
msgid "Journal Item"
34+
msgstr "Journal-Item"
35+
36+
#. module: account_invoice_line_sale_line_position
37+
#: model_terms:ir.ui.view,arch_db:account_invoice_line_sale_line_position.report_invoice_document
38+
#: model_terms:ir.ui.view,arch_db:account_invoice_line_sale_line_position.view_move_form
39+
msgid "Pos"
40+
msgstr "Pos"
41+
42+
#. module: account_invoice_line_sale_line_position
43+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_move_line__position_formatted
44+
msgid "Position Formatted"
45+
msgstr ""
46+
47+
#~ msgid "Display Name"
48+
#~ msgstr "Anzeigename"
49+
50+
#~ msgid "ID"
51+
#~ msgstr "ID"
52+
53+
#~ msgid "Last Modified on"
54+
#~ msgstr "Zuletzt geändert am"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_invoice_line_sale_line_position
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2023-07-29 10:09+0000\n"
10+
"Last-Translator: Ivorra78 <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: es\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: account_invoice_line_sale_line_position
20+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_bank_statement_line__has_order_position
21+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_move__has_order_position
22+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_payment__has_order_position
23+
msgid "Has Order Position"
24+
msgstr "Tiene posición de pedido"
25+
26+
#. module: account_invoice_line_sale_line_position
27+
#: model:ir.model,name:account_invoice_line_sale_line_position.model_account_move
28+
msgid "Journal Entry"
29+
msgstr "Entrada diaria"
30+
31+
#. module: account_invoice_line_sale_line_position
32+
#: model:ir.model,name:account_invoice_line_sale_line_position.model_account_move_line
33+
msgid "Journal Item"
34+
msgstr "artículo diario"
35+
36+
#. module: account_invoice_line_sale_line_position
37+
#: model_terms:ir.ui.view,arch_db:account_invoice_line_sale_line_position.report_invoice_document
38+
#: model_terms:ir.ui.view,arch_db:account_invoice_line_sale_line_position.view_move_form
39+
msgid "Pos"
40+
msgstr "Posición"
41+
42+
#. module: account_invoice_line_sale_line_position
43+
#: model:ir.model.fields,field_description:account_invoice_line_sale_line_position.field_account_move_line__position_formatted
44+
msgid "Position Formatted"
45+
msgstr "Posición Formateada"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import account_invoice
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2021 Camptocamp SA
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
3+
from odoo import api, fields, models
4+
5+
6+
class AccountMove(models.Model):
7+
_inherit = "account.move"
8+
9+
has_order_position = fields.Boolean(compute="_compute_has_order_position")
10+
11+
@api.depends("invoice_line_ids.position_formatted")
12+
def _compute_has_order_position(self):
13+
for record in self:
14+
record.has_order_position = any(
15+
record.invoice_line_ids.mapped("position_formatted")
16+
)
17+
18+
19+
class AccountMoveLine(models.Model):
20+
_inherit = "account.move.line"
21+
22+
position_formatted = fields.Char(compute="_compute_position_formatted")
23+
24+
@api.depends("sale_line_ids.position")
25+
def _compute_position_formatted(self):
26+
for record in self:
27+
if record.display_type != "product":
28+
record.position_formatted = ""
29+
continue
30+
values = [
31+
val for val in record.sale_line_ids.mapped("position_formatted") if val
32+
]
33+
record.position_formatted = "/".join(values)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Thierry Ducrest \<<[email protected]>\>
2+
- [Trobz](https://trobz.com):
3+
- Nguyen Ho \<<[email protected]>\>

0 commit comments

Comments
 (0)