diff --git a/account_billing/README.rst b/account_billing/README.rst index 23b57f58..05a7a4ff 100644 --- a/account_billing/README.rst +++ b/account_billing/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + =============== Billing Process =============== @@ -7,13 +11,13 @@ Billing Process !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:92c644c45d119de640798ae4ef9b43eb634e6b78de5811a1ac6c5f3d647499f0 + !! source digest: sha256:50d733e0ce5080841df88469b4939fc61943ac75ba37cb787877b142628c7554 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Faccount--invoicing-lightgray.png?logo=github @@ -79,10 +83,10 @@ Authors Contributors ------------ -- Kitti U. -- Saran Lim. -- Rattapong Chokmasermkul -- Komsan Somwong +- Kitti U. +- Saran Lim. +- Rattapong Chokmasermkul +- Komsan Somwong Maintainers ----------- diff --git a/account_billing/__manifest__.py b/account_billing/__manifest__.py index c3bfdf3b..e253f7f6 100644 --- a/account_billing/__manifest__.py +++ b/account_billing/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Billing Process", "summary": "Group invoice as billing before payment", - "version": "18.0.1.1.1", + "version": "18.0.1.3.0", "author": "Ecosoft, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/account-invoicing", diff --git a/account_billing/models/account_billing.py b/account_billing/models/account_billing.py index 48891cb4..192b6299 100644 --- a/account_billing/models/account_billing.py +++ b/account_billing/models/account_billing.py @@ -116,18 +116,19 @@ def _compute_payment_paid_all(self): line.payment_state == "paid" for line in rec.billing_line_ids ) + def _get_moves_domain(self, date, types=False): + return [ + ("partner_id", "=", self.partner_id.id), + ("state", "=", "posted"), + ("payment_state", "!=", "paid"), + ("currency_id", "=", self.currency_id.id), + (date, "<=", self.threshold_date), + ("move_type", "in", types), + ] + def _get_moves(self, date, types=False): - moves = self.env["account.move"].search( - [ - ("partner_id", "=", self.partner_id.id), - ("state", "=", "posted"), - ("payment_state", "!=", "paid"), - ("currency_id", "=", self.currency_id.id), - (date, "<=", self.threshold_date), - ("move_type", "in", types), - ] - ) - return moves._sort_for_billing(self.threshold_date_type) + domain = self._get_moves_domain(date, types=types) + return self.env["account.move"].search(domain) def _compute_invoice_related_count(self): self.invoice_related_count = len(self.billing_line_ids) diff --git a/account_billing/models/account_move.py b/account_billing/models/account_move.py index 690ea9ba..23695212 100644 --- a/account_billing/models/account_move.py +++ b/account_billing/models/account_move.py @@ -8,29 +8,30 @@ class AccountMove(models.Model): _inherit = "account.move" + billing_line_ids = fields.One2many( + comodel_name="account.billing.line", + inverse_name="move_id", + string="Billing Lines", + help="Billing lines that reference this invoice", + ) billing_ids = fields.Many2many( comodel_name="account.billing", string="Billings", compute="_compute_billing_ids", + groups="account.group_account_invoice", help="Relationship between invoice and billing", ) def _compute_billing_ids(self): - bl_obj = self.env["account.billing.line"] for rec in self: - billing_lines = bl_obj.search([("move_id", "=", rec.id)]) - rec.billing_ids = billing_lines.mapped("billing_id") + rec.billing_ids = rec.billing_line_ids.mapped("billing_id") def _get_billing_type(self): outbound_types = {"out_invoice", "out_refund", "out_receipt"} move_types = set(self.mapped("move_type")) return "out_invoice" if move_types.issubset(outbound_types) else "in_invoice" - def _sort_for_billing(self, date_field): - return self.sorted(key=lambda m: (m[date_field], m.name, m.id)) - def _create_billing(self, partner): - date_field = self.env["account.billing"]._get_default_threshold_date_type() billing = self.env["account.billing"].create( { "partner_id": partner.id, @@ -46,7 +47,7 @@ def _create_billing(self, partner): * (-1 if m.move_type in ["out_refund", "in_refund"] else 1), } ) - for m in self._sort_for_billing(date_field) + for m in self ], } ) diff --git a/account_billing/static/description/index.html b/account_billing/static/description/index.html index 83c36eae..2bc9a2f0 100644 --- a/account_billing/static/description/index.html +++ b/account_billing/static/description/index.html @@ -3,7 +3,7 @@ -Billing Process +README.rst -
-

Billing Process

+
+ + +Odoo Community Association + +
+

Billing Process

-

Beta License: AGPL-3 OCA/account-invoicing Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/account-invoicing Translate me on Weblate Try me on Runboat

In some countries, there is a customary practice for companies to collect money from their customers only once in a month. For example, the customer has 3 payments due in a given month, the vendor or billing @@ -393,7 +398,7 @@

Billing Process

-

Usage

+

Usage

To use this module, you have 2 ways:

  1. @@ -411,7 +416,7 @@

    Usage

-

Bug Tracker

+

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 @@ -419,15 +424,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Ecosoft
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -451,5 +456,6 @@

Maintainers

+
diff --git a/account_billing/views/account_billing_views.xml b/account_billing/views/account_billing_views.xml index 6c8a50db..a48e66fa 100644 --- a/account_billing/views/account_billing_views.xml +++ b/account_billing/views/account_billing_views.xml @@ -145,7 +145,6 @@ class="oe_stat_button" name="invoice_relate_billing_tree_view" type="object" - invisible="state != 'billed'" icon="fa-pencil-square-o" > +- Quartile - - Aung Ko Ko Lin + - Aung Ko Ko Lin Maintainers ----------- diff --git a/auditlog/README.rst b/auditlog/README.rst index dc4721d5..4807802a 100644 --- a/auditlog/README.rst +++ b/auditlog/README.rst @@ -11,7 +11,7 @@ Audit Log !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e0e544c7a26986bb9117c221de2a8725c1ac094fd65ad0b4719fc51df383d7e2 + !! source digest: sha256:a0543c8ac1272df7c45f3f3ab1e658d0031331b342ea25d7eb5fccc3c23e05df !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/auditlog/__manifest__.py b/auditlog/__manifest__.py index a36026b4..2b391013 100644 --- a/auditlog/__manifest__.py +++ b/auditlog/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Audit Log", - "version": "18.0.2.0.7", + "version": "18.0.2.0.9", "author": "ABF OSIELL, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/server-tools", diff --git a/auditlog/static/description/index.html b/auditlog/static/description/index.html index b85c2a81..015bbbc4 100644 --- a/auditlog/static/description/index.html +++ b/auditlog/static/description/index.html @@ -372,7 +372,7 @@

Audit Log

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:e0e544c7a26986bb9117c221de2a8725c1ac094fd65ad0b4719fc51df383d7e2 +!! source digest: sha256:a0543c8ac1272df7c45f3f3ab1e658d0031331b342ea25d7eb5fccc3c23e05df !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

This module allows the administrator to log user operations performed on diff --git a/auditlog/tests/test_auditlog.py b/auditlog/tests/test_auditlog.py index 67fea7b0..ecee5108 100644 --- a/auditlog/tests/test_auditlog.py +++ b/auditlog/tests/test_auditlog.py @@ -2,7 +2,7 @@ # © 2018 Pieter Paulussen # © 2021 Stefan Rijnhart # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - +from odoo.tests import tagged from odoo.tools import mute_logger from odoo.addons.base.models.ir_model import MODULE_UNINSTALL_FLAG @@ -280,6 +280,7 @@ def test_LogDelete(self): ) +@tagged("-at_install", "post_install") class TestAuditlogFull(AuditLogRuleCommon, AuditlogCommon): @classmethod def setUpClass(cls): @@ -298,6 +299,7 @@ def setUpClass(cls): ) +@tagged("-at_install", "post_install") class TestAuditlogExportData(AuditLogRuleCommon): @classmethod def setUpClass(cls): @@ -329,6 +331,7 @@ def test_LogExport(self): self.assertIsInstance(domain[0][2], list) +@tagged("-at_install", "post_install") class TestAuditlogFast(AuditLogRuleCommon, AuditlogCommon): @classmethod def setUpClass(cls): @@ -347,6 +350,7 @@ def setUpClass(cls): ) +@tagged("-at_install", "post_install") class TestFieldRemoval(AuditLogRuleCommon): @classmethod def setUpClass(cls): @@ -444,6 +448,7 @@ def test_01_field_and_model_removal(self): self.assertFalse(self.auditlog_rule.model_id) +@tagged("-at_install", "post_install") class TestAuditlogFullCaptureRecord(AuditLogRuleCommon, AuditlogCommon): @classmethod def setUpClass(cls): @@ -463,6 +468,7 @@ def setUpClass(cls): ) +@tagged("-at_install", "post_install") class AuditLogRuleTestForUserFields(AuditLogRuleCommon): @classmethod def setUpClass(cls): @@ -647,6 +653,7 @@ def test_06_AuditlogFull_unlink_log(self): self.assertTrue(delete_log_record) +@tagged("-at_install", "post_install") class AuditLogRuleTestForUserModel(AuditLogRuleCommon): @classmethod def setUpClass(cls): @@ -723,6 +730,7 @@ def test_02_AuditlogFull_field_group_write_log(self): self.assertTrue(write_log_record) +@tagged("-at_install", "post_install") class AuditlogFast_excluded_fields(AuditLogRuleCommon): @classmethod def setUpClass(cls): diff --git a/auditlog/tests/test_autovacuum.py b/auditlog/tests/test_autovacuum.py index e4831225..b8a13371 100644 --- a/auditlog/tests/test_autovacuum.py +++ b/auditlog/tests/test_autovacuum.py @@ -2,9 +2,12 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import time +from odoo.tests import tagged + from .common import AuditLogRuleCommon +@tagged("-at_install", "post_install") class TestAuditlogAutovacuum(AuditLogRuleCommon): def setUp(self): super().setUp() diff --git a/auditlog/tests/test_http.py b/auditlog/tests/test_http.py index df317993..b1d27339 100644 --- a/auditlog/tests/test_http.py +++ b/auditlog/tests/test_http.py @@ -31,7 +31,11 @@ def test_compute_display_name(self): }, ) logs = self.env["auditlog.log"].search( - [("model_id", "=", rule.model_id.id), ("res_id", "=", partner.id)] + [ + ("model_id", "=", rule.model_id.id), + ("res_id", "=", partner.id), + ("line_ids.field_name", "=", "name"), + ] ) self.assertEqual(len(logs), 1) http_request_id = logs[0]["http_request_id"] diff --git a/base_user_role/README.rst b/base_user_role/README.rst index 6ae4a1bd..ec8a5168 100644 --- a/base_user_role/README.rst +++ b/base_user_role/README.rst @@ -11,7 +11,7 @@ User roles !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:b3aa00f609d45dcd82a69b2a3e13b327096ab1d25883b543e3e45538e854d40c + !! source digest: sha256:99ab17708d54615c87b2764f44327b9a8908fbf188fdcfbd80b301b453c8207a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png diff --git a/base_user_role/__manifest__.py b/base_user_role/__manifest__.py index 1a06e066..2c70a955 100644 --- a/base_user_role/__manifest__.py +++ b/base_user_role/__manifest__.py @@ -4,7 +4,7 @@ { "name": "User roles", - "version": "18.0.1.0.5", + "version": "18.0.1.0.7", "category": "Tools", "author": "ABF OSIELL, Odoo Community Association (OCA)", "license": "LGPL-3", diff --git a/base_user_role/models/role.py b/base_user_role/models/role.py index 4cf16666..2a241970 100644 --- a/base_user_role/models/role.py +++ b/base_user_role/models/role.py @@ -21,7 +21,10 @@ class ResUsersRole(models.Model): string="Associated group", ) line_ids = fields.One2many( - comodel_name="res.users.role.line", inverse_name="role_id", string="Role lines" + comodel_name="res.users.role.line", + inverse_name="role_id", + string="Role lines", + domain=[("user_id.active", "=", True)], ) user_ids = fields.One2many( comodel_name="res.users", string="Users list", compute="_compute_user_ids" @@ -134,7 +137,6 @@ class ResUsersRoleLine(models.Model): _name = "res.users.role.line" _description = "Users associated to a role" - active = fields.Boolean(related="user_id.active") role_id = fields.Many2one( comodel_name="res.users.role", required=True, string="Role", ondelete="cascade" ) diff --git a/base_user_role/models/user.py b/base_user_role/models/user.py index d3264e52..90a759f4 100644 --- a/base_user_role/models/user.py +++ b/base_user_role/models/user.py @@ -102,6 +102,16 @@ def set_groups_from_roles(self, force=False): to_remove = [(3, gr) for gr in groups_to_remove] groups = to_remove + to_add if groups: - vals = {"groups_id": groups} + # Prevent tiggering res_users_notification_type for share users + vals = {} + if ( + self.env.ref("base.group_user").id in groups_to_remove + and "notification_type" in user._fields + and user.notification_type == "inbox" + ): + vals["notification_type"] = "email" + pass + + vals["groups_id"] = groups super(ResUsers, user).write(vals) return True diff --git a/base_user_role/static/description/index.html b/base_user_role/static/description/index.html index 00038a43..4c59134c 100644 --- a/base_user_role/static/description/index.html +++ b/base_user_role/static/description/index.html @@ -372,7 +372,7 @@

User roles

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:b3aa00f609d45dcd82a69b2a3e13b327096ab1d25883b543e3e45538e854d40c +!! source digest: sha256:99ab17708d54615c87b2764f44327b9a8908fbf188fdcfbd80b301b453c8207a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Production/Stable License: LGPL-3 OCA/server-backend Translate me on Weblate Try me on Runboat

This module was written to extend the standard functionality regarding diff --git a/base_user_role/tests/test_user_role.py b/base_user_role/tests/test_user_role.py index 10331869..4b46c294 100644 --- a/base_user_role/tests/test_user_role.py +++ b/base_user_role/tests/test_user_role.py @@ -4,17 +4,16 @@ from odoo import fields from odoo.exceptions import AccessError +from odoo.fields import Command from odoo.tests import tagged -from odoo.tests.common import TransactionCase +from odoo.addons.base.tests.common import BaseCommon -class TestUserRole(TransactionCase): + +class TestUserRoleCommon(BaseCommon): @classmethod def setUpClass(cls): super().setUpClass() - cls.env = cls.env( - context=dict(cls.env.context, tracking_disable=True, no_reset_password=True) - ) cls.user_model = cls.env["res.users"] cls.role_model = cls.env["res.users.role"] cls.wiz_model = cls.env["wizard.groups.into.role"] @@ -59,7 +58,7 @@ def setUpClass(cls): # Setup for multi-company testing cls.multicompany_user_1 = cls.user_model.create( { - "name": "User 2", + "name": "multicompany_user_1", "company_id": cls.company1.id, "company_ids": [(6, 0, [cls.company1.id, cls.company2.id])], "groups_id": [(6, 0, cls.env.ref("base.group_erp_manager").ids)], @@ -68,7 +67,7 @@ def setUpClass(cls): ) cls.multicompany_user_2 = cls.user_model.create( { - "name": "User 2", + "name": "multicompany_user_2", "company_id": cls.company2.id, "company_ids": [(6, 0, [cls.company2.id])], "groups_id": [(6, 0, cls.env.ref("base.group_user").ids)], @@ -83,6 +82,8 @@ def setUpClass(cls): } ) + +class TestUserRole(TestUserRoleCommon): def test_role_1(self): self.user_id.write({"role_line_ids": [(0, 0, {"role_id": self.role1_id.id})]}) user_group_ids = sorted({group.id for group in self.user_id.groups_id}) @@ -232,18 +233,6 @@ def test_role_multicompany(self): ): role.read() - @tagged("-at_install", "post_install") - def test_notification_type_not_reset(self): - """Test that roles don't reset notification settings.""" - if self.env["ir.module.module"]._get("mail").state != "installed": - self.skipTest("Mail module is not installed.") - notification_group = self.env.ref("mail.group_mail_notification_type_inbox") - self.assertNotIn(notification_group, self.user_id.groups_id) - self.user_id.notification_type = "inbox" - self.assertIn(notification_group, self.user_id.groups_id) - self.user_id.write({"role_line_ids": [(0, 0, {"role_id": self.role1_id.id})]}) - self.assertIn(notification_group, self.user_id.groups_id) - def test_create_role_from_user(self): # Use a wizard instance to create a new role based on the user. # We use assign_to_user = False, as otherwise this module forcibly @@ -287,3 +276,60 @@ def test_group_groups_into_role(self): self.assertEqual(new_role.name, "Test Role") # Check that the role has the correct groups (even if the order is not equal) self.assertEqual(set(new_role.implied_ids.ids), set(user_group_ids)) + + +@tagged("post_install", "-at_install") +class TestUserRoleMail(TestUserRoleCommon): + def test_notification_type_not_reset(self): + """Test that roles don't reset notification settings.""" + if self.env["ir.module.module"]._get("mail").state != "installed": + self.skipTest("Mail module is not installed.") + notification_group = self.env.ref("mail.group_mail_notification_type_inbox") + self.assertNotIn(notification_group, self.user_id.groups_id) + self.user_id.notification_type = "inbox" + self.assertIn(notification_group, self.user_id.groups_id) + self.user_id.write( + {"role_line_ids": [Command.create({"role_id": self.role1_id.id})]} + ) + self.assertIn(notification_group, self.user_id.groups_id) + + def test_notification_type_reset(self): + """When user is demoted to share user, update notification settings. + + The issue only occurs when the writing user is not the superuser, and + if an intermittent flush is triggered by for instance + `_check_one_user_type` in website's res.users override. This triggers + constraint res_users_notification_type as Odoo has not yet recomputed + this at that point. + """ + # Notification settings depend on mail being installed + if self.env["ir.module.module"]._get("mail").state != "installed": + self.skipTest("Mail module is not installed.") + + # Set up a non-superuser user + admin_user = self.env["res.users"].create( + { + "name": "Some admin", + "login": "admin@example.com", + }, + ) + admin_user.groups_id += self.env.ref("base.group_system") + + self.user_id.write( + { + "role_line_ids": [Command.create({"role_id": self.role1_id.id})], + "notification_type": "inbox", + }, + ) + + # As non-superuser, delete all roles from the user + user = self.user_id.with_user(admin_user) + user.write( + { + "role_line_ids": [ + Command.delete(rl.id) for rl in self.user_id.role_line_ids + ], + }, + ) + # Database constraint has not been triggered + self.assertEqual(user.notification_type, "email") diff --git a/l10n_jp_country_state/README.rst b/l10n_jp_country_state/README.rst index 782254a9..3ba94e66 100644 --- a/l10n_jp_country_state/README.rst +++ b/l10n_jp_country_state/README.rst @@ -11,7 +11,7 @@ Japan Country States !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:b2117b837ac8bdbe84219bddad8c240ef6346fd60db9ee433b30c864a8e1380f + !! source digest: sha256:58dad6de76321726c50c6e037797585b0718dd19ac54915f6634338cc60222f4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -32,8 +32,13 @@ Japan Country States |badge1| |badge2| |badge3| |badge4| |badge5| -This module only adds translations to country state records for Japan, -for the sake of convenience. +As of Odoo 17, the Japan prefecture (``res.country.state``) records are +shipped with their native Japanese names (e.g. ``東京都``, ``北海道``) +as the source value. This module overrides those records to use English +names (e.g. ``Tokyo``, ``Hokkaido``) as the source and provides Japanese +translations, so users with ``ja_JP`` selected continue to see the +native prefecture names while other users see the romanized English +names. **Table of contents** diff --git a/l10n_jp_country_state/__manifest__.py b/l10n_jp_country_state/__manifest__.py index db1b43b8..598a39e4 100644 --- a/l10n_jp_country_state/__manifest__.py +++ b/l10n_jp_country_state/__manifest__.py @@ -2,11 +2,14 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Japan Country States", - "version": "18.0.1.0.0", + "version": "18.0.1.1.0", "depends": ["base_country_state_translatable"], "author": "Quartile, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/l10n-japan", "category": "Localization", + "data": [ + "data/res.country.state.csv", + ], "installable": True, } diff --git a/l10n_jp_country_state/data/res.country.state.csv b/l10n_jp_country_state/data/res.country.state.csv new file mode 100644 index 00000000..b506141b --- /dev/null +++ b/l10n_jp_country_state/data/res.country.state.csv @@ -0,0 +1,48 @@ +id,name +base.state_jp_jp-01,"Hokkaido" +base.state_jp_jp-02,"Aomori" +base.state_jp_jp-03,"Iwate" +base.state_jp_jp-04,"Miyagi" +base.state_jp_jp-05,"Akita" +base.state_jp_jp-06,"Yamagata" +base.state_jp_jp-07,"Fukushima" +base.state_jp_jp-08,"Ibaraki" +base.state_jp_jp-09,"Tochigi" +base.state_jp_jp-10,"Gunma" +base.state_jp_jp-11,"Saitama" +base.state_jp_jp-12,"Chiba" +base.state_jp_jp-13,"Tokyo" +base.state_jp_jp-14,"Kanagawa" +base.state_jp_jp-15,"Niigata" +base.state_jp_jp-16,"Toyama" +base.state_jp_jp-17,"Ishikawa" +base.state_jp_jp-18,"Fukui" +base.state_jp_jp-19,"Yamanashi" +base.state_jp_jp-20,"Nagano" +base.state_jp_jp-21,"Gifu" +base.state_jp_jp-22,"Shizuoka" +base.state_jp_jp-23,"Aichi" +base.state_jp_jp-24,"Mie" +base.state_jp_jp-25,"Shiga" +base.state_jp_jp-26,"Kyoto" +base.state_jp_jp-27,"Osaka" +base.state_jp_jp-28,"Hyogo" +base.state_jp_jp-29,"Nara" +base.state_jp_jp-30,"Wakayama" +base.state_jp_jp-31,"Tottori" +base.state_jp_jp-32,"Shimane" +base.state_jp_jp-33,"Okayama" +base.state_jp_jp-34,"Hiroshima" +base.state_jp_jp-35,"Yamaguchi" +base.state_jp_jp-36,"Tokushima" +base.state_jp_jp-37,"Kagawa" +base.state_jp_jp-38,"Ehime" +base.state_jp_jp-39,"Kochi" +base.state_jp_jp-40,"Fukuoka" +base.state_jp_jp-41,"Saga" +base.state_jp_jp-42,"Nagasaki" +base.state_jp_jp-43,"Kumamoto" +base.state_jp_jp-44,"Oita" +base.state_jp_jp-45,"Miyazaki" +base.state_jp_jp-46,"Kagoshima" +base.state_jp_jp-47,"Okinawa" diff --git a/l10n_jp_country_state/i18n_extra/ja.po b/l10n_jp_country_state/i18n_extra/ja.po index f8bfa5c4..a043e482 100644 --- a/l10n_jp_country_state/i18n_extra/ja.po +++ b/l10n_jp_country_state/i18n_extra/ja.po @@ -1,12 +1,11 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: +# * l10n_jp_country_state # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 18.0+e\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-06-06 06:15+0000\n" -"PO-Revision-Date: 2025-06-06 06:15+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -14,237 +13,237 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-01 msgid "Hokkaido" msgstr "北海道" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-02 msgid "Aomori" msgstr "青森県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-03 msgid "Iwate" msgstr "岩手県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-04 msgid "Miyagi" msgstr "宮城県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-05 msgid "Akita" msgstr "秋田県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-06 msgid "Yamagata" msgstr "山形県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-07 msgid "Fukushima" msgstr "福島県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-08 msgid "Ibaraki" msgstr "茨城県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-09 msgid "Tochigi" msgstr "栃木県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-10 msgid "Gunma" msgstr "群馬県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-11 msgid "Saitama" msgstr "埼玉県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-12 msgid "Chiba" msgstr "千葉県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-13 msgid "Tokyo" msgstr "東京都" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-14 msgid "Kanagawa" msgstr "神奈川県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-15 msgid "Niigata" msgstr "新潟県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-16 msgid "Toyama" msgstr "富山県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-17 msgid "Ishikawa" msgstr "石川県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-18 msgid "Fukui" msgstr "福井県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-19 msgid "Yamanashi" msgstr "山梨県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-20 msgid "Nagano" msgstr "長野県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-21 msgid "Gifu" msgstr "岐阜県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-22 msgid "Shizuoka" msgstr "静岡県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-23 msgid "Aichi" msgstr "愛知県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-24 msgid "Mie" msgstr "三重県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-25 msgid "Shiga" msgstr "滋賀県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-26 msgid "Kyoto" msgstr "京都府" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-27 msgid "Osaka" msgstr "大阪府" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-28 msgid "Hyogo" msgstr "兵庫県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-29 msgid "Nara" msgstr "奈良県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-30 msgid "Wakayama" msgstr "和歌山県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-31 msgid "Tottori" msgstr "鳥取県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-32 msgid "Shimane" msgstr "島根県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-33 msgid "Okayama" msgstr "岡山県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-34 msgid "Hiroshima" msgstr "広島県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-35 msgid "Yamaguchi" msgstr "山口県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-36 msgid "Tokushima" msgstr "徳島県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-37 msgid "Kagawa" msgstr "香川県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-38 msgid "Ehime" msgstr "愛媛県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-39 msgid "Kochi" msgstr "高知県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-40 msgid "Fukuoka" msgstr "福岡県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-41 msgid "Saga" msgstr "佐賀県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-42 msgid "Nagasaki" msgstr "長崎県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-43 msgid "Kumamoto" msgstr "熊本県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-44 msgid "Oita" msgstr "大分県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-45 msgid "Miyazaki" msgstr "宮崎県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-46 msgid "Kagoshima" msgstr "鹿児島県" -#. module: base +#. module: l10n_jp_country_state #: model:res.country.state,name:base.state_jp_jp-47 msgid "Okinawa" msgstr "沖縄県" diff --git a/l10n_jp_country_state/readme/DESCRIPTION.md b/l10n_jp_country_state/readme/DESCRIPTION.md index 24b8c646..cd5d653b 100644 --- a/l10n_jp_country_state/readme/DESCRIPTION.md +++ b/l10n_jp_country_state/readme/DESCRIPTION.md @@ -1,2 +1,6 @@ -This module only adds translations to country state records for Japan, -for the sake of convenience. +As of Odoo 17, the Japan prefecture (`res.country.state`) records are +shipped with their native Japanese names (e.g. `東京都`, `北海道`) as the +source value. This module overrides those records to use English names +(e.g. `Tokyo`, `Hokkaido`) as the source and provides Japanese +translations, so users with `ja_JP` selected continue to see the native +prefecture names while other users see the romanized English names. diff --git a/l10n_jp_country_state/static/description/index.html b/l10n_jp_country_state/static/description/index.html index 41a220f7..c9d0da79 100644 --- a/l10n_jp_country_state/static/description/index.html +++ b/l10n_jp_country_state/static/description/index.html @@ -372,11 +372,16 @@

Japan Country States

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:b2117b837ac8bdbe84219bddad8c240ef6346fd60db9ee433b30c864a8e1380f +!! source digest: sha256:58dad6de76321726c50c6e037797585b0718dd19ac54915f6634338cc60222f4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

-

This module only adds translations to country state records for Japan, -for the sake of convenience.

+

As of Odoo 17, the Japan prefecture (res.country.state) records are +shipped with their native Japanese names (e.g. 東京都, 北海道) +as the source value. This module overrides those records to use English +names (e.g. Tokyo, Hokkaido) as the source and provides Japanese +translations, so users with ja_JP selected continue to see the +native prefecture names while other users see the romanized English +names.

Table of contents

    diff --git a/l10n_jp_summary_invoice/README.rst b/l10n_jp_summary_invoice/README.rst index 230aae73..690f4c9b 100644 --- a/l10n_jp_summary_invoice/README.rst +++ b/l10n_jp_summary_invoice/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ===================== Japan Summary Invoice ===================== @@ -7,13 +11,13 @@ Japan Summary Invoice !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e6e9907d975dd745a0204630a2c47c0952c4dde7c5df8e7f06ee5fc94e1d361b + !! source digest: sha256:383b2c659d9ba8cabd01df1832910525f2878f0f18964c4d6023edee29c57747 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png :target: https://odoo-community.org/page/development-status :alt: Alpha -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-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 @@ -52,19 +56,19 @@ Configuration Go to *Invoicing/Accounting > Configuration > Settings* and update the following settings as necessary: -- **Summary Invoice Remark**: The remark that shows in the header part - of the summary invoice, such as '下記の通り御請求申し上げます。'. -- **Show Sales Order Number**: If selected, the sales order number will - be shown for each line in the summary invoice. -- **Show Invoice Narration**: If selected, the narration will appear - for each invoice in the summary invoice report. -- **Show Invoice Total Amount**: If selected, the total amount per - invoice will appear in the summary invoice report. +- **Summary Invoice Remark**: The remark that shows in the header part + of the summary invoice, such as '下記の通り御請求申し上げます。'. +- **Show Sales Order Number**: If selected, the sales order number will + be shown for each line in the summary invoice. +- **Show Invoice Narration**: If selected, the narration will appear for + each invoice in the summary invoice report. +- **Show Invoice Total Amount**: If selected, the total amount per + invoice will appear in the summary invoice report. To exclude billing for invoices created for a particular partner: -- Go to Contacts and select the partner. -- In the Invoicing (or Accounting) tab, enable 'Is Not For Billing'. +- Go to Contacts and select the partner. +- In the Invoicing (or Accounting) tab, enable 'Is Not For Billing'. Usage ===== @@ -72,12 +76,15 @@ Usage 1. Create a billing for customer invoices using the functionality of the account_billing module, and make adjustments as necessary. - - **Remit-to Bank**: If not selected, the bank account related to - the company with the smallest sequence will show in the printed - document. - - **Due Date**: The earliest due date among the selected invoices - will be proposed. Adjust this as necessary as it will show in the - printed document. + - **Remit-to Bank**: If not selected, the bank account related to the + company with the smallest sequence will show in the printed + document. + - **Due Date**: The earliest due date among the selected invoices + will be proposed. Adjust this as necessary as it will show in the + printed document. + - **Exclude invoices from billing**: On each invoice form, you can + check the "Is not for billing" field in the Billing tab to exclude + specific invoices from the billing process. 2. Validate the billing. An invoice for tax adjustment will be created automatically in case the recalculated tax amount is different from @@ -106,10 +113,10 @@ Authors Contributors ------------ -- `Quartile `__: +- `Quartile `__: - - Aung Ko Ko Lin - - Yoshi Tashiro + - Aung Ko Ko Lin + - Yoshi Tashiro Maintainers ----------- diff --git a/l10n_jp_summary_invoice/__manifest__.py b/l10n_jp_summary_invoice/__manifest__.py index 980247e2..b253bb77 100644 --- a/l10n_jp_summary_invoice/__manifest__.py +++ b/l10n_jp_summary_invoice/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Japan Summary Invoice", - "version": "18.0.1.1.1", + "version": "18.0.1.5.0", "category": "Japanese Localization", "author": "Quartile, Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-japan", diff --git a/l10n_jp_summary_invoice/models/account_billing.py b/l10n_jp_summary_invoice/models/account_billing.py index 295e4d69..cd3dde7b 100644 --- a/l10n_jp_summary_invoice/models/account_billing.py +++ b/l10n_jp_summary_invoice/models/account_billing.py @@ -49,6 +49,9 @@ class AccountBilling(models.Model): help="If not specified, the first bank account linked to the company will show " "in the report.", ) + report_subtitle = fields.Char( + help="Subtitle to be printed below the title of the summary invoice report.", + ) @api.constrains("state", "billing_line_ids") def _check_account_move_billability(self): diff --git a/l10n_jp_summary_invoice/models/account_move.py b/l10n_jp_summary_invoice/models/account_move.py index 30ee6e6c..3097b686 100644 --- a/l10n_jp_summary_invoice/models/account_move.py +++ b/l10n_jp_summary_invoice/models/account_move.py @@ -14,12 +14,6 @@ class AccountMove(models.Model): readonly=False, help="If selected, the invoice is excluded from the billing process.", ) - # TODO: This field should be moved to account_billing module. - billing_line_ids = fields.One2many( - comodel_name="account.billing.line", - inverse_name="move_id", - string="Billing Lines", - ) billing_id = fields.Many2one( comodel_name="account.billing", compute="_compute_billing_id", diff --git a/l10n_jp_summary_invoice/reports/report_summary_invoice_templates.xml b/l10n_jp_summary_invoice/reports/report_summary_invoice_templates.xml index c6a489d2..9485d1b9 100644 --- a/l10n_jp_summary_invoice/reports/report_summary_invoice_templates.xml +++ b/l10n_jp_summary_invoice/reports/report_summary_invoice_templates.xml @@ -151,6 +151,9 @@ >Cancelled Summary Invoice +

    + +

    diff --git a/l10n_jp_summary_invoice/static/description/index.html b/l10n_jp_summary_invoice/static/description/index.html index b636a6d3..20f75a9a 100644 --- a/l10n_jp_summary_invoice/static/description/index.html +++ b/l10n_jp_summary_invoice/static/description/index.html @@ -3,7 +3,7 @@ -Japan Summary Invoice +README.rst -
    -

    Japan Summary Invoice

    +
    + + +Odoo Community Association + +
    +

    Japan Summary Invoice

    -

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

    +

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

    This module adds a summary invoice report print functionality based on the account_billing module.

    The printed summary invoice is intended to serve as the Qualified Tax @@ -397,7 +402,7 @@

    Japan Summary Invoice

-

Configuration

+

Configuration

Go to Invoicing/Accounting > Configuration > Settings and update the following settings as necessary:

    @@ -405,8 +410,8 @@

    Configuration

    of the summary invoice, such as ‘下記の通り御請求申し上げます。’.
  • Show Sales Order Number: If selected, the sales order number will be shown for each line in the summary invoice.
  • -
  • Show Invoice Narration: If selected, the narration will appear -for each invoice in the summary invoice report.
  • +
  • Show Invoice Narration: If selected, the narration will appear for +each invoice in the summary invoice report.
  • Show Invoice Total Amount: If selected, the total amount per invoice will appear in the summary invoice report.
@@ -417,12 +422,12 @@

Configuration

-

Usage

+

Usage

  1. Create a billing for customer invoices using the functionality of the account_billing module, and make adjustments as necessary.
      -
    • Remit-to Bank: If not selected, the bank account related to -the company with the smallest sequence will show in the printed +
    • Remit-to Bank: If not selected, the bank account related to the +company with the smallest sequence will show in the printed document.
    • Due Date: The earliest due date among the selected invoices will be proposed. Adjust this as necessary as it will show in the @@ -440,7 +445,7 @@

      Usage

-

Bug Tracker

+

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 @@ -448,15 +453,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Quartile
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -479,5 +484,6 @@

Maintainers

+ diff --git a/l10n_jp_summary_invoice/tests/test_l10n_jp_summary_invoice.py b/l10n_jp_summary_invoice/tests/test_l10n_jp_summary_invoice.py index 05259038..13b7e371 100644 --- a/l10n_jp_summary_invoice/tests/test_l10n_jp_summary_invoice.py +++ b/l10n_jp_summary_invoice/tests/test_l10n_jp_summary_invoice.py @@ -241,19 +241,6 @@ def test_create_tax_adjustment_entry_child_partner(self): billing.with_company(self.company).validate_billing() self.assertTrue(billing.tax_adjustment_entry_id) - def test_is_not_for_billing(self): - self.partner.is_not_for_billing = True - invoice = self._create_invoice(50, self.tax_10) - invoice = invoice.with_context(skip_readonly_check=True) - self.assertTrue(invoice.is_not_for_billing) - partner_2 = self.env["res.partner"].create({"name": "Test Partner 2"}) - invoice.partner_id = partner_2 - self.assertFalse(invoice.is_not_for_billing) - partner_2.is_not_for_billing = True - self.assertFalse(invoice.is_not_for_billing) - invoice.partner_id = self.partner - self.assertTrue(invoice.is_not_for_billing) - def test_compute_billing_id(self): inv1 = self._create_invoice(100, self.tax_10) inv2 = self._create_invoice(200, self.tax_10) @@ -301,3 +288,16 @@ def test_check_tax_adjustment_with_currency_rounding_issue(self): billing.with_company(self.company).validate_billing() self.assertEqual(billing.state, "billed") self.assertFalse(billing.tax_adjustment_entry_id) + + def test_is_not_for_billing(self): + self.partner.is_not_for_billing = True + invoice = self._create_invoice(50, self.tax_10) + invoice = invoice.with_context(skip_readonly_check=True) + self.assertTrue(invoice.is_not_for_billing) + partner_2 = self.env["res.partner"].create({"name": "Test Partner 2"}) + invoice.partner_id = partner_2 + self.assertFalse(invoice.is_not_for_billing) + partner_2.is_not_for_billing = True + self.assertFalse(invoice.is_not_for_billing) + invoice.partner_id = self.partner + self.assertTrue(invoice.is_not_for_billing) diff --git a/l10n_jp_summary_invoice/views/account_billing_views.xml b/l10n_jp_summary_invoice/views/account_billing_views.xml index dcda96d0..8a39ad6c 100644 --- a/l10n_jp_summary_invoice/views/account_billing_views.xml +++ b/l10n_jp_summary_invoice/views/account_billing_views.xml @@ -52,6 +52,7 @@ + diff --git a/mail_layout_force/README.rst b/mail_layout_force/README.rst index 47f01672..aa5b2c98 100644 --- a/mail_layout_force/README.rst +++ b/mail_layout_force/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ================= Mail Layout Force ================= @@ -7,13 +11,13 @@ Mail Layout Force !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:988dd474248a3c1d5cf299ddbbe938b3706c0ebaca05219cede46dc6a2eed89a + !! source digest: sha256:baadb7cfc76ac450e9fdd0b52f04a5ea57a275da88e050ae8ad80ffdbb90bb6e !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Fmail-lightgray.png?logo=github @@ -39,9 +43,9 @@ There are notably three main layouts used in Odoo, and the user can't control when they're used, as it's hardcoded into the different applications. -- ``mail.mail_notification_layout`` -- ``mail.mail_notification_layout_with_responsible_signature`` -- ``mail.mail_notification_light`` +- ``mail.mail_notification_layout`` +- ``mail.mail_notification_layout_with_responsible_signature`` +- ``mail.mail_notification_light`` This module allows to force a specific layout for a given ``email.template``, effectively overwriting the one hardcoded by Odoo. @@ -74,9 +78,9 @@ To configure a custom layout of your own, some technical knowledge is needed. You can see how the existing layouts are defined for details or inspiration: -- ``mail.mail_notification_layout`` -- ``mail.mail_notification_layout_with_responsible_signature`` -- ``mail.mail_notification_light`` +- ``mail.mail_notification_layout`` +- ``mail.mail_notification_layout_with_responsible_signature`` +- ``mail.mail_notification_light`` To force a custom layout for emails that do not use an existing ``email.template`` record (e.g., emails sent from the chatter) or for @@ -91,11 +95,11 @@ opening the mail composer (e.g., invoice send actions like 3. Open the original layout view that you want to replace. Under the *Layout Mapping* tab: - - Click *Add a line* - - Set *Substitute Layout* to the new custom layout you created - - Set *Models* if you want to apply the replacement only to specific - models. If left empty, the email layout will be replaced for all - models + - Click *Add a line* + - Set *Substitute Layout* to the new custom layout you created + - Set *Models* if you want to apply the replacement only to specific + models. If left empty, the email layout will be replaced for all + models Bug Tracker =========== @@ -118,16 +122,16 @@ Authors Contributors ------------ -- ``Camptocamp ``\ \_ +- ``Camptocamp ``\ \_ - - Iván Todorovich ivan.todorovich@camptocamp.com + - Iván Todorovich ivan.todorovich@camptocamp.com -- Abraham Anes abrahamanes@gmail.com +- Abraham Anes abrahamanes@gmail.com -- ``Quartile ``\ \_ +- ``Quartile ``\ \_ - - Aung Ko Ko Lin - - Yoshi Tashiro + - Aung Ko Ko Lin + - Yoshi Tashiro Maintainers ----------- diff --git a/mail_layout_force/static/description/index.html b/mail_layout_force/static/description/index.html index a06a6345..bee82b75 100644 --- a/mail_layout_force/static/description/index.html +++ b/mail_layout_force/static/description/index.html @@ -3,7 +3,7 @@ -Mail Layout Force +README.rst -
-

Mail Layout Force

+
+ + +Odoo Community Association + +
+

Mail Layout Force

-

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

+

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

Odoo will add a default email layout on most commercial communications.

The email layout is a QWeb view that ends up wrapping the message body when sending an email. It usually displays the related document @@ -404,7 +409,7 @@

Mail Layout Force

-

Configuration

+

Configuration

To configure a forced layout for email templates:

  1. Go to Settings > Technical > Email > Email Templates
  2. @@ -444,7 +449,7 @@

    Configuration

-

Bug Tracker

+

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 @@ -452,15 +457,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Camptocamp
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -490,5 +495,6 @@

Maintainers

+
diff --git a/partner_bank_acc_holder_name/static/description/icon.png b/partner_bank_acc_holder_name/static/description/icon.png new file mode 100644 index 00000000..1dcc49c2 Binary files /dev/null and b/partner_bank_acc_holder_name/static/description/icon.png differ diff --git a/partner_contact_address_default/README.rst b/partner_contact_address_default/README.rst index 7cdefaf0..ee512f0f 100644 --- a/partner_contact_address_default/README.rst +++ b/partner_contact_address_default/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + =============================== Partner Contact address default =============================== @@ -7,13 +11,13 @@ Partner Contact address default !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:81d150284a7193759bbb0a4b2be19dd6f45b76d3d3c403f1823b936ccdeefb0f + !! source digest: sha256:67038546311e88f2bf8758410a350d0cd6fd0ac04d6b000eb5c2b5c5b9c89304 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Fpartner--contact-lightgray.png?logo=github @@ -73,26 +77,26 @@ Authors Contributors ------------ -- `Tecnativa `__: +- `Tecnativa `__: - - Carlos Dauden - - Sergio Teruel + - Carlos Dauden + - Sergio Teruel -- `Sygel `__: +- `Sygel `__: - - Manuel Regidor + - Manuel Regidor -- `Studio73 `__: +- `Studio73 `__: - - Carlos Reyes + - Carlos Reyes -- `ForgeFlow `__: +- `ForgeFlow `__: - - Laura Cazorla + - Laura Cazorla -- `Quartile `__: +- `Quartile `__: - - Aung Ko Ko Lin + - Aung Ko Ko Lin Maintainers ----------- diff --git a/partner_contact_address_default/__manifest__.py b/partner_contact_address_default/__manifest__.py index 386933e2..66c616ce 100644 --- a/partner_contact_address_default/__manifest__.py +++ b/partner_contact_address_default/__manifest__.py @@ -5,7 +5,7 @@ "name": "Partner Contact address default", "summary": "Set a default delivery address, " "invoice address and contact for contacts", - "version": "18.0.1.0.0", + "version": "18.0.1.0.1", "development_status": "Beta", "category": "Generic Modules/Base", "website": "https://github.com/OCA/partner-contact", diff --git a/partner_contact_address_default/models/res_partner.py b/partner_contact_address_default/models/res_partner.py index ce132030..b5483bbc 100644 --- a/partner_contact_address_default/models/res_partner.py +++ b/partner_contact_address_default/models/res_partner.py @@ -25,7 +25,7 @@ class ResPartner(models.Model): partner_invoice_domain = fields.Binary(compute="_compute_partner_domains") partner_contact_domain = fields.Binary(compute="_compute_partner_domains") - @api.depends_context("company") + @api.depends_context("allowed_company_ids") @api.depends("commercial_partner_id") def _compute_partner_domains(self): for partner in self: diff --git a/partner_contact_address_default/static/description/index.html b/partner_contact_address_default/static/description/index.html index efd5f5c7..aff3a642 100644 --- a/partner_contact_address_default/static/description/index.html +++ b/partner_contact_address_default/static/description/index.html @@ -3,7 +3,7 @@ -Partner Contact address default +README.rst -
-

Partner Contact address default

+
+ + +Odoo Community Association + +
+

Partner Contact address default

-

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runboat

This module extends the functionality of base partner module to allow to set a default delivery and invoice address and a default contact for contacts.

@@ -388,7 +393,7 @@

Partner Contact address default

-

Configuration

+

Configuration

  1. Go to Settings.
  2. Under Contact Category, enable Contact Address Default Allow All @@ -397,7 +402,7 @@

    Configuration

-

Usage

+

Usage

  1. Go to Contacts.
  2. Select default delivery address, invoice address or contact for @@ -405,7 +410,7 @@

    Usage

-

Bug Tracker

+

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 @@ -413,15 +418,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Tecnativa
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -460,5 +465,6 @@

Maintainers

+
diff --git a/purchase_order_etd_eta/README.rst b/purchase_order_etd_eta/README.rst index bd95c9f4..8f76176c 100644 --- a/purchase_order_etd_eta/README.rst +++ b/purchase_order_etd_eta/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ====================== Purchase Order ETD/ETA ====================== @@ -7,13 +11,13 @@ Purchase Order ETD/ETA !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:38890cab558012aca5ba0396b59d0116ea743611b7c0bcb74fdda76da3465194 + !! source digest: sha256:e2bd2f6c01420f0876484077e5a12425d4c3e02fb9441f4be395699eaaeb3247 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Fpurchase--workflow-lightgray.png?logo=github @@ -76,9 +80,9 @@ Authors Contributors ------------ -- `Quartile `__: +- `Quartile `__: - - Aung Ko Ko Lin + - Aung Ko Ko Lin Maintainers ----------- diff --git a/purchase_order_etd_eta/migrations/18.0.1.0.0/post-migrate.py b/purchase_order_etd_eta/migrations/18.0.1.0.0/post-migrate.py deleted file mode 100644 index 86d44855..00000000 --- a/purchase_order_etd_eta/migrations/18.0.1.0.0/post-migrate.py +++ /dev/null @@ -1,15 +0,0 @@ -def migrate(cr, version): - """Copy eta_date and etd_date values to shipping_schedule_note field.""" - cr.execute(""" - UPDATE purchase_order - SET shipping_schedule_note = - CASE - WHEN etd_date IS NOT NULL AND eta_date IS NOT NULL - THEN 'ETD: ' || TRIM(etd_date) || ' ETA: ' || TRIM(eta_date) - WHEN etd_date IS NOT NULL - THEN 'ETD: ' || TRIM(etd_date) - WHEN eta_date IS NOT NULL - THEN 'ETA: ' || TRIM(eta_date) - END - WHERE etd_date IS NOT NULL OR eta_date IS NOT NULL - """) diff --git a/purchase_order_etd_eta/report/purchase_order_templates.xml b/purchase_order_etd_eta/report/purchase_order_templates.xml index f7255123..0a398932 100644 --- a/purchase_order_etd_eta/report/purchase_order_templates.xml +++ b/purchase_order_etd_eta/report/purchase_order_templates.xml @@ -10,7 +10,7 @@ ETA:

-

+
Shipping Schedule Note:

-Purchase Order ETD/ETA +README.rst -

-

Purchase Order ETD/ETA

+
+ + +Odoo Community Association + +
+

Purchase Order ETD/ETA

-

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runboat

The module adds ETD, ETA, and Shipping Schedule Note fields to purchase orders and displays them in the purchase order and RFQ reports.

Table of contents

@@ -387,14 +392,14 @@

Purchase Order ETD/ETA

-

Use Cases / Context

+

Use Cases / Context

Some companies need to store ETD and ETA information on Purchase Orders for communication with suppliers and for printing on reports.

These values are informational and may include simple instructions such as “ASAP” or “TBD”.

-

Configuration

+

Configuration

To hide the Expected Arrival in purchase reports when ETA is set:

  1. Go to Purchase ‣ Configuration ‣ Settings.
  2. @@ -404,7 +409,7 @@

    Configuration

-

Bug Tracker

+

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 @@ -412,15 +417,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Quartile
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -444,5 +449,6 @@

Maintainers

+
diff --git a/purchase_order_secondary_unit/README.rst b/purchase_order_secondary_unit/README.rst index f0dc2327..e321456a 100644 --- a/purchase_order_secondary_unit/README.rst +++ b/purchase_order_secondary_unit/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ============================= Purchase Order Secondary Unit ============================= @@ -7,13 +11,13 @@ Purchase Order Secondary Unit !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:2b71909b287e9e5c437aea172c4c165ed1bee7b3e981d1c44d99c8bfaae5740d + !! source digest: sha256:931f6f1aa647d4627f4c32d5a657bb5fcbfef63f595c2c84f0790ff27a44ee7d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Fpurchase--workflow-lightgray.png?logo=github @@ -50,23 +54,6 @@ For configuration of displaying secondary unit information in purchase reports and the Purchase Order portal, see the guidelines provided in product_secondary_unit. -Settings Visibility -------------------- - -When installing this module, all internal users are automatically added -to the ``product_secondary_unit.group_purchase_secondary_unit`` security -group. This makes the Purchase-related "Hide Secondary Qty Column" and -"Secondary Unit Price Display" settings visible in **Settings > Units of -Measure**. - -If you installed this module before these report presentation settings -were introduced in ``product_secondary_unit``, users may not see these -configuration options. To fix this: - -1. Go to **Settings > Users & Companies > Groups** -2. Search for "Purchase Secondary Unit" -3. Add the relevant users to that group - Usage ===== @@ -81,13 +68,13 @@ To use this module you need to: **Vendor Pricelist Integration** -- When adding a vendor to a product's pricelist (via *Purchase tab > - Vendors*), the secondary unit of measure is automatically defaulted - from the product variant's purchase secondary UOM, or from the - product template if not set on the variant. -- When a new vendor pricelist record is created from purchase order - confirmation, the secondary UOM from the purchase order line is - automatically stored in the vendor pricelist entry. +- When adding a vendor to a product's pricelist (via *Purchase tab > + Vendors*), the secondary unit of measure is automatically defaulted + from the product variant's purchase secondary UOM, or from the product + template if not set on the variant. +- When a new vendor pricelist record is created from purchase order + confirmation, the secondary UOM from the purchase order line is + automatically stored in the vendor pricelist entry. Known issues / Roadmap ====================== @@ -118,17 +105,17 @@ Authors Contributors ------------ -- `Tecnativa `__: +- `Tecnativa `__: - - Sergio Teruel - - Ernesto Tejeda + - Sergio Teruel + - Ernesto Tejeda -- Nikul Chaudhary -- Pimolnat Suntian -- Miguel Ángel Gómez -- `Quartile `__: +- Nikul Chaudhary +- Pimolnat Suntian +- Miguel Ángel Gómez +- `Quartile `__: - - Yoshi Tashiro + - Yoshi Tashiro Maintainers ----------- diff --git a/purchase_order_secondary_unit/__manifest__.py b/purchase_order_secondary_unit/__manifest__.py index 7368f53f..04badf67 100644 --- a/purchase_order_secondary_unit/__manifest__.py +++ b/purchase_order_secondary_unit/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Purchase Order Secondary Unit", "summary": "Purchase product in a secondary unit", - "version": "18.0.1.2.1", + "version": "18.0.1.2.2", "development_status": "Beta", "category": "Purchase", "website": "https://github.com/OCA/purchase-workflow", @@ -14,10 +14,8 @@ "auto_install": True, "depends": ["purchase", "product_secondary_unit"], "data": [ - "security/purchase_order_secondary_unit_groups.xml", "views/product_views.xml", "views/product_supplierinfo_views.xml", - "views/purchase_order_portal_templates.xml", "views/purchase_order_views.xml", "reports/purchase_order_templates.xml", "reports/purchase_quotation_templates.xml", diff --git a/purchase_order_secondary_unit/readme/CONFIGURE.md b/purchase_order_secondary_unit/readme/CONFIGURE.md index d50c70c5..2ba195bf 100644 --- a/purchase_order_secondary_unit/readme/CONFIGURE.md +++ b/purchase_order_secondary_unit/readme/CONFIGURE.md @@ -1,16 +1,2 @@ For configuration of displaying secondary unit information in purchase reports and the Purchase Order portal, see the guidelines provided in product_secondary_unit. - -## Settings Visibility - -When installing this module, all internal users are automatically added to the -`product_secondary_unit.group_purchase_secondary_unit` security group. This makes -the Purchase-related "Hide Secondary Qty Column" and "Secondary Unit Price Display" -settings visible in **Settings > Units of Measure**. - -If you installed this module before these report presentation settings were introduced -in `product_secondary_unit`, users may not see these configuration options. To fix this: - -1. Go to **Settings > Users & Companies > Groups** -2. Search for "Purchase Secondary Unit" -3. Add the relevant users to that group diff --git a/purchase_order_secondary_unit/reports/purchase_order_templates.xml b/purchase_order_secondary_unit/reports/purchase_order_templates.xml index 86425de5..b79d2fc3 100644 --- a/purchase_order_secondary_unit/reports/purchase_order_templates.xml +++ b/purchase_order_secondary_unit/reports/purchase_order_templates.xml @@ -6,64 +6,16 @@ > - + Second Qty - + - - - line.get_secondary_uom_display_mode() != 'secondary' - - - line.get_secondary_uom_display_mode() != 'secondary' - - - - - - - - - - - -
- - ( - ) - -
-
- - - line.get_secondary_uom_display_mode() != 'secondary' - - - - diff --git a/purchase_order_secondary_unit/reports/purchase_quotation_templates.xml b/purchase_order_secondary_unit/reports/purchase_quotation_templates.xml index 41661d3a..ef64f13d 100644 --- a/purchase_order_secondary_unit/reports/purchase_quotation_templates.xml +++ b/purchase_order_secondary_unit/reports/purchase_quotation_templates.xml @@ -4,57 +4,18 @@ id="report_purchasequotation_document" inherit_id="purchase.report_purchasequotation_document" > - + - + Second Qty - + - + - - - order_line.get_secondary_uom_display_mode() != 'secondary' - - - order_line.get_secondary_uom_display_mode() != 'secondary' - - - - - - - - - - - -
- - ( - ) - -
-
diff --git a/purchase_order_secondary_unit/security/purchase_order_secondary_unit_groups.xml b/purchase_order_secondary_unit/security/purchase_order_secondary_unit_groups.xml deleted file mode 100644 index 3467b8cd..00000000 --- a/purchase_order_secondary_unit/security/purchase_order_secondary_unit_groups.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/purchase_order_secondary_unit/static/description/index.html b/purchase_order_secondary_unit/static/description/index.html index 27a815cc..21fc85d2 100644 --- a/purchase_order_secondary_unit/static/description/index.html +++ b/purchase_order_secondary_unit/static/description/index.html @@ -3,7 +3,7 @@ -Purchase Order Secondary Unit +README.rst -
-

Purchase Order Secondary Unit

+
+ + +Odoo Community Association + +
+

Purchase Order Secondary Unit

-

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runboat

This module extends the functionality of purchase orders to allow buy products in secondary unit of distinct category.

Users can enter quantities and prices in secondary units on purchase @@ -380,45 +385,26 @@

Purchase Order Secondary Unit

Table of contents

-

Configuration

+

Configuration

For configuration of displaying secondary unit information in purchase reports and the Purchase Order portal, see the guidelines provided in product_secondary_unit.

-
-

Settings Visibility

-

When installing this module, all internal users are automatically added -to the product_secondary_unit.group_purchase_secondary_unit security -group. This makes the Purchase-related “Hide Secondary Qty Column” and -“Secondary Unit Price Display” settings visible in Settings > Units of -Measure.

-

If you installed this module before these report presentation settings -were introduced in product_secondary_unit, users may not see these -configuration options. To fix this:

-
    -
  1. Go to Settings > Users & Companies > Groups
  2. -
  3. Search for “Purchase Secondary Unit”
  4. -
  5. Add the relevant users to that group
  6. -
-
-

Usage

+

Usage

To use this module you need to:

  1. Go to a Product > General Information tab.
  2. @@ -432,22 +418,22 @@

    Usage

    • When adding a vendor to a product’s pricelist (via Purchase tab > Vendors), the secondary unit of measure is automatically defaulted -from the product variant’s purchase secondary UOM, or from the -product template if not set on the variant.
    • +from the product variant’s purchase secondary UOM, or from the product +template if not set on the variant.
    • When a new vendor pricelist record is created from purchase order confirmation, the secondary UOM from the purchase order line is automatically stored in the vendor pricelist entry.
-

Known issues / Roadmap

+

Known issues / Roadmap

Updating existing vendor pricelist records from purchase order confirmation does not currently support secondary UOM or secondary UOM pricing. This is not included in the current scope and may be considered in future improvements.

-

Bug Tracker

+

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 @@ -455,15 +441,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Tecnativa
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -493,5 +479,6 @@

Maintainers

+
diff --git a/purchase_order_secondary_unit/views/purchase_order_portal_templates.xml b/purchase_order_secondary_unit/views/purchase_order_portal_templates.xml deleted file mode 100644 index 3f01e80e..00000000 --- a/purchase_order_secondary_unit/views/purchase_order_portal_templates.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - diff --git a/report_pdf_zip_download/static/src/js/action_manager_report.esm.js b/report_pdf_zip_download/static/src/js/action_manager_report.esm.js index 930dda59..6983ca51 100644 --- a/report_pdf_zip_download/static/src/js/action_manager_report.esm.js +++ b/report_pdf_zip_download/static/src/js/action_manager_report.esm.js @@ -1,6 +1,7 @@ // © 2017 Creu Blanca // Copyright 2024 Quartile (https://www.quartile.co) // License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +/* global URLSearchParams */ import {download} from "@web/core/network/download"; import {registry} from "@web/core/registry"; import {user} from "@web/core/user"; diff --git a/report_positioned_image/README.rst b/report_positioned_image/README.rst index 1be5aebe..d55eb0d9 100644 --- a/report_positioned_image/README.rst +++ b/report_positioned_image/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ======================= Report Positioned Image ======================= @@ -7,13 +11,13 @@ Report Positioned Image !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:8bc2f08c57ac7bd7e62467501b1ac95394b9e6047b1a4fa48e08a4a99a760e2e + !! source digest: sha256:7492b81c95084617eacd2468003a6783881838c17e7ef230b84bf4d6733dc0e3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Freporting--engine-lightgray.png?logo=github @@ -35,11 +39,13 @@ they appear on all pages or only the first page. The module supports two types of images: -- *Company-level Images*: Define images at the company level that can - be included in reports by enabling the *Include Company Images* - option -- *Report-specific Images*: Configure specific images for individual - reports, filtered by company context and always shown when configured +- *Company-level Images*: Define images at the company level that can be + included in reports by enabling the *Include Company Images* option +- *Report-specific Images*: Configure specific images for individual + reports, filtered by company context and always shown when configured + +Images can be assigned to a specific company or left as shared records +(without company assignment) for use across multiple companies **Table of contents** @@ -56,18 +62,20 @@ To configure company-level images: 3. Navigate to the *Report Images* tab 4. Add images with position settings: - - Upload an image - width defaults to 50mm and height is - automatically calculated to maintain the original aspect ratio - - *Top (mm)*: Distance from the top of the page - - *Left (mm)*: Distance from the left edge of the page - - *Width (mm)*: Width of the image (changing this auto-adjusts - height) - - *Height (mm)*: Height of the image (changing this auto-adjusts - width) - - *Respect Image Ratio*: When enabled (default), changing width or - height automatically adjusts the other dimension to maintain - aspect ratio. Uncheck for manual control of both dimensions. - - *First Page Only*: Check to show only on the first page + - Upload an image - width defaults to 50mm and height is + automatically calculated to maintain the original aspect ratio + - *Top (mm)*: Distance from the top of the page + - *Left (mm)*: Distance from the left edge of the page + - *Width (mm)*: Width of the image (changing this auto-adjusts + height) + - *Height (mm)*: Height of the image (changing this auto-adjusts + width) + - *Respect Image Ratio*: When enabled (default), changing width or + height automatically adjusts the other dimension to maintain aspect + ratio. Uncheck for manual control of both dimensions. + - *First Page Only*: Check to show only on the first page + - *Company*: Automatically set to the current company when creating + from the company form. To create shared images, leave empty. To configure report-specific images: @@ -105,10 +113,10 @@ Authors Contributors ------------ -- Quartile +- Quartile - - Tatsuki Kanda - - Aung Ko Ko Lin + - Tatsuki Kanda + - Aung Ko Ko Lin Maintainers ----------- diff --git a/report_positioned_image/models/ir_actions_report.py b/report_positioned_image/models/ir_actions_report.py index 979a727e..9fdca590 100644 --- a/report_positioned_image/models/ir_actions_report.py +++ b/report_positioned_image/models/ir_actions_report.py @@ -22,42 +22,6 @@ class IrActionsReport(models.Model): string="Report Images", ) - def _render_qweb_pdf(self, report_ref, res_ids=None, data=None): - """Set company context so _get_positioned_image_configs uses the - correct company. - """ - company = self._get_report_company(res_ids) - return super(IrActionsReport, self.with_company(company))._render_qweb_pdf( - report_ref, res_ids, data - ) - - def _prepare_html(self, html, report_model=False): - image_configs = self._get_positioned_image_configs() - if not image_configs: - return super()._prepare_html(html, report_model=report_model) - result = super()._prepare_html(html, report_model=report_model) - if not isinstance(result, tuple): - return result - bodies, res_ids, header, footer, specific_paperformat_args = result - if image_configs: - header = self._inject_images_into_header(header, image_configs) - return bodies, res_ids, header, footer, specific_paperformat_args - - def _inject_images_into_header(self, header, image_configs): - image_html = self._build_image_html(image_configs) - return self._insert_html_into_header(header, image_html) - - def _insert_html_into_header(self, header, html_to_inject): - if Markup("") in header: - return header.replace( - Markup(""), html_to_inject + Markup(""), 1 - ) - if Markup("") in header: - return header.replace( - Markup(""), Markup("") + html_to_inject, 1 - ) - return header + html_to_inject - @staticmethod def _build_image_html(images): parts = [] @@ -85,15 +49,20 @@ def _build_image_html(images): ) return Markup("".join(parts)) - def _get_report_company(self, res_ids): - if not res_ids or not self.model: - return self.env.company - model = self.env[self.model] - if "company_id" not in model._fields: - return self.env.company - records = model.browse(res_ids).exists() - companies = records.mapped("company_id") - return companies[0] if len(companies) == 1 else self.env.company + def _insert_html_into_header(self, header, html_to_inject): + if Markup("") in header: + return header.replace( + Markup(""), html_to_inject + Markup(""), 1 + ) + if Markup("") in header: + return header.replace( + Markup(""), Markup("") + html_to_inject, 1 + ) + return header + html_to_inject + + def _inject_images_into_header(self, header, image_configs): + image_html = self._build_image_html(image_configs) + return self._insert_html_into_header(header, image_html) def _get_positioned_image_configs(self): company = self.env.company @@ -114,3 +83,33 @@ def _get_positioned_image_configs(self): for img in images if img.image ] + + def _prepare_html(self, html, report_model=False): + image_configs = self._get_positioned_image_configs() + if not image_configs: + return super()._prepare_html(html, report_model=report_model) + result = super()._prepare_html(html, report_model=report_model) + if not isinstance(result, tuple): + return result + bodies, res_ids, header, footer, specific_paperformat_args = result + header = self._inject_images_into_header(header, image_configs) + return bodies, res_ids, header, footer, specific_paperformat_args + + def _get_report_company(self, res_ids): + if not res_ids or not self.model: + return self.env.company + model = self.env[self.model] + if "company_id" not in model._fields: + return self.env.company + records = model.browse(res_ids).exists() + companies = records.mapped("company_id") + return companies[0] if len(companies) == 1 else self.env.company + + def _render_qweb_pdf(self, report_ref, res_ids=None, data=None): + """Set company context so _get_positioned_image_configs uses the + correct company. + """ + company = self._get_report_company(res_ids) + return super(IrActionsReport, self.with_company(company))._render_qweb_pdf( + report_ref, res_ids, data + ) diff --git a/report_positioned_image/models/report_positioned_image.py b/report_positioned_image/models/report_positioned_image.py index 2a283f0e..edfb5f9d 100644 --- a/report_positioned_image/models/report_positioned_image.py +++ b/report_positioned_image/models/report_positioned_image.py @@ -36,6 +36,19 @@ class ReportPositionedImage(models.Model): def _default_company_id(self): return self.env.context.get("default_company_id") + @api.constrains("pos_top", "pos_left", "width", "height") + def _check_positive_values(self): + """Ensure position and dimension fields have positive values.""" + for record in self: + if record.pos_top < 0: + raise ValidationError(_("Top position must be a positive value.")) + if record.pos_left < 0: + raise ValidationError(_("Left position must be a positive value.")) + if record.width <= 0: + raise ValidationError(_("Width must be greater than zero.")) + if record.height <= 0: + raise ValidationError(_("Height must be greater than zero.")) + def _get_aspect_ratio(self): """Get image aspect ratio (width/height).""" if not self.image: @@ -83,15 +96,21 @@ def _onchange_height(self): self.height * ratio, 2 ) - @api.constrains("pos_top", "pos_left", "width", "height") - def _check_positive_values(self): - """Ensure position and dimension fields have positive values.""" - for record in self: - if record.pos_top < 0: - raise ValidationError(_("Top position must be a positive value.")) - if record.pos_left < 0: - raise ValidationError(_("Left position must be a positive value.")) - if record.width <= 0: - raise ValidationError(_("Width must be greater than zero.")) - if record.height <= 0: - raise ValidationError(_("Height must be greater than zero.")) + @api.onchange("company_id") + def _onchange_company_id(self): + """Prevent assigning to a different company when created from company form.""" + default_company_id = self.env.context.get("default_company_id") + if not default_company_id: + return + if self.company_id and self.company_id.id != default_company_id: + self.company_id = default_company_id + return { + "warning": { + "title": _("Company Assignment"), + "message": _( + "You cannot assign this image to a different company. " + "Please use the dedicated wizard to assign images to other " + "companies." + ), + } + } diff --git a/report_positioned_image/readme/CONFIGURE.md b/report_positioned_image/readme/CONFIGURE.md index 9ffc4d6d..0342fbd9 100644 --- a/report_positioned_image/readme/CONFIGURE.md +++ b/report_positioned_image/readme/CONFIGURE.md @@ -14,6 +14,8 @@ To configure company-level images: automatically adjusts the other dimension to maintain aspect ratio. Uncheck for manual control of both dimensions. - *First Page Only*: Check to show only on the first page + - *Company*: Automatically set to the current company when creating from + the company form. To create shared images, leave empty. To configure report-specific images: diff --git a/report_positioned_image/readme/DESCRIPTION.md b/report_positioned_image/readme/DESCRIPTION.md index ddc38649..0220a9c0 100644 --- a/report_positioned_image/readme/DESCRIPTION.md +++ b/report_positioned_image/readme/DESCRIPTION.md @@ -9,3 +9,6 @@ The module supports two types of images: included in reports by enabling the *Include Company Images* option - *Report-specific Images*: Configure specific images for individual reports, filtered by company context and always shown when configured + +Images can be assigned to a specific company or left as shared records +(without company assignment) for use across multiple companies diff --git a/report_positioned_image/static/description/icon.png b/report_positioned_image/static/description/icon.png new file mode 100644 index 00000000..1dcc49c2 Binary files /dev/null and b/report_positioned_image/static/description/icon.png differ diff --git a/report_positioned_image/static/description/index.html b/report_positioned_image/static/description/index.html index 15539810..a83b1245 100644 --- a/report_positioned_image/static/description/index.html +++ b/report_positioned_image/static/description/index.html @@ -3,7 +3,7 @@ -Report Positioned Image +README.rst -
-

Report Positioned Image

+
+ + +Odoo Community Association + +
+

Report Positioned Image

-

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

This module allows you to add positioned images (such as watermarks, logos, or stamps) to PDF reports. Images can be precisely positioned using millimeter coordinates (top, left) and you can control whether they appear on all pages or only the first page.

The module supports two types of images:

    -
  • Company-level Images: Define images at the company level that can -be included in reports by enabling the Include Company Images -option
  • +
  • Company-level Images: Define images at the company level that can be +included in reports by enabling the Include Company Images option
  • Report-specific Images: Configure specific images for individual reports, filtered by company context and always shown when configured
+

Images can be assigned to a specific company or left as shared records +(without company assignment) for use across multiple companies

Table of contents

    @@ -396,7 +402,7 @@

    Report Positioned Image

-

Configuration

+

Configuration

To configure company-level images:

  1. Go to Settings / Companies
  2. @@ -412,9 +418,11 @@

    Configuration

  3. Height (mm): Height of the image (changing this auto-adjusts width)
  4. Respect Image Ratio: When enabled (default), changing width or -height automatically adjusts the other dimension to maintain -aspect ratio. Uncheck for manual control of both dimensions.
  5. +height automatically adjusts the other dimension to maintain aspect +ratio. Uncheck for manual control of both dimensions.
  6. First Page Only: Check to show only on the first page
  7. +
  8. Company: Automatically set to the current company when creating +from the company form. To create shared images, leave empty.
@@ -434,7 +442,7 @@

Configuration

will update automatically to prevent distortion.

-

Bug Tracker

+

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 @@ -442,15 +450,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Quartile
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -473,5 +481,6 @@

Maintainers

+
diff --git a/report_positioned_image/tests/test_report_positioned_image.py b/report_positioned_image/tests/test_report_positioned_image.py index a76a99fe..e52e5302 100644 --- a/report_positioned_image/tests/test_report_positioned_image.py +++ b/report_positioned_image/tests/test_report_positioned_image.py @@ -232,3 +232,43 @@ def test_global_images_appear_for_all_companies(self): self.company_b )._get_positioned_image_configs() self.assertEqual(len(configs_b), 1) + + def test_company_id_onchange_with_context(self): + image = ( + self.env["report.positioned.image"] + .with_context(default_company_id=self.company_a.id) + .new( + { + "name": "Test Image", + "image": self.test_image, + "width": 10.0, + "height": 10.0, + "company_id": self.company_a.id, + } + ) + ) + image.company_id = self.company_b + result = image._onchange_company_id() + self.assertIsNotNone(result) + self.assertIn("warning", result) + self.assertEqual(image.company_id, self.company_a) + image.company_id = self.company_a + result = image._onchange_company_id() + self.assertIsNone(result) + self.assertEqual(image.company_id, self.company_a) + image.company_id = False + result = image._onchange_company_id() + self.assertIsNone(result) + self.assertFalse(image.company_id) + image_no_context = self.env["report.positioned.image"].new( + { + "name": "Free Image", + "image": self.test_image, + "width": 10.0, + "height": 10.0, + "company_id": self.company_b.id, + } + ) + result = image_no_context._onchange_company_id() + self.assertIsNone(result) + self.assertEqual(image_no_context.company_id, self.company_b) diff --git a/report_positioned_image/views/report_positioned_image_views.xml b/report_positioned_image/views/report_positioned_image_views.xml index f98dc7c3..25e21faf 100644 --- a/report_positioned_image/views/report_positioned_image_views.xml +++ b/report_positioned_image/views/report_positioned_image_views.xml @@ -10,7 +10,10 @@ - + @@ -31,7 +34,7 @@ - + diff --git a/report_positioned_image/views/res_company_views.xml b/report_positioned_image/views/res_company_views.xml index a14398b9..d69a373e 100644 --- a/report_positioned_image/views/res_company_views.xml +++ b/report_positioned_image/views/res_company_views.xml @@ -11,7 +11,7 @@ name="report_positioned_image_ids" nolabel="1" context="{'default_company_id': id}" - domain="[('company_id', '=', id)]" + domain="['|', ('company_id', '=', id), ('company_id', '=', False)]" > @@ -26,11 +26,7 @@ - + diff --git a/report_qweb_field_option/README.rst b/report_qweb_field_option/README.rst index fe62b234..09055651 100644 --- a/report_qweb_field_option/README.rst +++ b/report_qweb_field_option/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ======================== Report Qweb Field Option ======================== @@ -7,13 +11,13 @@ Report Qweb Field Option !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:6a839e0b8361541500cea7946ac9d7bfbcbe37ab2a102576061a2940c4343c5c + !! source digest: sha256:2e6250e04e346bc7f61b36e4fb244e8f744f480b1e42e0ba753a71342ebd648f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Freporting--engine-lightgray.png?logo=github @@ -45,18 +49,18 @@ create records according to your needs. For each record: -- Set **Model** and **Field** (required) -- Set **UoM** and **UoM Field**, or **Currency** and **Currency Field** - only for fields of float type (optional) -- Set **Additional Conditions** to specify a domain for more specific - filtering (e.g., ``[('secondary_uom_id', '=', 1)]`` to apply only - when a specific secondary UoM is used) (optional) -- Set **Company** (optional) -- Set **Options** as a string representation of a dictionary. E.g., - ``{"widget": "date"}``, ``{"widget": "monetary"}``, or - ``{"widget": "contact", "fields": ["name", "phone"]}`` -- Set **Digits** (only for float-type fields). The value is ignored if - Options is set +- Set **Model** and **Field** (required) +- Set **UoM** and **UoM Field**, or **Currency** and **Currency Field** + only for fields of float type (optional) +- Set **Domain** to specify a domain for more specific filtering (e.g., + ``[('secondary_uom_id', '=', 1)]`` to apply only when a specific + secondary UoM is used) (optional) +- Set **Company** (optional) +- Set **Options** as a string representation of a dictionary. E.g., + ``{"widget": "date"}``, ``{"widget": "monetary"}``, or + ``{"widget": "contact", "fields": ["name", "phone"]}`` +- Set **Digits** (only for float-type fields). The value is ignored if + Options is set Usage ===== @@ -114,10 +118,10 @@ Authors Contributors ------------ -- `Quartile `__: +- `Quartile `__: - - Yoshi Tashiro - - Aung Ko Ko Lin + - Yoshi Tashiro + - Aung Ko Ko Lin Maintainers ----------- diff --git a/report_qweb_field_option/__manifest__.py b/report_qweb_field_option/__manifest__.py index 10d68fd4..e88ab83c 100644 --- a/report_qweb_field_option/__manifest__.py +++ b/report_qweb_field_option/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Report Qweb Field Option", - "version": "18.0.1.0.1", + "version": "18.0.1.1.0", "category": "Technical Settings", "license": "AGPL-3", "author": "Quartile, Odoo Community Association (OCA)", diff --git a/report_qweb_field_option/models/qweb_field_options.py b/report_qweb_field_option/models/qweb_field_options.py index 0ef9e1f3..2dc62519 100644 --- a/report_qweb_field_option/models/qweb_field_options.py +++ b/report_qweb_field_option/models/qweb_field_options.py @@ -55,7 +55,6 @@ class QwebFieldOptions(models.Model): digits = fields.Integer() company_id = fields.Many2one("res.company", string="Company") domain = fields.Char( - "Additional Conditions", help="Optional domain for additional filtering conditions.\n" "This is evaluated in addition to UoM/Currency conditions.\n" "Examples:\n" diff --git a/report_qweb_field_option/readme/CONFIGURE.md b/report_qweb_field_option/readme/CONFIGURE.md index d8de22e5..35be0963 100644 --- a/report_qweb_field_option/readme/CONFIGURE.md +++ b/report_qweb_field_option/readme/CONFIGURE.md @@ -6,8 +6,8 @@ For each record: - Set **Model** and **Field** (required) - Set **UoM** and **UoM Field**, or **Currency** and **Currency Field** only for fields of float type (optional) -- Set **Additional Conditions** to specify a domain for more specific - filtering (e.g., `[('secondary_uom_id', '=', 1)]` to apply only when +- Set **Domain** to specify a domain for more specific filtering + (e.g., `[('secondary_uom_id', '=', 1)]` to apply only when a specific secondary UoM is used) (optional) - Set **Company** (optional) - Set **Options** as a string representation of a dictionary. E.g., diff --git a/report_qweb_field_option/static/description/index.html b/report_qweb_field_option/static/description/index.html index c5ec998f..0595bfbb 100644 --- a/report_qweb_field_option/static/description/index.html +++ b/report_qweb_field_option/static/description/index.html @@ -3,7 +3,7 @@ -Report Qweb Field Option +README.rst -
-

Report Qweb Field Option

+
+ + +Odoo Community Association + +
+

Report Qweb Field Option

-

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

This module allows administrators to define the decimal precision of float fields and add option values to fields (e.g., adding a date widget option to datetime fields) for QWeb report and view presentation.

@@ -389,7 +394,7 @@

Report Qweb Field Option

-

Configuration

+

Configuration

Go to Settings > Technical > Reporting > Qweb Field Options, and create records according to your needs.

For each record:

@@ -397,9 +402,9 @@

Configuration

  • Set Model and Field (required)
  • Set UoM and UoM Field, or Currency and Currency Field only for fields of float type (optional)
  • -
  • Set Additional Conditions to specify a domain for more specific -filtering (e.g., [('secondary_uom_id', '=', 1)] to apply only -when a specific secondary UoM is used) (optional)
  • +
  • Set Domain to specify a domain for more specific filtering (e.g., +[('secondary_uom_id', '=', 1)] to apply only when a specific +secondary UoM is used) (optional)
  • Set Company (optional)
  • Set Options as a string representation of a dictionary. E.g., {"widget": "date"}, {"widget": "monetary"}, or @@ -409,7 +414,7 @@

    Configuration

  • -

    Usage

    +

    Usage

    Print a QWeb report (quotation, invoice, purchase order, etc.), and the value presentation for fields like line quantity, price unit and date order are adjusted according to the Qweb Field Options configuration.

    @@ -417,7 +422,7 @@

    Usage

    strictest condition will be applied.

    -

    Known issues / Roadmap

    +

    Known issues / Roadmap

    #. QWeb field option settings only apply to fields rendered with t-field.
    @@ -439,7 +444,7 @@

    Known issues / Roadmap

    https://github.com/odoo/odoo/blob/5eec379/addons/purchase/views/portal_templates.xml#L101-L102

    -

    Bug Tracker

    +

    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 @@ -447,15 +452,15 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Quartile
    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -478,5 +483,6 @@

    Maintainers

    +
    diff --git a/report_qweb_field_option/tests/test_report_qweb_field_options.py b/report_qweb_field_option/tests/test_report_qweb_field_options.py index cd952681..c5670abf 100644 --- a/report_qweb_field_option/tests/test_report_qweb_field_options.py +++ b/report_qweb_field_option/tests/test_report_qweb_field_options.py @@ -168,29 +168,24 @@ def test_domain_validation(self): def test_qweb_field_option_with_domain(self): values = {"report_type": "pdf"} - box_uom = self.env["uom.uom"].create( - { - "name": "Box", - "category_id": self.env.ref("uom.product_uom_categ_unit").id, - "uom_type": "bigger", - "factor_inv": 12.0, - } - ) + jpy_currency = self.env.ref("base.JPY") + jpy_currency.active = True + self.qweb_options_rec.digits = 2 self.env["qweb.field.options"].create( { "res_model_id": self.test_model.id, - "field_id": self.quantity_field.id, - "domain": f"[('uom_id', '=', {box_uom.id})]", + "field_id": self.value_field.id, + "domain": f"[('currency_id', '=', {jpy_currency.id})]", "digits": 0, } ) - self.test_record.write({"uom_id": self.unit_uom.id, "quantity": 12.56}) _, content, _ = self.IrQweb._get_field( - self.test_record, "quantity", False, False, {}, values + self.test_record, "value", False, False, {}, values ) - self.assertEqual(content, "12.560") - self.test_record.uom_id = box_uom.id + self.assertEqual(content, "1.00") + # Test with JPY: domain matches, uses JPY-specific option (0 digits) + self.test_record.currency_id = jpy_currency.id _, content, _ = self.IrQweb._get_field( - self.test_record, "quantity", False, False, {}, values + self.test_record, "value", False, False, {}, values ) - self.assertEqual(content, "13") + self.assertEqual(content, "1") diff --git a/report_qweb_field_option/views/qweb_field_options_views.xml b/report_qweb_field_option/views/qweb_field_options_views.xml index 49644c44..776a4c1f 100644 --- a/report_qweb_field_option/views/qweb_field_options_views.xml +++ b/report_qweb_field_option/views/qweb_field_options_views.xml @@ -32,6 +32,7 @@ name="domain" widget="domain" options="{'model': 'res_model_name'}" + optional="hide" />