From b66fc70759d16eda40d4c034167f1248131c505a Mon Sep 17 00:00:00 2001 From: David-Luis-Mora Date: Tue, 30 Apr 2024 09:04:16 +0100 Subject: [PATCH] [MIG] pos_discount_all: Migration to 17.0 --- pos_discount_all/README.rst | 11 ++-- pos_discount_all/__manifest__.py | 2 +- pos_discount_all/readme/CONTRIBUTORS.md | 2 + pos_discount_all/readme/USAGE.md | 4 +- .../static/description/index.html | 50 +++++++++++-------- .../static/src/xml/OrderSummary.xml | 1 - 6 files changed, 40 insertions(+), 30 deletions(-) diff --git a/pos_discount_all/README.rst b/pos_discount_all/README.rst index 0694953ec5..5709a733c3 100644 --- a/pos_discount_all/README.rst +++ b/pos_discount_all/README.rst @@ -70,15 +70,15 @@ Make an order. for exemple, - select the product 'Conference chair The total discount is 1$ + 10% \* 39.40 = 4.94$ -|image| +|image2| Note, the discount displayed on the ticket is updated, to take into account all the discount. -|image1| +|image3| -.. |image| image:: https://raw.githubusercontent.com/OCA/pos/17.0/pos_discount_all/static/description/order_summary.png -.. |image1| image:: https://raw.githubusercontent.com/OCA/pos/17.0/pos_discount_all/static/description/pos_receipt.png +.. |image2| image:: https://raw.githubusercontent.com/OCA/pos/17.0/pos_discount_all/static/description/order_summary.png +.. |image3| image:: https://raw.githubusercontent.com/OCA/pos/17.0/pos_discount_all/static/description/pos_receipt.png Development =========== @@ -127,6 +127,9 @@ Contributors ------------ - Sylvain LE GAL (https://twitter.com/legalsylvain) +- `Binhex `__: + + - David Luis Mora Other credits ------------- diff --git a/pos_discount_all/__manifest__.py b/pos_discount_all/__manifest__.py index 1885dabf5e..0d8d087419 100644 --- a/pos_discount_all/__manifest__.py +++ b/pos_discount_all/__manifest__.py @@ -6,7 +6,7 @@ "name": "Point of Sale - Display All Discounts", "summary": "Display discount amount on PoS cashier screen and print it on ticket" "calculated from the difference between a sale with default pricelist", - "version": "16.0.1.0.1", + "version": "17.0.1.0.1", "category": "Point of Sale", "maintainers": ["legalsylvain"], "author": "GRAP,Odoo Community Association (OCA)", diff --git a/pos_discount_all/readme/CONTRIBUTORS.md b/pos_discount_all/readme/CONTRIBUTORS.md index 18c1c87e0f..d60bf3de10 100644 --- a/pos_discount_all/readme/CONTRIBUTORS.md +++ b/pos_discount_all/readme/CONTRIBUTORS.md @@ -1 +1,3 @@ - Sylvain LE GAL () +- [Binhex](https://binhex.cloud//com): + - David Luis Mora \<\> diff --git a/pos_discount_all/readme/USAGE.md b/pos_discount_all/readme/USAGE.md index f23c16fc0f..4d0c3d3d5d 100644 --- a/pos_discount_all/readme/USAGE.md +++ b/pos_discount_all/readme/USAGE.md @@ -5,9 +5,9 @@ Make an order. for exemple, - select the product 'Conference chair The total discount is 1\$ + 10% \* 39.40 = 4.94\$ -![image](../static/description/order_summary.png) +![image2](../static/description/order_summary.png) Note, the discount displayed on the ticket is updated, to take into account all the discount. -![image](../static/description/pos_receipt.png) +![image3](../static/description/pos_receipt.png) diff --git a/pos_discount_all/static/description/index.html b/pos_discount_all/static/description/index.html index 6ce44de003..dc21ce3902 100644 --- a/pos_discount_all/static/description/index.html +++ b/pos_discount_all/static/description/index.html @@ -369,21 +369,22 @@

Point of Sale - Display All Discounts

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:29e859f159e20beb7c3ca10008b29d3e608f2de14125fc3aae7aee8c965c47a5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module extends the functionality of point of sale module, to -display on the PoS ticket, the amount of the discount applied for this sale. -Contrary to the logic of Odoo and the OCA +display on the PoS ticket, the amount of the discount applied for this +sale. Contrary to the logic of Odoo and the OCA (https://github.com/OCA/sale-workflow/tree/14.0/sale_discount_display_amount) -the amount of the discount is the difference between the theoretical sale with the default price list and the actual sale amount. -So it take into accounts:

+the amount of the discount is the difference between the theoretical +sale with the default price list and the actual sale amount. So it take +into accounts:

    -
  • explicit discount set on pos.order.line. (as for odoo sale module)
  • +
  • explicit discount set on pos.order.line. (as for odoo sale +module)
  • fixed price set on pos.order.line
  • discount generated by specific pricelist
-

Also the module ignores in the computation of undiscounted amount lines, the -lines with a ‘Discount Product’. -(see the configure section.)

+

Also the module ignores in the computation of undiscounted amount lines, +the lines with a ‘Discount Product’. (see the configure section.)

Table of contents

    @@ -407,19 +408,18 @@

    Configuration

  • Create or edit your discount products
  • Check the box “Is a Discount”
-https://raw.githubusercontent.com/OCA/pos/16.0/pos_discount_all/static/description/product_template_form.png +

image

Usage

Open your point of Sale

-

Make an order. for exemple, -- select the product ‘Conference chair (39.40$)’ -- select the pricelist -10% -- add a discount of 1$

+

Make an order. for exemple, - select the product ‘Conference chair +(39.40$)’ - select the pricelist -10% - add a discount of 1$

The total discount is 1$ + 10% * 39.40 = 4.94$

-https://raw.githubusercontent.com/OCA/pos/16.0/pos_discount_all/static/description/order_summary.png -

Note, the discount displayed on the ticket is updated, to take into account all the discount.

-https://raw.githubusercontent.com/OCA/pos/16.0/pos_discount_all/static/description/pos_receipt.png +

image2

+

Note, the discount displayed on the ticket is updated, to take into +account all the discount.

+

image3

Development

@@ -430,8 +430,9 @@

Development

class extends Order { } -

However, this code doesn’t work if pos_sale module is installed. For that -reason we code the declaration as Odoo does, and add eslint exception.

+

However, this code doesn’t work if pos_sale module is installed. For +that reason we code the declaration as Odoo does, and add eslint +exception.

 // eslint-disable-next-line no-shadow
 const PosDiscountAllOrder = (Order) =>
@@ -445,7 +446,7 @@ 

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -460,13 +461,18 @@

Authors

Contributors

Other credits

The development of this module has been financially supported by:

    -
  • UGESS, Union Nationale des Groupements des épiceries Sociales et Solidaires (https://ugess.org/)
  • +
  • UGESS, Union Nationale des Groupements des épiceries Sociales et +Solidaires (https://ugess.org/)
@@ -478,7 +484,7 @@

Maintainers

promote its widespread use.

Current maintainer:

legalsylvain

-

This module is part of the OCA/pos project on GitHub.

+

This module is part of the OCA/pos project on GitHub.

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

diff --git a/pos_discount_all/static/src/xml/OrderSummary.xml b/pos_discount_all/static/src/xml/OrderSummary.xml index f9b5570a13..07b55ea07a 100644 --- a/pos_discount_all/static/src/xml/OrderSummary.xml +++ b/pos_discount_all/static/src/xml/OrderSummary.xml @@ -10,7 +10,6 @@ t-name="OrderSummary" t-inherit="point_of_sale.OrderSummary" t-inherit-mode="extension" - owl="1" >