diff --git a/addons/account/static/src/components/bills_upload/bills_upload.xml b/addons/account/static/src/components/bills_upload/bills_upload.xml index e4a251920e772..21547c36f9042 100644 --- a/addons/account/static/src/components/bills_upload/bills_upload.xml +++ b/addons/account/static/src/components/bills_upload/bills_upload.xml @@ -12,7 +12,7 @@ -
+
-
+
diff --git a/addons/event_booth_sale/models/event_booth_category.py b/addons/event_booth_sale/models/event_booth_category.py index 76028fb7d988c..ddf9aa1a17eec 100644 --- a/addons/event_booth_sale/models/event_booth_category.py +++ b/addons/event_booth_sale/models/event_booth_category.py @@ -49,8 +49,14 @@ def _compute_price(self): def _compute_price_reduce(self): for category in self: product = category.product_id - list_price = product.list_price + product.price_extra - discount = (list_price - product._get_contextual_price()) / list_price if list_price else 0.0 + pricelist = product.product_tmpl_id._get_contextual_pricelist() + lst_price = product.currency_id._convert( + product.lst_price, + pricelist.currency_id, + self.env.company, + fields.Datetime.now() + ) + discount = (lst_price - product._get_contextual_price()) / lst_price if lst_price else 0.0 category.price_reduce = (1.0 - discount) * category.price @api.depends_context('pricelist', 'quantity') diff --git a/addons/event_booth_sale/models/sale_order_line.py b/addons/event_booth_sale/models/sale_order_line.py index bd3d3c88f1b01..a25988791bcb5 100644 --- a/addons/event_booth_sale/models/sale_order_line.py +++ b/addons/event_booth_sale/models/sale_order_line.py @@ -94,7 +94,12 @@ def _get_display_price(self): if self.event_booth_pending_ids and self.event_id: company = self.event_id.company_id or self.env.company currency = company.currency_id - total_price = sum([booth.price for booth in self.event_booth_pending_ids]) + product = self.event_booth_pending_ids.booth_category_id.product_id + pricelist = product.product_tmpl_id._get_contextual_pricelist() + if pricelist.discount_policy == "with_discount": + total_price = sum([booth.booth_category_id.price_reduce for booth in self.event_booth_pending_ids]) + else: + total_price = sum([booth.price for booth in self.event_booth_pending_ids]) return currency._convert( total_price, self.order_id.currency_id, self.order_id.company_id or self.env.company.id, diff --git a/addons/event_sale/models/event_ticket.py b/addons/event_sale/models/event_ticket.py index b796fc7d2eced..92c31a275d5a9 100644 --- a/addons/event_sale/models/event_ticket.py +++ b/addons/event_sale/models/event_ticket.py @@ -53,10 +53,14 @@ def _compute_description(self): def _compute_price_reduce(self): for ticket in self: product = ticket.product_id - # seems strange to not apply pricelist logic but still use pricelist discount... - discount = ( - product.lst_price - product._get_contextual_price() - ) / product.lst_price if product.lst_price else 0.0 + pricelist = product.product_tmpl_id._get_contextual_pricelist() + lst_price = product.currency_id._convert( + product.lst_price, + pricelist.currency_id, + self.env.company, + fields.Datetime.now() + ) + discount = (lst_price - product._get_contextual_price()) / lst_price if lst_price else 0.0 ticket.price_reduce = (1.0 - discount) * ticket.price def _init_column(self, column_name): diff --git a/addons/event_sale/models/sale_order.py b/addons/event_sale/models/sale_order.py index 879b56916ba3b..05c9ffa4b27b6 100644 --- a/addons/event_sale/models/sale_order.py +++ b/addons/event_sale/models/sale_order.py @@ -172,9 +172,15 @@ def _get_display_price(self): pricelist=self.order_id.pricelist_id.id, uom=self.product_uom.id ) - if self.order_id.pricelist_id.discount_policy == 'with_discount': - return event_ticket.price_reduce + company = event_ticket.company_id or self.env.company + currency = company.currency_id + pricelist = self.order_id.pricelist_id + if pricelist.discount_policy == "with_discount": + price = event_ticket.price_reduce else: - return event_ticket.price - else: - return super()._get_display_price() + price = event_ticket.price + return currency._convert( + price, self.order_id.currency_id, + self.order_id.company_id or self.env.company.id, + self.order_id.date_order or fields.Date.today()) + return super()._get_display_price() diff --git a/addons/hw_drivers/tools/helpers.py b/addons/hw_drivers/tools/helpers.py index 7b11d62f71793..d2e724ab05a59 100644 --- a/addons/hw_drivers/tools/helpers.py +++ b/addons/hw_drivers/tools/helpers.py @@ -309,7 +309,7 @@ def odoo_restart(delay): def path_file(filename): platform_os = platform.system() if platform_os == 'Linux': - return Path().absolute().parent.joinpath(filename) + return Path.home() / filename elif platform_os == 'Windows': return Path().absolute().parent.joinpath('server/' + filename) diff --git a/addons/payment_authorize/views/payment_provider_views.xml b/addons/payment_authorize/views/payment_provider_views.xml index 2f96cd1a76f54..81b630f7abdac 100644 --- a/addons/payment_authorize/views/payment_provider_views.xml +++ b/addons/payment_authorize/views/payment_provider_views.xml @@ -18,7 +18,7 @@ name="action_update_merchant_details" string="Generate Client Key"/>
- + How to get paid with Authorize.Net diff --git a/addons/payment_paypal/views/payment_provider_views.xml b/addons/payment_paypal/views/payment_provider_views.xml index 54636f0869cc5..5d797a3777f96 100644 --- a/addons/payment_paypal/views/payment_provider_views.xml +++ b/addons/payment_paypal/views/payment_provider_views.xml @@ -17,7 +17,7 @@ - How to configure your paypal account? diff --git a/addons/point_of_sale/security/point_of_sale_security.xml b/addons/point_of_sale/security/point_of_sale_security.xml index 380080cbbac63..1aad8ac062030 100644 --- a/addons/point_of_sale/security/point_of_sale_security.xml +++ b/addons/point_of_sale/security/point_of_sale_security.xml @@ -18,12 +18,6 @@ - - Point Of Sale Bank Statement POS User - - - [('pos_session_id', '!=', False)] - Point Of Sale Bank Statement Accountant diff --git a/addons/product/models/product_pricelist.py b/addons/product/models/product_pricelist.py index 478d4293d21b1..624ee364de639 100644 --- a/addons/product/models/product_pricelist.py +++ b/addons/product/models/product_pricelist.py @@ -181,7 +181,7 @@ def _get_applicable_rules_domain(self, products, date, **kwargs): return [ ('pricelist_id', '=', self.id), - '|', ('categ_id', '=', False), ('categ_id', 'child_of', products.categ_id.ids), + '|', ('categ_id', '=', False), ('categ_id', 'parent_of', products.categ_id.ids), '|', ('product_tmpl_id', '=', False), templates_domain, '|', ('product_id', '=', False), products_domain, '|', ('date_start', '=', False), ('date_start', '<=', date), diff --git a/addons/product/tests/test_product_pricelist.py b/addons/product/tests/test_product_pricelist.py index 9332468046054..2e249ee5d9c77 100644 --- a/addons/product/tests/test_product_pricelist.py +++ b/addons/product/tests/test_product_pricelist.py @@ -104,7 +104,7 @@ def setUpClass(cls): 'min_quantity': 2, 'compute_price': 'formula', 'base': 'list_price', - 'categ_id': cls.category_5_id, + 'categ_id': cls.product_category.id, 'price_discount': 5, }), Command.create({ diff --git a/addons/product/views/product_views.xml b/addons/product/views/product_views.xml index 63552ea5529ad..a643c976ba4bf 100644 --- a/addons/product/views/product_views.xml +++ b/addons/product/views/product_views.xml @@ -88,7 +88,7 @@
- + diff --git a/addons/purchase_requisition/views/purchase_views.xml b/addons/purchase_requisition/views/purchase_views.xml index aa3a4a2bdd78a..4b42db02cdb58 100644 --- a/addons/purchase_requisition/views/purchase_views.xml +++ b/addons/purchase_requisition/views/purchase_views.xml @@ -23,7 +23,7 @@

-