Skip to content

Commit 39286ce

Browse files
IMP
1 parent ecea4b5 commit 39286ce

11 files changed

Lines changed: 91 additions & 58 deletions

File tree

l10n_jp_summary_invoice_sale_partner/README.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ Japan Summary Invoice Sale Partner
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

31-
This module displays the sale partner in the summary invoice report.
31+
This module displays the sale order partner and the sale order shipping address per invoice
32+
in the summary invoice.
3233

3334
.. IMPORTANT::
3435
This is an alpha version, the data model and design can change at any time without warning.
@@ -43,9 +44,19 @@ This module displays the sale partner in the summary invoice report.
4344
Configuration
4445
=============
4546

47+
Go to *Invoicing/Accounting > Configuration > Settings* and update the following
48+
settings as necessary:
4649

47-
- Go to *Invoicing/Accounting > Configuration > Settings*.
48-
- Choose the Summary Invoice Sale Partner Type as needed.
50+
- **Show Sale Order Partner**: If selected, the sales order partner will be shown for
51+
each invoice in the summary invoice.
52+
- **Show Sale Order Shipping Partner**: If selected, the sales order shipping partner
53+
will be shown for each invoice in the summary invoice.
54+
55+
Known issues / Roadmap
56+
======================
57+
58+
This module cannot display the sale order partner and the sale order shipping address for
59+
each invoice line, nor at the summary invoice level.
4960

5061
Bug Tracker
5162
===========
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
from . import account_move
21
from . import res_company
32
from . import res_config_settings

l10n_jp_summary_invoice_sale_partner/models/account_move.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

l10n_jp_summary_invoice_sale_partner/models/res_company.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
class ResCompany(models.Model):
88
_inherit = "res.company"
99

10-
summary_invoice_sale_partner_type = fields.Selection(
11-
selection=[
12-
("partner", "Sale Order Partner"),
13-
("delivery_address", "Sale Order Delivery Address"),
14-
],
10+
show_sale_order_partner = fields.Boolean(
11+
help="If enabled, the sales order partner will be displayed in the summary "
12+
"invoice report lines.",
13+
)
14+
show_sale_order_shipping_partner = fields.Boolean(
15+
help="If enabled, the sales order shipping partner will be displayed in the summary "
16+
"invoice report lines.",
1517
)

l10n_jp_summary_invoice_sale_partner/models/res_config_settings.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
class ResConfigSettings(models.TransientModel):
88
_inherit = "res.config.settings"
99

10-
summary_invoice_sale_partner_type = fields.Selection(
11-
related="company_id.summary_invoice_sale_partner_type", readonly=False
10+
show_sale_order_partner = fields.Boolean(
11+
related="company_id.show_sale_order_partner", readonly=False
12+
)
13+
show_sale_order_shipping_partner = fields.Boolean(
14+
related="company_id.show_sale_order_shipping_partner", readonly=False
1215
)
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Go to *Invoicing/Accounting > Configuration > Settings* and update the following
2+
settings as necessary:
13

2-
- Go to *Invoicing/Accounting > Configuration > Settings*.
3-
- Choose the Summary Invoice Sale Partner Type as needed.
4+
- **Show Sale Order Partner**: If selected, the sales order partner will be shown for
5+
each invoice in the summary invoice.
6+
- **Show Sale Order Shipping Partner**: If selected, the sales order shipping partner
7+
will be shown for each invoice in the summary invoice.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
This module displays the sale partner in the summary invoice report.
1+
This module displays the sale order partner and the sale order shipping address per invoice
2+
in the summary invoice.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This module cannot display the sale order partner and the sale order shipping address for
2+
each invoice line, nor at the summary invoice level.

l10n_jp_summary_invoice_sale_partner/reports/report_summary_invoice_templates.xml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@
44
inherit_id="l10n_jp_summary_invoice.bill_line_section_layout"
55
>
66
<xpath expr="//tr[td/span[@t-field='invoice.invoice_date']]" position="after">
7+
8+
<t t-if="o.company_id.show_sale_order_partner and invoice.partner_sale_id">
9+
<tr>
10+
<td t-att-colspan="line_columns">
11+
<strong>Sold-to:</strong>
12+
<span t-field="invoice.partner_sale_id" />
13+
</td>
14+
</tr>
15+
</t>
716
<t
8-
t-set="sale_partner"
9-
t-value="invoice.get_summary_invoice_sale_partner()"
10-
/>
11-
<t t-if="sale_partner">
17+
t-if="o.company_id.show_sale_order_shipping_partner and invoice.partner_shipping_id"
18+
>
1219
<tr>
1320
<td t-att-colspan="line_columns">
14-
<span t-field="sale_partner.name" />
21+
<strong>Shipping Address:</strong>
22+
<span t-field="invoice.partner_shipping_id" />
1523
</td>
1624
</tr>
1725
</t>

l10n_jp_summary_invoice_sale_partner/static/description/index.html

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ <h1 class="title">Japan Summary Invoice Sale Partner</h1>
369369
!! source digest: sha256:cda469d4f57d8a01ed1bf6cbf8cca8a27f7252a0d6b33c83d1a0defe5b0d7e86
370370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371371
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-japan/tree/16.0/l10n_jp_summary_invoice_sale_partner"><img alt="OCA/l10n-japan" src="https://img.shields.io/badge/github-OCA%2Fl10n--japan-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-japan-16-0/l10n-japan-16-0-l10n_jp_summary_invoice_sale_partner"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-japan&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372-
<p>This module displays the sale partner in the summary invoice report.</p>
372+
<p>This module displays the sale order partner and the sale order shipping address per invoice
373+
in the summary invoice.</p>
373374
<div class="admonition important">
374375
<p class="first admonition-title">Important</p>
375376
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
@@ -380,39 +381,49 @@ <h1 class="title">Japan Summary Invoice Sale Partner</h1>
380381
<div class="contents local topic" id="contents">
381382
<ul class="simple">
382383
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
383-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
384-
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
385-
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
386-
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
384+
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
385+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
386+
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
387+
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
388+
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
387389
</ul>
388390
</li>
389391
</ul>
390392
</div>
391393
<div class="section" id="configuration">
392394
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
395+
<p>Go to <em>Invoicing/Accounting &gt; Configuration &gt; Settings</em> and update the following
396+
settings as necessary:</p>
393397
<ul class="simple">
394-
<li>Go to <em>Invoicing/Accounting &gt; Configuration &gt; Settings</em>.</li>
395-
<li>Choose the Summary Invoice Sale Partner Type as needed.</li>
398+
<li><strong>Show Sale Order Partner</strong>: If selected, the sales order partner will be shown for
399+
each invoice in the summary invoice.</li>
400+
<li><strong>Show Sale Order Shipping Partner</strong>: If selected, the sales order shipping partner
401+
will be shown for each invoice in the summary invoice.</li>
396402
</ul>
397403
</div>
404+
<div class="section" id="known-issues-roadmap">
405+
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
406+
<p>This module cannot display the sale order partner and the sale order shipping address for
407+
each invoice line, nor at the summary invoice level.</p>
408+
</div>
398409
<div class="section" id="bug-tracker">
399-
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
410+
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
400411
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-japan/issues">GitHub Issues</a>.
401412
In case of trouble, please check there if your issue has already been reported.
402413
If you spotted it first, help us to smash it by providing a detailed and welcomed
403414
<a class="reference external" href="https://github.com/OCA/l10n-japan/issues/new?body=module:%20l10n_jp_summary_invoice_sale_partner%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
404415
<p>Do not contact contributors directly about support or help with technical issues.</p>
405416
</div>
406417
<div class="section" id="credits">
407-
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
418+
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
408419
<div class="section" id="authors">
409-
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
420+
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
410421
<ul class="simple">
411422
<li>Quartile</li>
412423
</ul>
413424
</div>
414425
<div class="section" id="maintainers">
415-
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
426+
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
416427
<p>This module is maintained by the OCA.</p>
417428
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
418429
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose

0 commit comments

Comments
 (0)