diff --git a/report_alternative_layout/README.rst b/report_alternative_layout/README.rst new file mode 100644 index 00000000..248043be --- /dev/null +++ b/report_alternative_layout/README.rst @@ -0,0 +1,119 @@ +========================= +Report Alternative Layout +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:cbef2dafed1da5fbd492ec03ea8b80bc049e0eb6334b1a60e22b1bdbd6307ec6 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--japan-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-japan/tree/17.0/report_alternative_layout + :alt: OCA/l10n-japan +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-japan-17-0/l10n-japan-17-0-report_alternative_layout + :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/l10n-japan&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module introduces an alternative layout for QWeb reports with the +following adjustments to existing external layouts: + +- Displays the partner's address on the left side first, followed by + the company's address on the right side. +- Displays the document's number and date in the header. +- Uses the commercial partner's address in place of the partner's + address. + +Currently, these adjustments are only supported for the standard +external layout (external_layout_standard). + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Go to *Settings > Technical > Reporting > Paper Format*, and open a +paper format of your choice, and update the following fields as +necessary. - Apply Alternative Layout: If selected, the alternative +layout will be applied to the reports using this paper format. - Show +Address In Header: If selected, the partner's address will be shown in +the report header on every page (only applies to the alternative +layout). + +Go to *Settings > Technical > Reporting > Reports*, and open a report of +your choice, and update the following fields as necessary. + +- Paper Format: Select a paper format with 'Apply Alternative Layout' + enabled if you want to use the alternative layout. +- Show Commercial Partner: If selected, the commercial partner of the + document partner will show in the report output (instead of the + document partner). +- Show Remit-to Bank: If selected, the remite-to bank infomation will + be shown in the printed report. +- Show Document Number: If selected, the document number will be + displayed in the report header, at the top-right corner. +- Date Field: If entered, the date of the document will be displayed in + the report header, at the top-right corner. +- Date Field Label: The label to display for the date field in the + report, if specified. If not set, the field's name will be used + instead. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Quartile + +Contributors +------------ + +- `Quartile `__: + + - Tatsuki Kanda + - Aung Ko Ko Lin + - Yoshi Tashiro + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/l10n-japan `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/report_alternative_layout/__init__.py b/report_alternative_layout/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/report_alternative_layout/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/report_alternative_layout/__manifest__.py b/report_alternative_layout/__manifest__.py new file mode 100644 index 00000000..2d72bbed --- /dev/null +++ b/report_alternative_layout/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2024-2025 Quartile (https://www.quartile.co) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Report Alternative Layout", + "version": "17.0.1.0.0", + "category": "Reporting", + "license": "AGPL-3", + "author": "Quartile, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/l10n-japan", + "depends": ["web"], + "data": [ + "data/report_paperformat_data.xml", + "report/report_template.xml", + "views/ir_actions_report_views.xml", + "views/report_paperformat_views.xml", + ], + "installable": True, +} diff --git a/report_alternative_layout/data/report_paperformat_data.xml b/report_alternative_layout/data/report_paperformat_data.xml new file mode 100644 index 00000000..021465e3 --- /dev/null +++ b/report_alternative_layout/data/report_paperformat_data.xml @@ -0,0 +1,37 @@ + + + + A4 alt.: no addresses in header + A4 + 0 + 0 + Portrait + 16 + 28 + 7 + 7 + + 12 + 100 + + + + A4 alt.: addresses in header + A4 + 0 + 0 + Portrait + 45 + 28 + 7 + 7 + + 40 + 100 + + + + diff --git a/report_alternative_layout/i18n/ja.po b/report_alternative_layout/i18n/ja.po new file mode 100644 index 00000000..99e872e5 --- /dev/null +++ b/report_alternative_layout/i18n/ja.po @@ -0,0 +1,136 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_alternative_layout +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-06-03 10:07+0000\n" +"PO-Revision-Date: 2025-08-08 09:25+0000\n" +"Last-Translator: Sayaka-qrtl \n" +"Language-Team: \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 5.10.4\n" + +#. module: report_alternative_layout +#: model_terms:ir.ui.view,arch_db:report_alternative_layout.external_layout_standard +msgid ": " +msgstr "" + +#. module: report_alternative_layout +#: model_terms:ir.ui.view,arch_db:report_alternative_layout.external_layout_standard +msgid "Remit-to:" +msgstr "振込先:" + +#. module: report_alternative_layout +#: model_terms:ir.ui.view,arch_db:report_alternative_layout.view_act_report_form +msgid "Alternative Layout Settings" +msgstr "代替レイアウト設定" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__apply_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_report_paperformat__apply_alternative_layout +msgid "Apply Alternative Layout" +msgstr "代替レイアウトを適用" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__date_field_label +msgid "Date Field Label" +msgstr "日付項目ラベル" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__date_field_id +msgid "Date Field to Show in Header" +msgstr "ヘッダに表示する日付項目" + +#. module: report_alternative_layout +#: model_terms:ir.ui.view,arch_db:report_alternative_layout.external_layout_standard +msgid "Document No:" +msgstr "伝票番号:" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__show_remit_to_bank +msgid "If selected, remit-to bank account will show in the report output." +msgstr "選択すると、印刷帳票に振込先が表示されます。" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__apply_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_report_paperformat__apply_alternative_layout +msgid "" +"If selected, the alternative layout will be applied in the printed report." +msgstr "選択すると、印刷帳票に代替レイアウトが適用されます。" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__show_commercial_partner +msgid "" +"If selected, the commercial partner of the document partner will show in the " +"report output (instead of the document partner)." +msgstr "選択すると、印刷帳票に取引先ではなく、その商業取引先(親)が表示されます。" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__show_document_number +msgid "If selected, the document number will show in the report header." +msgstr "選択すると、印刷帳票のヘッダーに伝票番号が表示されます。" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_report_paperformat__show_address_in_header +msgid "" +"If selected, the report header will be shown on every page of the report " +"output." +msgstr "選択すると、アドレスが印刷帳票のヘッダに表示されます。" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__date_field_id +msgid "" +"If set, the report will show the value of this field in the header as the " +"date of the document." +msgstr "設定すると、この項目の値が印刷帳票のヘッダに日付として表示されます。" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__date_field_label +msgid "" +"Label for the date field in the report header. If not set, the field's " +"description will be used." +msgstr "印刷帳票の日付項目に表示するラベルです。設定されていない場合、日付項目がその" +"まま表示されます。" + +#. module: report_alternative_layout +#: model:ir.model,name:report_alternative_layout.model_report_paperformat +msgid "Paper Format Config" +msgstr "用紙フォーマット設定" + +#. module: report_alternative_layout +#: model:ir.model,name:report_alternative_layout.model_ir_actions_report +msgid "Report Action" +msgstr "レポートアクション" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_report_paperformat__show_address_in_header +msgid "Show Address In Header" +msgstr "アドレスをヘッダに表示" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__show_commercial_partner +msgid "Show Commercial Partner" +msgstr "商業取引先(親)を表示" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__show_document_number +msgid "Show Document Number in Header" +msgstr "伝票番号をヘッダに表示" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__show_remit_to_bank +msgid "Show Remit-to Bank" +msgstr "振込先を表示" + +#~ msgid "Date Field" +#~ msgstr "日付項目" + +#~ msgid "Show Document Number" +#~ msgstr "伝票番号を表示" diff --git a/report_alternative_layout/i18n/report_alternative_layout.pot b/report_alternative_layout/i18n/report_alternative_layout.pot new file mode 100644 index 00000000..7e69e202 --- /dev/null +++ b/report_alternative_layout/i18n/report_alternative_layout.pot @@ -0,0 +1,125 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_alternative_layout +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: report_alternative_layout +#: model_terms:ir.ui.view,arch_db:report_alternative_layout.external_layout_standard +msgid ": " +msgstr "" + +#. module: report_alternative_layout +#: model_terms:ir.ui.view,arch_db:report_alternative_layout.external_layout_standard +msgid "Remit-to:" +msgstr "" + +#. module: report_alternative_layout +#: model_terms:ir.ui.view,arch_db:report_alternative_layout.view_act_report_form +msgid "Alternative Layout Settings" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__apply_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_report_paperformat__apply_alternative_layout +msgid "Apply Alternative Layout" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__date_field_label +msgid "Date Field Label" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__date_field_id +msgid "Date Field to Show in Header" +msgstr "" + +#. module: report_alternative_layout +#: model_terms:ir.ui.view,arch_db:report_alternative_layout.external_layout_standard +msgid "Document No:" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__show_remit_to_bank +msgid "If selected, remit-to bank account will show in the report output." +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__apply_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_report_paperformat__apply_alternative_layout +msgid "" +"If selected, the alternative layout will be applied in the printed report." +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__show_commercial_partner +msgid "" +"If selected, the commercial partner of the document partner will show in the" +" report output (instead of the document partner)." +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__show_document_number +msgid "If selected, the document number will show in the report header." +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_report_paperformat__show_address_in_header +msgid "" +"If selected, the report header will be shown on every page of the report " +"output." +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__date_field_id +msgid "" +"If set, the report will show the value of this field in the header as the " +"date of the document." +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,help:report_alternative_layout.field_ir_actions_report__date_field_label +msgid "" +"Label for the date field in the report header. If not set, the field's " +"description will be used." +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model,name:report_alternative_layout.model_report_paperformat +msgid "Paper Format Config" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model,name:report_alternative_layout.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_report_paperformat__show_address_in_header +msgid "Show Address In Header" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__show_commercial_partner +msgid "Show Commercial Partner" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__show_document_number +msgid "Show Document Number in Header" +msgstr "" + +#. module: report_alternative_layout +#: model:ir.model.fields,field_description:report_alternative_layout.field_ir_actions_report__show_remit_to_bank +msgid "Show Remit-to Bank" +msgstr "" diff --git a/report_alternative_layout/models/__init__.py b/report_alternative_layout/models/__init__.py new file mode 100644 index 00000000..306e1a12 --- /dev/null +++ b/report_alternative_layout/models/__init__.py @@ -0,0 +1,2 @@ +from . import ir_actions_report +from . import report_paperformat diff --git a/report_alternative_layout/models/ir_actions_report.py b/report_alternative_layout/models/ir_actions_report.py new file mode 100644 index 00000000..8076bc25 --- /dev/null +++ b/report_alternative_layout/models/ir_actions_report.py @@ -0,0 +1,100 @@ +# Copyright 2024-2025 Quartile (https://www.quartile.co) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models +from odoo.tools import format_date + + +class Report(models.Model): + _inherit = "ir.actions.report" + + show_commercial_partner = fields.Boolean( + help="If selected, the commercial partner of the document partner will show " + "in the report output (instead of the document partner)." + ) + show_remit_to_bank = fields.Boolean( + "Show Remit-to Bank", + help="If selected, remit-to bank account will show in the report output.", + ) + show_document_number = fields.Boolean( + "Show Document Number in Header", + help="If selected, the document number will show in the report header.", + ) + date_field_id = fields.Many2one( + "ir.model.fields", + domain="[('model','=', model), ('ttype', 'in', ('date', 'datetime'))]", + string="Date Field to Show in Header", + help="If set, the report will show the value of this field in the header as " + "the date of the document.", + ) + date_field_label = fields.Char( + translate=True, + help="Label for the date field in the report header. If not set, the field's " + "description will be used.", + ) + apply_alternative_layout = fields.Boolean( + related="paperformat_id.apply_alternative_layout" + ) + + def _render_qweb_pdf(self, report_ref, res_ids=None, data=None): + report = self._get_report(report_ref) + self = self.with_context( + apply_alternative_layout=report.paperformat_id.apply_alternative_layout, + show_address_in_header=report.paperformat_id.show_address_in_header, + ) + return super()._render_qweb_pdf(report_ref, res_ids, data) + + def _get_report_partner(self, record): + self.ensure_one() + if hasattr(record, "partner_id"): + if self.show_commercial_partner: + return record.partner_id.commercial_partner_id + return record.partner_id + return self.env.user.partner_id + + @api.model + def _get_bank_field_name(self, record): + """Get the name of the field that links the record to the bank account. + + We assume that there is usually just one field in the model with many2one + relationship to res.partner.bank. In case of an exception, this method should be + extended in the specific model to identify the correct field. + """ + return next( + ( + field.name + for field in record._fields.values() + if field.type == "many2one" and field.comodel_name == "res.partner.bank" + ), + None, + ) + + def _get_remit_to_bank(self, record): + self.ensure_one() + if not self.show_remit_to_bank: + return False + bank_field_name = self._get_bank_field_name(record) + if bank_field_name: + return getattr(record, bank_field_name) + if "company_id" not in record._fields: + return False + company = record.company_id + if not company: + return False + return company.bank_ids[:1] + + def _get_date_value(self, record): + self.ensure_one() + if not self.date_field_id: + return None + value = record[self.date_field_id.name] + if not value: + return None + try: + return format_date(self.env, value) + except (TypeError, ValueError): + return None + + def _get_date_field_label(self): + self.ensure_one() + return self.date_field_label or self.date_field_id.field_description or "" diff --git a/report_alternative_layout/models/report_paperformat.py b/report_alternative_layout/models/report_paperformat.py new file mode 100644 index 00000000..e5bd67be --- /dev/null +++ b/report_alternative_layout/models/report_paperformat.py @@ -0,0 +1,27 @@ +# Copyright 2025 Quartile (https://www.quartile.co) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class ReportPaperformat(models.Model): + _inherit = "report.paperformat" + + apply_alternative_layout = fields.Boolean( + help="If selected, the alternative layout will be applied in the printed " + "report.", + ) + show_address_in_header = fields.Boolean( + compute="_compute_show_address_in_header", + help="If selected, the report header will be shown on every page of the " + "report output.", + readonly=False, + store=True, + ) + + @api.depends("apply_alternative_layout") + def _compute_show_address_in_header(self): + for rec in self: + if rec.apply_alternative_layout: + continue + rec.show_address_in_header = False diff --git a/report_alternative_layout/pyproject.toml b/report_alternative_layout/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/report_alternative_layout/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/report_alternative_layout/readme/CONFIGURE.md b/report_alternative_layout/readme/CONFIGURE.md new file mode 100644 index 00000000..29161250 --- /dev/null +++ b/report_alternative_layout/readme/CONFIGURE.md @@ -0,0 +1,25 @@ +Go to *Settings \> Technical \> Reporting \> Paper Format*, and open a +paper format of your choice, and update the following fields as +necessary. - Apply Alternative Layout: If selected, the alternative +layout will be applied to the reports using this paper format. - Show +Address In Header: If selected, the partner's address will be shown in +the report header on every page (only applies to the alternative +layout). + +Go to *Settings \> Technical \> Reporting \> Reports*, and open a report +of your choice, and update the following fields as necessary. + +- Paper Format: Select a paper format with 'Apply Alternative Layout' + enabled if you want to use the alternative layout. +- Show Commercial Partner: If selected, the commercial partner of the + document partner will show in the report output (instead of the + document partner). +- Show Remit-to Bank: If selected, the remite-to bank infomation will be + shown in the printed report. +- Show Document Number: If selected, the document number will be + displayed in the report header, at the top-right corner. +- Date Field: If entered, the date of the document will be displayed in + the report header, at the top-right corner. +- Date Field Label: The label to display for the date field in the + report, if specified. If not set, the field's name will be used + instead. diff --git a/report_alternative_layout/readme/CONTRIBUTORS.md b/report_alternative_layout/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..03a7959f --- /dev/null +++ b/report_alternative_layout/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- [Quartile](https://www.quartile.co): + - Tatsuki Kanda + - Aung Ko Ko Lin + - Yoshi Tashiro diff --git a/report_alternative_layout/readme/DESCRIPTION.md b/report_alternative_layout/readme/DESCRIPTION.md new file mode 100644 index 00000000..5ae2dbb7 --- /dev/null +++ b/report_alternative_layout/readme/DESCRIPTION.md @@ -0,0 +1,11 @@ +This module introduces an alternative layout for QWeb reports with the +following adjustments to existing external layouts: + +- Displays the partner's address on the left side first, followed by the + company's address on the right side. +- Displays the document's number and date in the header. +- Uses the commercial partner's address in place of the partner's + address. + +Currently, these adjustments are only supported for the standard +external layout (external_layout_standard). diff --git a/report_alternative_layout/report/report_template.xml b/report_alternative_layout/report/report_template.xml new file mode 100644 index 00000000..ba3f059b --- /dev/null +++ b/report_alternative_layout/report/report_template.xml @@ -0,0 +1,157 @@ + + + + + + diff --git a/report_alternative_layout/static/description/icon.png b/report_alternative_layout/static/description/icon.png new file mode 100644 index 00000000..1dcc49c2 Binary files /dev/null and b/report_alternative_layout/static/description/icon.png differ diff --git a/report_alternative_layout/static/description/index.html b/report_alternative_layout/static/description/index.html new file mode 100644 index 00000000..07ebc207 --- /dev/null +++ b/report_alternative_layout/static/description/index.html @@ -0,0 +1,464 @@ + + + + + +Report Alternative Layout + + + +
+

Report Alternative Layout

+ + +

Beta License: AGPL-3 OCA/l10n-japan Translate me on Weblate Try me on Runboat

+

This module introduces an alternative layout for QWeb reports with the +following adjustments to existing external layouts:

+
    +
  • Displays the partner’s address on the left side first, followed by +the company’s address on the right side.
  • +
  • Displays the document’s number and date in the header.
  • +
  • Uses the commercial partner’s address in place of the partner’s +address.
  • +
+

Currently, these adjustments are only supported for the standard +external layout (external_layout_standard).

+

Table of contents

+ +
+

Configuration

+

Go to Settings > Technical > Reporting > Paper Format, and open a +paper format of your choice, and update the following fields as +necessary. - Apply Alternative Layout: If selected, the alternative +layout will be applied to the reports using this paper format. - Show +Address In Header: If selected, the partner’s address will be shown in +the report header on every page (only applies to the alternative +layout).

+

Go to Settings > Technical > Reporting > Reports, and open a report of +your choice, and update the following fields as necessary.

+
    +
  • Paper Format: Select a paper format with ‘Apply Alternative Layout’ +enabled if you want to use the alternative layout.
  • +
  • Show Commercial Partner: If selected, the commercial partner of the +document partner will show in the report output (instead of the +document partner).
  • +
  • Show Remit-to Bank: If selected, the remite-to bank infomation will +be shown in the printed report.
  • +
  • Show Document Number: If selected, the document number will be +displayed in the report header, at the top-right corner.
  • +
  • Date Field: If entered, the date of the document will be displayed in +the report header, at the top-right corner.
  • +
  • Date Field Label: The label to display for the date field in the +report, if specified. If not set, the field’s name will be used +instead.
  • +
+
+
+

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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Quartile
  • +
+
+
+

Contributors

+
    +
  • Quartile:
      +
    • Tatsuki Kanda
    • +
    • Aung Ko Ko Lin
    • +
    • Yoshi Tashiro
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/l10n-japan project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/report_alternative_layout/views/ir_actions_report_views.xml b/report_alternative_layout/views/ir_actions_report_views.xml new file mode 100644 index 00000000..4ae3663b --- /dev/null +++ b/report_alternative_layout/views/ir_actions_report_views.xml @@ -0,0 +1,32 @@ + + + ir.actions.report + ir.actions.report + + + + + + + + + + + + + + + + + + + + + diff --git a/report_alternative_layout/views/report_paperformat_views.xml b/report_alternative_layout/views/report_paperformat_views.xml new file mode 100644 index 00000000..1102c465 --- /dev/null +++ b/report_alternative_layout/views/report_paperformat_views.xml @@ -0,0 +1,17 @@ + + + + paperformat_view_form + report.paperformat + + + + + + + + +