-
-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] pos_discount_all: pre-commit auto fixes
- Loading branch information
Showing
16 changed files
with
144 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- Go to "Point of Sale \> Products" | ||
- Create or edit your discount products | ||
- Check the box "Is a Discount" | ||
|
||
![image](../static/description/product_template_form.png) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Sylvain LE GAL (<https://twitter.com/legalsylvain>) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
The development of this module has been financially supported by: | ||
|
||
- UGESS, Union Nationale des Groupements des épiceries Sociales et | ||
Solidaires (<https://ugess.org/>) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
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 | ||
(<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: | ||
|
||
- 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.) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
**Note** | ||
|
||
In the javascript file, we could write | ||
|
||
``` javascript | ||
const PosDiscountAllOrder = () => | ||
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. | ||
|
||
``` javascript | ||
// eslint-disable-next-line no-shadow | ||
const PosDiscountAllOrder = (Order) => | ||
// eslint-disable-next-line no-shadow | ||
class PosDiscountAllOrder extends Order { | ||
} | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
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\$ | ||
|
||
The total discount is 1\$ + 10% \* 39.40 = 4.94\$ | ||
|
||
![image_summary](../static/description/order_summary.png) | ||
|
||
Note, the discount displayed on the ticket is updated, to take into | ||
account all the discount. | ||
|
||
![image_receipt](../static/description/pos_receipt.png) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.