100 Commits
Author SHA1 Message Date
roen-odoo 37f09f61e0 [FIX] point_of_sale: pos sale reprot total now include taxes correctly
Current behavior:
If you make a sale of a product that use a taxe not included in the
price. Then go in order analysis in PoS, the total price of the product
will not include the taxes.

Steps to reproduce:
- Create a tax of 15% that is not included in price
- Create a product with 10$ price and add this tax to it. (Total price
  including tax should be 11.5$)
- Sell it in the PoS and close the session
- Go in PoS > Reporting > Order. Open the pivot view and check the total
  price for the product
- The total is 10$ instad of 11.5$

opw-3817535

closes odoo/odoo#163239

X-original-commit: 42fd6a65c8910bff587b6bc55d49e1bafb165487
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-04-25 17:06:54 +00:00
roen-odoo 186654a90d [FIX] mrp : Fix inconsistent mrp workduration test
The `test_update_workcenter_adapt_finish_date` test was not consistent
when the db was installed without demo data. The test was failing
because the working hours were not the same and so the duration was
different. To fix this we adjust the starting time of the work order
so that it last exactly 30 minutes, and is not impacted by the working
hours.

runbot error : https://runbot.odoo.com/web#id=61595&cids=1&menu_id=405&action=573&model=runbot.build.error&view_type=form

closes odoo/odoo#163238

X-original-commit: 5c49fc02f3fae0594b68d94bd8e9308bdbd21363
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-04-25 17:06:53 +00:00
roen-odoo 61306c1d81 [FIX] point_of_sale: add error message when image are not loaded
Current behavior:
When trying to print a receipt offline, the image will not be loaded
and you get a traceback.
Now the receipt is printed, and an error is logged in the console if
the images couldn't be loaded

Steps to reproduce:
- Add a logo to the company
- Launch PoS
- In the browser devtools network tab turn the connection down
- Do an order, and try to print the receipt
- You get a traceback and the receipt is not printed

opw-3811663

closes odoo/odoo#162451

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-04-23 15:32:51 +00:00
roen-odoo 6b979c6f64 [FIX] point_of_sale: correctly reconcile reversed payments
Current behavior:
When an order is invoided after the session has been closed, a reversed
payment is created. This payment is not reconciled correctly with the
invoice. This is creating an aged receivable for the partner.

Steps to reproduce:
- Change the bank payment method to "Identify customer"
- Create an order in the PoS and pay with bank and specify a partner
- Close the session
- Open the session again, and create an invoice for the order
- Go to the accounting module and look for the aged receivable report
  you should see some entries under the partner you selected.
- You can also go to the partner form and see that he has some due
  invoices.

opw-3678298

correct partner

closes odoo/odoo#162653

X-original-commit: 31aff389c4c9d01be2f960a0ae134ff658e802c9
Related: odoo/enterprise#61158
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-04-22 11:51:29 +00:00
roen-odoo 043ced9a21 [FIX] point_of_sale: assign lot names when creating unexisting lot
Current behavior:
When entering a lot name that doesn't exist in the PoS, the lot is being
created. But the lot is not being assigned to the stock move line.

Steps to reproduce:
- Create a product with tracking by lot
- Open PoS and make an order for this product
- Enter a lot name that doesn't exist
- Validate the order
- Close the session
- Go to the order picking in the inventory app
- The lot is not assigned to the stock move line

opw-3710125

closes odoo/odoo#160533

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-04-19 19:14:01 +00:00
roen-odoo d3fab4016e [FIX] point_of_sale: add session name to payment name in report
Current behavior:
When generating a sale report for multiple pos sessions, the payment
name is not clear which session it belongs to.

Steps to reproduce:
- Open PoS and make some sales
- Close the session, and do the first step again.
- Go in reporting and generate the report for a period that includes
  the two sessions.
- In the payments table you will see the payment name, but you won't
  know which session it belongs to.

opw-3684937

closes odoo/odoo#162440

X-original-commit: 77c95c2588c3af02e6f96cd03c289671c775c0e8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-04-19 14:40:09 +00:00
roen-odoo 38c3e48618 [FIX] pos_self_order: remove unused color that triggers access error
Current behavior:
If you create a user that only have access to a branch of a company.
If this user try to access the QR Menu of any PoS he will get an access
error.

Steps to reproduce:
- Create a branch B for company A
- Change access of user U to only have access to branch B
- Login with user U, and try to open any PoS QR Menu
- You get an access error

opw-3745256

closes odoo/odoo#162222

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2024-04-19 14:40:07 +00:00
roen-odoo 2a37e3527c [FIX] mrp: make sure changing workcenter adapt finish date of workorder
Current behavior:
If you change the expected duration of a workorder, then move the
workorder to another workcenter, the expected duration is recomputed to
but the finish date is not adapted. This leads to an inconsistency in
the gannt view. Visually it will look like the duration expected has not
changed because the date are still the same.

Fix:
To fix this we make sure that the finish date is recomputed when the
expected duration is modified. This way both date and expected duration
are consistent.

Steps to reproduce:
- Create a product with a BOM
- The BOM should have at least 1 operations with a duration of 1 hour
  linked to a workcenter
- Create a manufacturing order for this product, confirm and plan it
- Go to the planning by workcenter
- Change the duration of the workorder by sliding its finishing date
- At this point if you click on it the duration should have changed
- Move the workorder to another workcenter
- The duration has been recomputed, but the finish date is not adapted
  (You can click on the workorder to see the duration has changed)

opw-3717361

closes odoo/odoo#161297

X-original-commit: 2c70160daa31736b0ab8d22f6c99c76bfa9c7301
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-04-11 15:02:50 +00:00
roen-odoo ae7d18dd5f [FIX] point_of_sale: refund payment should be the same as orinal order
Current behavior:
When you refund an order that was paid with bank and so not rounded,
the refund is rounded wich result in a difference between the original
order and the refund.
This also happens when the original order was paid with multiple
payments and one of them was not rounded and the other was. The refund
will be rounded as one single payment. This also results in a difference
between the original order and the refund.

Steps to reproduce:
- Setup a rounding method with a precision of 5.0
- Create a product with a price of 138.0
- Open the POS and add the product to the order
- Pay the order with 2 payments, one bank of 55 and one cash that will
  be rounded to 80.
- Validate the order
- Go in the backend and refund the order
- The refund will be rounded to 135.0

opw-3701574

closes odoo/odoo#159395

X-original-commit: cdae1e34eddccd5ce098c79d845a8fc2658c0175
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-04-02 10:22:58 +00:00
roen-odoo e114934423 [FIX] point_of_sale: fix receipt qrcode size on iOS
Current behavior:
When printing a receipt with a QR code on an iOS device, the QR code was
too small and couldn't be scanned

Steps to reproduce:
- Setup an ePos printer for the PoS
- Activate QRCode on receipt option
- Start a PoS session on an iOS device
- Add some product to the order and validate it
- On the receipt screen click on the print button
- Try to scan the QR Code on the ticket (it's probably too small)

Note:
If you don't have an iOS device you can use browserstack and use ngrok
to expose your local server to the internet and connect to it on
browserstack. You can do the same process to expose the printer so that
you will be able to print from browserstack.

opw-3788988

closes odoo/odoo#159185

X-original-commit: 7fff77b5b60e15f20622ce0a9c6dbe28e25e2660
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-03-26 13:35:57 +00:00
roen-odoo 751fe5282c [FIX] stock: fix zpl label for product without barcode
Current behavior:
When printing a ZPL label for a product without barcode, the label was
printed with a barcode containing the "False" value

Steps to reproduce:
- Install the stock module
- Create a product without barcode
- Print a ZPL label for this product
- The label contains a barcode with the "False" value (You can check the
  rendering on labelary.com)

opw-3797462

closes odoo/odoo#158939

X-original-commit: e392027afa245a708a906b484250ed46200e13be
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-03-25 11:43:39 +00:00
roen-odoo fafd931990 [FIX] point_of_sale: wrong value in pos sales report
Current behavior:
The pos sale report is showing the wrong value in the "Total (VAT Exl)"
column. The value acutally shown is the total tax included.

Steps to reproduce:
- Create a product with a tax included in price
- Create a pos order with this product
- Validate the order
- Close session and print the pos sales report
- Check the value in the "Total (VAT Exl)" column.

opw-3684937

closes odoo/odoo#157753

X-original-commit: ba58ac0f86e10755f1ffbc80814c3722470517f9
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-03-15 17:29:55 +00:00
roen-odoo 06cfed738e [FIX] pos_sale: take "done" orders into account for the sales count
Current behavior:
Orders from a closed pos that were not invoiced are not taken into
account in the sales count (can be seen in the "Sales" smart button)

Steps to reproduce:
- Create a new product P1
- Sell this product in the PoS without invoicing it
- Close the PoS session
- Go to the "Sales" smart button of the product P1
- You will see that the sales count is not incremented

opw-3726153

closes odoo/odoo#156926

X-original-commit: a579d9f00b0a9bc51a872925ae41bc285ba3e155
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-03-07 19:06:55 +00:00
roen-odoo 7dcfefb700 [FIX] l10n_es_pos,point_of_sale: ask for customer if split payment
Current behavior:
When in a spanish PoS, every order needs to be invoiced. If no customer
is specified, there is a default customer selected. But if the payment
method is split, the default customer should not be selected. And the
user should be asked for a customer.

Steps to reproduce:
- Install the l10n_es_pos module
- Go to PoS and create a new order
- Select a product and go to payment
- Select split payment (Customer Account)
- The default customer is selected, but you should be asked for a
  customer

Note:
To fix this we use the same behavior as in the base PoS, where the user
is asked for a customer if the payment method is split. If no user is
selected after being asked for a customer, the default customer is
selected. If a user is selected, the user is sent back to the payment
screen, as it's done in the base PoS.

opw-3736293

closes odoo/odoo#156570

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2024-03-07 15:12:17 +00:00
roen-odoo 531cb95e87 [FIX] stock: fix text product label reports with special characters
Current behavior:
When printing products ZPL Labels, special characters are not printed
correctly. e.g. quotes become &#39;

Steps to reproduce:
- Modify a product name with special characters
- Print a product label
- Select ZPL Labels

As the report is only rendered as text, the special characters are not
dangerous and can be printed as is.

opw-3684870

closes odoo/odoo#156624

X-original-commit: 7875c91be5dd467374b39bc1a7d05e9f983fbaef
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2024-03-06 16:10:54 +00:00
roen-odoo 6b0f0df21a [FIX] point_of_sale: fix daily sales report for normal bank payment
Current behavior:
When entering a difference at the closing of the session for a bank
payment method, the daily sales report was not taking into account the
difference for the bank payment method.

Steps to reproduce:
- Start PoS and make a sales with bank and a sales with cash
- Close the session with a difference for both payment methods
- Go to the daily sales report and check the difference for the bank
  payment method. The one for the cash is there but not the one for the
  bank.

Note:
This bring back the original behavior of the report that was removed
here (https://github.com/odoo/odoo/pull/146341) and makes it coexist
with the current one so that all cases are covered.

opw-3737223

closes odoo/odoo#156376

X-original-commit: d9190e34543c4a1151656859acb41556bcb3a364
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-03-05 14:22:23 +00:00
roen-odoo a8806fb6d4 [FIX] account,point_of_sale: fix access error on PoS
Current behavior:
When a user has only "User" right for point of sale and no other access
some functionalities are not working properly. For example, the user
cannot create an invoice from the PoS interface. And the user cannot
use the "Ship Later" functionality.

Steps to reproduce:
- Change the right of a user to "User" for point of sale and no other
  access.
- Log in as this user and try to create an invoice from the PoS
- Try to use the "Ship Later" functionality

Note:
This commit modify the access right of the test pos_user so that it has
the minimum access to be able to use the PoS interface properly.

opw-3644739

closes odoo/odoo#153104

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2024-03-05 12:46:10 +00:00
roen-odoo e6aa4beb3b [FIX] point_of_sale: create payment before rendering invoice
Current behavior:
When invoicing a POS order, the payment were not appearing in the
invoice.

Steps to reproduce:
- Create a POS order
- Validate and invoice the order
- Open the invoice PDF, the payment is not appearing

opw-3748596

closes odoo/odoo#155771

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2024-03-04 11:29:46 +00:00
roen-odoo 0462ab901f [FIX] point_of_sale: add product attribute with multi selection
Current behavior:
When adding a product with a multi selection attribute, the attribute is
not displayed in the product configurator popup. This only happens when
opening it on a mobile device.

Steps to reproduce:
- Add a product with a multi selection attribute
- Open PoS
- Add the product to the order
- The attribute is not shown on the product configurator popup

opw-3711164

closes odoo/odoo#154893

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-03-01 13:48:17 +00:00
roen-odoo a59e5f71cd [FIX] point_of_sale: correctly order lots in picking
Current behavior:
When you make an order in the PoS with different lots for the same
product, the lots are not correctly selected in the picking. And only
one lot is affected by the order.

Steps to reproduce:
- Create a product with tracking by lot, and 2 lots with some quantity
- Create a PoS order with 2 lines of the same product, and select a
  different lot for each line
- Validate the order
- Close the PoS session
- Check the picking, and the lot quantities

Note:
This partly revert this part of commit :
https://github.com/odoo/odoo/commit/7dda6bb92715ea25b2818a62fec5e646f3678b81#diff-0ef4eb66998f308afe5f09748bc2af04ad79e9647507c25fe9007e03a79a1249L265-L303
And also make sure that the original created line quantity is set to 0
so that the each lot has a line, and the total quantity is correct.

opw-3621363

closes odoo/odoo#148517

Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2024-02-15 17:11:08 +00:00
roen-odoo 4c68472e3c [FIX] point_of_sale,pos_restaurant: show qrcode when order is paid
Current behavior:
When printing the bill before the order has been paid, the QRCode to get
the invoice shouldn't be shown.

Steps to reproduce:
- Activate the option "Show QR Code" in the POS settings
- Create a new order
- Add some products
- Click on "Bill" button
- The QRCode is shown

opw-3703720

closes odoo/odoo#152918

Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-02-13 10:07:52 +00:00
roen-odoo de020a5ae8 [FIX] pos_online_payment: Add missing phone number to kwargs
Current behavior:
When you try to pay with razorpay, you got an error saying the phone
number was missing.

Steps to reproduce:
- Setup RazorPay
- Set a phone number on admin
- Go to the POS
- Add a product to the cart
- Click on the payment button
- Select razorpay
- Scan the QRCode with your phone (make sure you'r connected on the
  admin account)
- Try to finalize the payment

opw-3669600

closes odoo/odoo#152040

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2024-02-01 09:49:54 +00:00
roen-odoo 07a16e1b3f [FIX] pos_loyalty: fix test
This commit fix unconsistent test.
https://runbot.odoo.com/web/#id=54900&view_type=form&model=runbot.build.error&menu_id=405&cids=1

opw-3583174

closes odoo/odoo#151670

X-original-commit: 311c59f75e8af0e377178835b093851f133d1f1a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-31 08:43:44 +00:00
roen-odoo dd84bc70a7 [FIX] point_of_sale: fix report total paid amount
Current behavior:
When we print the sales details report, we get an error popup

Steps to reproduce:
- Setup an ePos printer
- Open PoS
- Make an order with some products and finalize it
- Click on the close session button, and print the sales details report

Total paid is set here in currency:
https://github.com/odoo/odoo/blob/f8f4e899b51a73b48882b2b6e33441f0e8eed477/addons/pos_daily_sales_reports/models/pos_daily_sales_reports.py#L204

opw-3702011

closes odoo/odoo#151753

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-31 06:59:15 +00:00
roen-odoo d45e933a89 [FIX] point_of_sale: Correctly delete linked pos_printer to iot_box
Current behavior:
You couldn't delete an iot_box if a pos_printer was linked to it.
You always get a validation error saying that "Proxy IP cannot be empty"
To fix this we first want to check that the device_id linked to the
printer still exists. To do this we need to move the constraint to the
pos_iot module (because the device_id field is defined there)

Steps to reproduce:
- Install pos_iot
- Activate preparation printer in POS
- Create a printer and link it to an iot_box device
- Try to delete the iot_box

opw-3597370

closes odoo/odoo#150502

X-original-commit: 7b41e51043c1f80971f6cc698876f8bda35f07ef
Related: odoo/enterprise#54874
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-23 16:01:47 +00:00
roen-odoo 956cd636b0 [FIX] pos_restaurant: make sure split bill product list is scrollable
Current behavior:
When the list of order line is too long in the split bill screen there
was no scroll bar to see the last order lines.

Steps to reproduce:
- Open PoS restaurant
- Create a new order
- Add a lot of order lines
- Click on the split bill button
- The list of order lines is not scrollable

opw-3676165

closes odoo/odoo#149800

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-22 21:10:48 +00:00
roen-odoo 70f3b748f7 [FIX] point_of_sale,l10n_be_pos_sale: invoice settled order
Current behavior:
?In Belgium? when using a EU intracom tax, as we need to report those
special sales to the government we need to create an invoice as we need
to report the customer name, VAT number and the country where the goods
are going to end up

Steps to reproduce:
- Create an order with a product and a tax (0% EU M)
- Settle the order in the PoS and pay it (no invoice)
- Go to the accounting and check the EC Sales List report
- There is an error shown in the report

opw-3514737

closes odoo/odoo#149239

X-original-commit: bea9ab596950967873766434787e705ccfe04839
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-18 20:16:02 +00:00
roen-odoo 5783e0573d [FIX] pos_loyalty: prevent using expired eWallets
Current behavior:
It was possible to use an expired eWallet to pay for an order. It was
also possible to put money on an expired eWallet.

Steps to reproduce:
- Create an eWallet with an expiration date in the past
- Open PoS and add products to the order
- Click on the eWallet button
- You can still use the eWallet to pay for the order

opw-3568270

closes odoo/odoo#149622

X-original-commit: e3492b9192d9ca56104e0ce92371fffc1731b406
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-17 18:12:44 +00:00
roen-odoo e1ed78511f [FIX] pos_loyalty,pos_sale_loyalty: avoid creating 2 loyalty cards
Current behavior:
When you create an order for partner A but do not confirm it, then
settle the order in the PoS and add some product. You will have 2
loyalty cards created for partner A. This is happening because when you
confirm the order in the PoS it will confirm the sale order and create
a first loyalty card, but the PoS will not be aware of this and when it
will try to apply the point for the product added through the PoS it
will create a new loyalty card.

Steps to reproduce:
- Activate a loyalty program
- Create a partner A
- Create a sale order for partner A but do not confirm it
- Go to the PoS and settle the order
- Add some product to the order
- Pay the order
- Go to the backend and check the loyalty cards for partner A
- You will have 2 loyalty cards created

To avoid this we will check if the partner has a loyalty card before
creating a new one.

opw-3582174

closes odoo/odoo#149621

X-original-commit: ecd62dcc4b97f542c1cd10226c7c308691e97e4f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-17 18:12:43 +00:00
roen-odoo 179475a54e [FIX] point_of_sale,pos_sale: correctly set analytic_distribution
Current behavior:
When you create a sale order with an analytic account, and settle it in
the POS, the analytic account is not set on the POS order invoice lines.

Steps to reproduce:
- Create a sale order with an analytic account (in other info tab)
- Confirm the sale order
- Go to the POS and settle the order
- Pay and invoice the order
- Go to the invoice and check the analytic account on the invoice lines

Note:
I based my fix on what was already done in the sale_order creation to
set the analytic distribution correctly on the invoice lines.

opw-3635140

closes odoo/odoo#147737

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-15 11:11:24 +00:00
roen-odoo 9564374aa1 [FIX] point_of_sale: fix session report payment difference
Current behavior:
If you use a non cash payment method, with "identify customer" option
and register a payment difference at the closing of the session. The
difference is not taken into account in the session report.

Steps to reproduce:
- Activate "identify customer" option on the bank payment method
- Open a session
- Add a product to the order
- Pay the order with the bank payment method
- Close the session with a payment difference
- Print the session report
- Open the report, at the bottom you should see the payment difference
  but it is not the case

opw-3597291

closes odoo/odoo#148753

X-original-commit: 30ba7fd9eb3d1910431cbf543e2ca691f0fdcfc0
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-11 17:00:47 +00:00
roen-odoo 04943d400b [FIX] point_of_sale: correct refund amount on rounded orders
Current behavior:
When an order total is rounded, if you refund it from the backend. The
refund amount is not correct, and you will not be able to close your
pos session.

Steps to reproduce:
- Create a rounding of 0.05 HALF UP and activate it on the PoS
- Create a product with a price of 49.99
- Sell the product in the PoS
- Go back to the backend without closing the session
- Refund the order from the backend
- Try to close the session

opw-3574913

closes odoo/odoo#147931

X-original-commit: d5e955523efc05457744f4331d4c2ecda2b14215
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-11 13:42:57 +00:00
roen-odoo 6c78e65959 [FIX] point_of_sale: fix access error for company branch
Current behavior:
When you create a new company branch, and setup a user that only have
access to this branch. Then try to open the PoS app, you get an access
error.
This was happening because we try to read the company of the journal
that is not accessible by the user when we do the `_compute_currency`

Steps to reproduce:
- Create a new company branch
- Change demo user to only have access to this branch
- Login as demo user
- Open PoS app
- Get access error

opw-3640468

closes odoo/odoo#148625

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-11 11:40:25 +00:00
roen-odoo 47a07dc53d [FIX] pos_self_order: fix self order on iOS
Current behavior:
When adding a product with a variant, the variant page is not displayed
correctly, it's missing the add to cart button.

Steps to reproduce:
- Create a product with a multi checkbox variant
- Open self order menu on iOS
- Click on the product
- The "Add to cart" button is missing from the page

opw-3614337

closes odoo/odoo#148861

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-01-10 21:04:34 +00:00
roen-odoo 40ee728812 [FIX] point_of_sale,pos_restaurant:save last preparation change on order
Current behavior:
Before this fix, when you sent the order to the kitchen, the preparation
changes were not saved directly. So if you refreshed the page right
after sending the order to the kitchen, the preparation changes were
lost.

Steps to reproduce:
- Open a POS restaurant session
- Add a product to the order
- Click on Order
- Refresh the page (F5)
- Go back to the table were you made the order
- The product still appears as not sent to the kitchen

opw-3614345

closes odoo/odoo#148755

X-original-commit: 8f33d6fa0261373fee276efd20dcbf75e95e1e28
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2024-01-10 18:25:12 +00:00
roen-odoo 4f9d623d41 [FIX] pos_sale: prevent crash of modified quotation with settled order
Current behavior:
When a quotation is modified and the order is settled in the same time,
you get an error when trying to pay for the order.

Steps to reproduce:
- Create a quotation with 3 lines
- Settle the order in the PoS
- Modify the quotation (remove one line)
- Go back to PoS, and try to pay for the order

opw-3614770

closes odoo/odoo#147499

X-original-commit: 7e48111a9678c5acf8188796824f2cb9b4f1af9d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-26 17:00:37 +00:00
roen-odoo 3e2d4a066e [FIX] point_of_sale,pos_sale: take all customer note into account
Current behavior:
When you add multiple note in a sale order, only the last one was taken
into account in the POS. Now we show all notes on the ProductScreen and
on the ReceiptScreen.

Steps to reproduce:
- Install pos_sale
- Create a sale order with a product and 2 notes
- Open the POS and load the sale order
- Only one note appears under the product
- Validate the order
- Only one note appears on the receipt under the product

opw-3551331

closes odoo/odoo#146891

X-original-commit: f7c5e7fd772d9700fe16589eea0ad51dda873c5f
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-22 14:48:57 +00:00
roen-odoo 09c1545412 [FIX] point_of_sale: make sure to print changes before saving them
Current behavior:
When trying to print the changes of an order, nothing was printed.
This was happening because we were first saving the changes before
sending them to the printer. Because of this when we tried to retrieve
the changes to print them, they were already saved and we were not
retrieving anything.

Steps to reproduce:
- Setup a printer to print order changes
- Create a new order in PoS restaurant
- Add a product to the order
- Click on the "Order" button
- Nothing is printed

opw-3625397

closes odoo/odoo#146461

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-22 13:31:39 +00:00
roen-odoo 0ed9c03940 [FIX] pos_self_order: pos_self_ordering_mode not invisible
Current behavior:
The pos_self_ordering_mode field was not interpreted as invisible when
no PoS existed. Because this is a required field you were not able to do
any changes in the settings if you had no PoS.

Steps to reproduce:
- Archive all PoS
- Go to Settings, and change any settings you want
- Save the settings
- You get an error "Invalid field 'pos_self_ordering_mode'"

opw-3649784

closes odoo/odoo#147126

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-21 17:25:02 +00:00
roen-odoo 7c577fd34d [FIX] pos_loyalty: display "enter code" correctly
Current behavior:
When you only used the "Next order coupons" loyalty program, the "enter
code" button was not displayed.

Steps to reproduce:
- Install the pos_loyalty module
- Archive all the loyalty programs
- Create a loyalty program with "Next order coupons" as reward
- Open a PoS session

opw-3608894

closes odoo/odoo#147101

X-original-commit: 55ad2020e4b56a2ce525959f0c021b83198446bc
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-21 17:24:59 +00:00
roen-odoo 47ff920f57 [FIX] pos_sale: fix warehouse group by in sales report
Current behavior:
When grouping by warehouse in the sales report, the pos orders appeared
under the "None" warehouse group.

Steps to reproduce:
- Create a PoS order
- Validate the PoS order, and close the session
- Go to sale reporting, group by warehouse
- A group "None" appears, with the PoS order inside

opw-3540797

closes odoo/odoo#147100

X-original-commit: 132dd31e7e7a941ad375ada0be35dde05d0b3a43
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-21 17:24:58 +00:00
roen-odoo 711ec4a9e1 [FIX] pos_loyalty: Consider reward divided by tax as 1 reward
Current behavior:
When a reward is applied on an order containing different product with
different taxes, the rewarded is divided in multiple lines (one per tax)
This cause issue when calling, the `_updateRewardLines` method.
Because it will consider each line as a full reward, and therefore will
apply the reward multiple times even though the reward is only applied
once.

Steps to reproduce:
- Create a reward with a discount of 5$ in exchange of 100 points
- The reward should give 1 point per 1$ spent
- Create a product with a price of 100$ and a tax of 10%
- Create a product with a price of 100$ and no tax
- Open the POS and add the 2 products to the order
- Select a customer, and click the reward button
- The reward will be applied 2 times (4 reward lines are created)

opw-3583174

closes odoo/odoo#145759

X-original-commit: 8214322a0f06d74005c46d2623972f6eb393cc08
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-13 17:11:51 +00:00
roen-odoo 8df48f15e6 [FIX] point_of_sale: fix firefox customer display
Current behavior:
Firefox customer display was not correctly loading the CSS and the display was not correct.

Steps to reproduce:
- Setup an IoT box with a customer display
- Open the IoT box customer display in Firefox
- Link the customer display to a POS
- Open the POS and add some products to the order
- The customer display is not correctly displayed

opw-3509606

closes odoo/odoo#145839

X-original-commit: 3bebc6caaccb08cc8f856b42bd635fafc9a1c4a2
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-12 14:05:10 +00:00
roen-odoo 194d166dbe [FIX] l10n_sa_pos: Fix QRCode positionning for iOS when printing receipt
Current behavior:
When printing receipt from an iOS device, the QRCode is not printed at
the good position.

Steps to reproduce:
- Install l10n_sa_pos
- Install an ePoS printer
- Go on an iOS device
- Go to POS
- Create a new order
- Pay the order
- Print the receipt

opw-3560424

closes odoo/odoo#144583

X-original-commit: fe46d3a76d49e7753755d4f6d0bee2c628953d6b
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-04 13:23:39 +00:00
roen-odoo 3f51e45b84 [FIX] pos_coupon: remove 0€ reward from the list of rewards
Current behavior:
When you use a coupon that gives a free product combined with a promo
that gives 50% discount. The reward of 50% disappears when you add the
free product.

Steps to reproduce:
- Create 2 program with no conditions :
  - One that gives 50% discount on all products with a code
  - One that gives a free product A
- Make sure product A has a tax
- Open PoS
- Add a product with no tax to the order
- Apply the 50% discount
- Add product A
- The reward of 50% disappears

Note:
This happens because we try to apply a 50% discount on amount that is 0
wich leads to a reward with a NaN amount. Wich makes the reward for the
program disappears, because here (https://github.com/odoo/odoo/blob/15.0/addons/pos_coupon/static/src/js/coupon.js#L624)
currentMaxKey is null.

opw-3529959

closes odoo/odoo#142527

X-original-commit: 9be0955218b5584f27a75b401946a853ac2588ae
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-30 07:37:03 +00:00
roen-odoo 70f7448d45 [FIX] pos_sale: use display_name instead of name when settling orders
Current behavior:
If a product had a sales description, it was displayed in the order
when settling it from a sale order. But only the name should be
displayed in the PoS.

Steps to reproduce:
- Create a product with a sales description
- Create a sale order with this product
- Go to the PoS and settle the order from the sale order
- The name of the product is name + sales description instead of just
  the name.

opw-3547814

closes odoo/odoo#143241

X-original-commit: 2afb8dc80eccb2ba6c9d20982f0e869f5bde2397
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-23 16:24:11 +00:00
roen-odoo c862d3f19e [FIX] pos_mrp: fix COGS with kit made of kit
Current behavior:
When you sell a kit made of kit, the COGS are not registered correctly
in the invoice.

Steps to reproduce:
- Create Kit A with product A
- Create Kit B with product B
- Create Kit Final with kit A and kit B
- Make sure the Category of the products is in FIFO automated
- Open PoS, and sell Kit Final and invoice it.
- Go in the backend, and check the invoice lines of the order.
- The COGS of the products are not registered correctly.

Note:
This was happening because the price unit of the kit was not calculated
correctly. Because when the product was a kit made of kit, the bom was
not exploded to consider all the components of the kit.

opw-3548604

closes odoo/odoo#142246

X-original-commit: b8b3945ee0e4a82e18f85d8bbeb1a32654088308
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-16 11:44:56 +00:00
roen-odoo 6ed92b6660 [FIX] point_of_sale: correctly print daily sales report
Current behavior:
When you link a printer to the sales detail report. The report will
contains no order. This happens because we are trying to assign docids
to the session_id.

Fix:
Docids represent the session_id only when the report is called from the
PoS directly. So we want to use it only when it's the only data passed
to `_get_report_values`. If session_id is not set in the data, but other
values are (date_start/stop, config_id) we should use those value in
priority.
When called from the frontend directly, docids doesn't represent a
session_id.

Steps to reproduce:
-Install pos_iot
-Link a printer from the demo iot to the sales_detail report (go in
 settings > reporting > reports)
-Do some orders on the PoS, and close it
-Go in the backend, and print the sales detail report
-You will see that the report is empty (You can put a breakpoint in
 get_sale_details method to see that it will be empty)

opw-3247196

closes odoo/odoo#142093

X-original-commit: d93ffa4c770364c31b2a2e0ad855bf8801f23c24
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-15 11:26:11 +00:00
roen-odoo 631dea3998 [FIX] pos_sale: Correctly split lines when product are not groupable
Current behavior:
When importing a sale order with a product that is not groupable, the
line is not split and the whole quantity is added to one line.

Steps to reproduce:
- Create a new uom category that is not groupable
- Add a new uom to the category
- Create a new product with the uom
- Create a new sale order with the product
- Settle the order in the PoS
- All quantity is on one line

This is also an issue if the product is tracked by serial number. The
popup to fill the serial number will only have one field, even if the
quantity is greater than 1.

opw-3493378

closes odoo/odoo#141302

X-original-commit: 957942fe64391f9df7bee38d179cd1ce75fff787
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-13 16:17:53 +00:00
roen-odoo d66dcf820d [FIX] point_of_sale: Show correct tracking method on receipt
Current behavior:
The PoS receipt was always showing SN on receipt even when the tracking
method was set to Lot.

Steps to reproduce:
- Create a product with tracking method set to Lot
- Create a PoS order with that product
- Validate the order
- The receipt is going to show SN XXXX instead of Lot Number XXXXX

opw-3517788

closes odoo/odoo#141007

X-original-commit: fde614b80c90ce62598b6ddd3ddac4d3c6bb4dc7
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-06 16:55:39 +00:00
roen-odoo 7ee59307ff [FIX] pos_restaurant: make sure tip amount is formatted correctly
Current behavior:
When the user language uses a different decimal separator than the
"." (dot), the tip amount is not formatted correctly and the amount is
incorrect. e.g. 1.5 is interpreted as 15.0

Steps to reproduce:
- Change the current language decimal separator to "," (comma) and
  thousand separator to "." (dot)
- Open restaurant (make sure tip after payment is enabled)
- Add a product to the order
- Pay by bank
- Click on tip 20%
- The tip amount is incorrect (too high)

opw-3525033

closes odoo/odoo#140926

X-original-commit: f0cd80fbb55e0f234800c6be4696ff8e1533978b
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-04 06:43:09 +00:00
roen-odoo 22a10e1eb2 [FIX] point of sale: check if config_currencies null
A traceback is generated if config currencies are none. This is because we are trying to access the 0 index which does not exist in a None object.

Steps to reproduce:
1. Go to studio.
2. Click on reports.
3. Search for sale details.
4. Click on sale details report.

Current Behavior:
As we click on the sales details report, a traceback pops up.

Expected Behavior:
There should be no traceback and the report editor should open smoothly if nothing wrong.

Note:
We also remove Timezone information from the start_date to match the
format of the date when it's provided by the user.
e.g. : "23/05/2024 08:25:34" instead of "23/05/2024 08:25:34 TZInfo"

OPW-3501650

closes odoo/odoo#140575

X-original-commit: c816f47eaabcb2aedce91887287f34ac8f16320a
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-31 16:59:14 +00:00
roen-odoo 160b404fa9 [FIX] point_of_sale: correctly delete sequences when uninstalling PoS
Current behavior:
After uninstalling the PoS module, if you try to install it again, you
get a traceback because Odoo is trying to create a sequence that already
exists.

Steps to reproduce:
- install PoS
- uninstall PoS
- install PoS
- you get a traceback

opw-3515647

closes odoo/odoo#139767

X-original-commit: c57bb574721a3610f66320dacdc703abc490d5d4
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-25 20:56:17 +00:00
roen-odoo 69188e7228 [FIX] point_of_sale,pos_loyalty: use iot_device when printing reports
Current behavior:
After this refactor (https://github.com/odoo/odoo/pull/120070) when you
try to print a report from the POS, the report was always downloaded
even if you set a printer in the report configuration. But the report
should be printed if a printer is set on the report configuration.
It was never taken into account and the report was always downloaded.

Steps to reproduce:
- Install pos_iot, and activate gift card.
- Go in Settings > Reports and look for the gift card report.
- Set a printer on the report configuration.
- Go in the POS and sell a gift card.
- It will be downloaded on the computer, but it should be printed on the
  printer you set on the report configuration.

opw-3495176

closes odoo/odoo#139326

X-original-commit: 4747f62fcbb9ae6cb224c9da60501a20919766a9
Related: odoo/enterprise#49317
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-23 16:45:11 +00:00
roen-odoo 8554e6f88c [FIX] pos_restaurant: fix blank receipt print
Current behavior:
When trying to print the bill in PoS restaurant from a mobile device,
the bill appears completely blank.

Steps to reproduce:
- Open Odoo on mobile device
- Go to PoS restaurant
- Create an order
- Click on the "Bill" button
- Click on the "Print" button
- The bill is completely blank

This is happening because on mobile after clicking on the "Print" button
the pos directly return to the order screen. What happens when you do
`window.print()` is you basically do a screenshot of the screen with
some specific CSS rules. But on mobile, we go back too fast on the order
screen and the screenshot is empty.

opw-3507918

closes odoo/odoo#138282

X-original-commit: ebf214944097b9731a2a5dcf53d367715ceb8a35
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-13 15:54:27 +00:00
roen-odoo 7500db787c [FIX] point_of_sale: docids doesn't represent a session_id
Current behavior:
When you link a printer to the sales detail report. The report will
contains no order. This happens because we are trying to assign docids
to the session_id.

Steps to reproduce:
- Install pos_iot
- Link a printer from the demo iot to the sales_detail report (go in
  settings > reporting > reports)
- Do some orders on the PoS, and close it
- Go in the backend, and print the sales detail report
- You will see that the report is empty (You can put a breakpoint in
  `get_sale_details` method to see that it will be empty)

opw-3247196

closes odoo/odoo#138241

X-original-commit: 489985661d689dde1a1385db2fc4a0a51fb5a7db
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-10 15:42:56 +00:00
roen-odoo b5af8312da [FIX] point_of_sale: change check for tips default value
Current behavior:
If you delete the default tip product, then activate tips in the PoS
config you will be blocked by a warning message saying that the tip
product is not set even if you set it. To fix this we only check if the
tip product exist if the tips are activated for the current config.
We also remove the compute on the tip product field so that we can set
any product as a tip product.

Steps to reproduce:
-Delete Tip Product
-Open PoS config
-Activate tips
-Try to save, you will be blocked by a warning message
-If you try to turn off the tips, you will be blocked by the same
 warning message

opw-3519123

closes odoo/odoo#138109

X-original-commit: 715dd599baa4fec124c7ec84fee11df0550251b8
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-10 11:07:54 +00:00
roen-odoo 2449695515 [FIX] point_of_sale: correctly set lot_id on refund orders
Current behavior:
When refunding an order, the lot_id of the original order was not set
on the refund order.

Steps to reproduce:
- Create a product with tracking by lot
- Open the POS and add the product to the order
- Set a lot on the product
- Pay the order
- Refund the order
- Check the lot on the refund order, there is no lot set

opw-3485740

closes odoo/odoo#136991

X-original-commit: 8868f689f2aea48ca82ee00478083ba72370bfbd
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-29 11:59:03 +00:00
roen-odoo 841d013dee [FIX] point_of_sale: use customer language for invoice product
Current behavior:
When creating an invoice from a POS order, the invoice product is not
written in the customers language.

Steps to reproduce:
- Create a customer that uses French as language
- Make sure the user is using English as language
- Create a POS order for the customer
- Invoice the order and look for the product name
- The product name is in English but it should be in French

opw-3283743

closes odoo/odoo#137027

X-original-commit: 1081f7ff670f30e7d69b5e07fb1eb5b2619e3eaa
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-29 08:07:05 +00:00
roen-odoo 054c667c63 [FIX] point_of_sale: total due converted in pos currency
Current behavior:
If a PoS had a different currency than the company currency, the total
due was not converted in the PoS currency. So when you paid the total
due it was not the correct amount.

Fix:
The total due is now converted in the PoS currency when the PoS is
loading the data. We also had to change the refreshTotalDueOfPartner to
retrieve the total due in the PoS currency.

Steps to reproduce:
- Create a PoS that uses a different currency than the company currency
  (change the journal, pricelist and payment method)
- Make some payments with this PoS using the customer account
- Check the total due of the customer account in the PoS, it's not the
  correct value.
- Try to pay the total due, it's not the correct value either.

opw-3469682

closes odoo/odoo#136528

X-original-commit: 4a2dc18eca0fe2e8095f6402e157320cac8985ad
Related: odoo/enterprise#47851
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-28 09:04:10 +00:00
roen-odoo 7e01385ed4 [FIX] point_of_sale: make sure FP is not applied twice on refund
current behavior:
When a product with tax included is sold with a fiscal position that
match the tax to a tax of 0%, then when you refund this order the
fiscal is applied a second time. This result in the 15% tax removed 2
times and the price of the product is incorrect.

steps to reproduce:
- Create a product with 15% tax included
- Create a fiscal position that match the tax to a tax of 0%
- Create a POS with this fiscal position
- Open PoS, and make an order with the product
- Applyy the fiscal position
- Refund the order
- The price of the product is not the same as the one of the original
  order.

opw-3371028

closes odoo/odoo#136348

X-original-commit: 58406515233234ac0ed342d81a5c55886c3b5712
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-25 07:54:01 +00:00
roen-odoo f022fffc3a [FIX] point_of_sale: ship later with multiple expense account
Current behavior:
If you had 2 products with different expense account and using real-time
inventory valuation, there was an error when validating the picking.
This was happening because move_vals we were trying to assign multiple
moves to one pos_order here https://github.com/odoo/odoo/blob/95cec6ea3daebce6491cc2a8a69d9688322989ba/addons/point_of_sale/models/stock_picking.py#L155

The account move is actually reserved for the invoicing of the order.
So we just need to remove that line.

Steps to reproduce:
- Create a product with expense account A
- Create a product with expense account B
- Make sure both products are set to real-time inventory valuation
- Activate ship later in the PoS
- Open the PoS and add both products to the order
- Validate the order with ship later and no invoice
- Close the PoS and try to validate the picking of the order.

opw-3428033

closes odoo/odoo#136254

X-original-commit: a2c8ea0adbd93cb9d178977f73e93492e84dfec3
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-22 11:56:05 +00:00
roen-odoo bea0116aec [FIX] point_of_sale: use correct partner_id for invoiced orders
Current behavior:
When invoicing an order that was made in a closed PoS session, the wrong
partner was used for the invoice. And so the total due was assigned to
the wrong partner if you used the "Customer Account" payment method.

Steps to reproduce:
- Open PoS and make an order for a customer using the Customer Account
  payment method.
- Close the PoS session.
- Open the PoS session again, and invoice the order you made in the
  previous session.

Fix:
Use the commercial_partner_id of the order's partner instead of the
partner_id directly.

opw-3478670

closes odoo/odoo#135558

X-original-commit: a7ebb5151060f9435941b9da50182e4ec5b58db7
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-15 08:08:34 +00:00
roen-odoo 6cc1c435fd [FIX] point_of_sale: remove 0€ payment line of orders
Current behavior:
When an order contains a payment line with 0€, and a customer account
payment line. Then you close the PoS and invoice the order from an other
PoS session, you get an error.

Steps to reproduce:
- Open PoS, make a new order with a payment line of 0€ and a customer
  account payment line.
- Close the session and open a new one.
- Go in the paid order, and try to invoice it.
- You get an error.

Fix:
To fix the issue we just remove the useless 0€ payment line.

opw-3477486

closes odoo/odoo#135284

X-original-commit: 24c311670164d5f06dc50d829bb653b06cf86f07
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-15 08:08:32 +00:00
roen-odoo d461fcef5c [FIX] pos_coupon: Make sure loyalty rewards are considered as rewards
Current behavior:
When a loyalty reward was applied with a promotion program, a promotion
reward was added with a -Infinity value.

Steps to reproduce:
- Create a loyalty program with a reward of 5€ fixed amount for 50
  points
- Create a promotion program with a reward of 10% discount
- Open a pos session, select a customer (and add points to the loyalty
  program if needed).
- Add a product to the order, the 10% discount should be applied
- Now click on the reward button to apply the loyalty reward
- The loyalty reward is correctly applied, but a new promotion reward
  is added with a -Infinity value.

opw-3297817

closes odoo/odoo#133550

X-original-commit: ee60da301209c84264d706b9d16e45af541a3bbf
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-15 08:08:31 +00:00
roen-odoo d32830f103 [FIX] sale_timesheet: Fallback on user employee when creating timesheet
Current behavior:
  If you set a specific sale_order_item for an employee on a project, and
  create a timesheet line from the "My Timesheets" menu,
  the sale_order_item will not be the one you selected for this employee.
  This happens because when you create a timesheet line from the "My
  Timesheets" menu, the employee is not set on the timesheet line.
  To fix this we fallback on the user's employee when creating a timesheet
  line from the "My Timesheets" menu.

Steps to reproduce:
  - Make sure you'r logged in as Mitchel Admin
  - Create a service product that create project and tasks
  - Create a sale order with this product
  - Go to the project and set a sale order item for Mitchel Admin in the
    invoicing tab
  - Go to the "My Timesheets" menu and click "Add Line"
  - Select the project you created
  - The sale order item will not be autofilled with the one set on the
    invoicing tab of the project.

opw-3463849

closes odoo/odoo#134466

X-original-commit: ba0d428a85e8392d8f892872abe56bb7d6c568d3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-06 13:25:40 +00:00
roen-odoo e28e1a079f [FIX] point_of_sale: Show price without discount in receipt
Current behavior:
When a discount is applied to a product, the receipt shows the price
with the discount applied as the base price.

Steps to reproduce:
- Open PoS
- Add a product to the order
- Apply a discount to the product with the numpad
- Validate the order
- Check the receipt, the base price of the product is the price with the
  discount applied.

(https://github.com/odoo/odoo/assets/32939472/eb0998a7-70a1-432a-8909-868d9307c999)
The price in red should be 70$ (the price without the 5% discount)

opw-3463745

closes odoo/odoo#134045

X-original-commit: d6e4e7c566324de3ef9589b92cacd32d6c386465
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-04 10:56:09 +00:00
roen-odoo edb9914018 [FIX] pos_daily_sales_reports: use pos config currency when possible
Current behavior:
The currency used to create the report is the one of the company. But
if you use a different currency in the pos config, the report will still
be in the company currency.
To fix that we check if all report's config use the same currency and
use it if it's the case we use the pos config currency. And if it's not
possible we use the company currency.

Steps to reproduce:
- Create a second pos
- Change the sale journal and the pricelist to use a different currency
- Open a session and make a sale
- Close the session
- Generate the daily report for the second pos
- The currency is the one of the company

opw-3463280

closes odoo/odoo#133996

X-original-commit: 3af535d9008c4d839ede2b5117230fa4a19b538a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-01 16:46:05 +00:00
roen-odoo 97c7d387a7 [FIX] pos_sale: correctly cancel all moves with 0 qty
Current behavior:
When you settle an order in the PoS and completely validate it, the
remaining moves from the original sales should be cancelled.
However, it was not the case because we were not adding all the picking
in the `waiting_picking_ids` list. And so when we were checking this
list we were not cancelling all the moves.

Steps to reproduce:
- Setup multi-step routes (Inventory > Settings > Multi-Step Routes)
- Change the configuration of the warehouse to use the multi-step routes
- Create a sale order for any product and confirm it
- Open the PoS, and settle the order you just created
- Validate the order
- Go back to the sale order, and check the state of the delivery
- Only one picking has been cancelled

opw-3390529

closes odoo/odoo#133547

X-original-commit: c57b8286e3dedb75db68f27fc514224f6ba8d1c1
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-30 07:04:01 +00:00
roen-odoo b017ab79d4 [FIX] pos_loyalty: gift card reward should not have taxes
Current behavior:
When using a gift card in the PoS, you would get 2 gift card reward
lines, one positive and one negative. Wich should not be the case.
This happens because the gift card reward had taxes.
To fix this we need to remove the taxes from the gift card reward,
as it is done in the sale_loyalty module ´_get_reward_values_discount´
https://github.com/odoo/odoo/blob/30062210cc879a1d2349b888a510f29ea40d5920/addons/sale_loyalty/models/sale_order.py#L313

Steps to reproduce:
- Install the pos_loyalty module
- Open PoS
- Buy a gift card and copy the code
- Buy a product and pay with the gift card
- You will see 2 gift card reward lines, one positive and one negative

opw-3472830

closes odoo/odoo#133034

X-original-commit: 7814bb2663ac75ef91922897b88022d87f58241f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-24 20:59:09 +02:00
roen-odoo 2799d8b75f [FIX] point_of_sale: Correctly set fiscal position on refunded order
Current behavior:
If you apply a fiscal position on a POS order, then refund it, the
fiscal position is not applied on the refund order.

Steps to reproduce:
- Create a fiscal position that match 15% of taxes to 0% of taxes
- Create a POS order with a product that has 15% of taxes
- Apply the fiscal position on the order
- Refund the order
- Check the taxes on the refund order, they are not correct

opw-3371028

closes odoo/odoo#132768

X-original-commit: 09dbf51e88ea76934634e1b2f4c0292e83f4c9e4
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-23 11:12:59 +02:00
roen-odoo 517bc785ec [FIX] l10n_ae: fix vat amount computation
Current behavior:
If you make a sale in the PoS without invoicing it, the vat amount in
the tax report was no correctly computed.

Steps to reproduce:
- Install l10n_ae
- Create a payment method and a PoS with this payment method
- Create a product with a price of 100 AED and the tax of 5% (Dubai)
- Make 2 pos orders with this product, one with invoicing and one
  without
- To see the VAT Amount we need to add it with studio, go in accounting
  -> journal items -> studio -> existing field -> "vat amount"
- Go in the accounting app and go for the Tax Report, change the date
  range to the financial year. Now click on "Dubai" in the "Standard
  Rated Supplies (Base)" section. And click on "Audit"
- You will see that the VAT amount of the order is 0 when it should be 5

opw-3293589

closes odoo/odoo#132755

X-original-commit: cf261f5b6c9ec5d9d68bb7808e164ebdb85bb6ce
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-23 11:12:45 +02:00
roen-odoo 63fb465956 [FIX] pos_daily_sales_reports: opening difference counted only once
Current behavior:
The opening difference is counted twice when printing the session report
So the expected cash amount is wrong.
It was happening because the opening difference was counted in the
cash_register_balance_start and also in the cash_real_transaction.
So we use the previous session closing balance to only coun the opening
difference once.

Steps to reproduce:
- Open a PoS session with 100€ in the cash register and close it.
- Reopen the session and enter 50€ in the cash register.
  (The opening difference is 50€)
- Make a sale for 10€, using cash payment.
- Close the session and print the session report.
- The expected cash amount will be 10€ when it should be 60€.

opw-3384313

closes odoo/odoo#132690

X-original-commit: fce504ad1cdfd7c90fe85fcb7965524dc122ebac
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-22 20:59:10 +02:00
roen-odoo be4d4892f6 [FIX] l10n_fr_pos_cert: allow you to remove reward line in FR PoS
Current behavior:
When a reward line had 0 quantity, it was considered as active and the
points were deducted from the customer's balance.

Steps to reproduce:
- Install l10n_fr_pos_cert
- Change the Current company to FR company
- Create a loyalty card program
- Open the POS and add a product to the order to get points and trigger
  the reward.
- Remove the reward line, it should go to 0 quantity instead of being
  removed.
- The point are still removed from the customer's balance.

opw-3372998

closes odoo/odoo#132573

X-original-commit: f170bebb38fff044a9f0e247095adc3aaf5a5074
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-22 18:59:52 +02:00
roen-odoo 9538c0caa3 [FIX] point_of_sale: make sure cash moves are not duplicated
Current behavior:
When your connection is slow and you try to create a cash move, and you
click multiple times on the confirm button. The cash move is created
multiple times.
This happens because the function is not locked while the asynchronous
call is not finished. To fix this we added a custom hook to lock the
function while the asynchronous call is not finished.

Steps to reproduce:
-Open the POS
-Press F12 and in the network tab of the developper tools, set the
 connection to slow 3G
-Open the cash move popup, enter an amount and click on confirm multiple
 times.
-Close the session, and check the cash moves created.

opw-3431775

closes odoo/odoo#131409

X-original-commit: 6abe0bbd6eb47d0eb890f0c120c2095efc72325b
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-21 14:15:04 +02:00
roen-odoo 21392ab236 [FIX] point_of_sale: Correctly update rewards after scanning a product
Current behavior:
When scanning a product that should trigger a reward, the reward was not
applied.

Steps to reproduce:
- Create a reward that applies a 10% discount on specific products
  (e.g. Whiteboard pen)
- Make sure a barcode is set on the Whiteboard pen product
- Open a PoS, and scan the Whiteboard pen product barcode
- The reward is not applied

opw-3373435

closes odoo/odoo#129406

X-original-commit: 9991d923ec0e7fc74e5d319d43a0052e6e4d7416
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-25 17:35:52 +02:00
roen-odoo f71bb322f6 [FIX] point_of_sale: fix rounding issue when closing pos session
Current behavior:
When the currency in the PoS is not the same currency as the one of the
company, and uses a big rates there are sometimes rounding issues. These
rounding issues can lead to a difference at closing that prevent you
from closing the PoS session.

Steps to reproduce:
- Make sure atleast 2 currencies are activated. (USD and EUR)
- Modify the USD rounding factor to 0.000001
- Modify the rate for the EUR to 2100 Unit/USD
- Now go in the PoS settings and go in the Default Journals Order and
  set the currency to EUR
- Change the pricelist currency to EUR
- Change the cash payment method journal currency to EUR and remove
  other payment methods
- Open a PoS session and create a new order with 3 products with a
  price that has decimals
- Pay the order with cash
- Close the session, you will get an error

The error was happening because the rounding was done on each line and
therefore we were losing precision.

opw-3258806

closes odoo/odoo#129241

X-original-commit: 112e224ace6e658c563d6041532e133ddcc1c8a7
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-21 11:35:05 +02:00
roen-odoo 7907ec49c4 [FIX] point_of_sale: fix test with hardcoded pricelist ID
This fix removes the hardcoded pricelist ID and uses the one used in the
PoS config instead.

closes odoo/odoo#129136

X-original-commit: f5d3e985ad41af29fc6cbcfc2417e475443cd00d
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-20 14:23:28 +02:00
roen-odoo 03145907b8 [FIX] pos_loyalty:reward should not affect point rewarded
Current behavior:
When creating a loyalty program, with a rules that award points for each
dollar spent, the value of the point was inconsistent because it was
taking the rewards into account.

Steps to reproduce:
- Create a loyalty program with a rule that award 0.1 point for each
  dollar spent, and a reward that gives 1$ per points.
- Create a product with a price of 265$.
- Open the PoS and create a new order for 1000$.
- Select a customer and pay the order.(The customer now have 100 points)
- Create a new order with the product created earlier, and apply the
  reward.
- The value of the reward shoudl be 126.5$ (100 points + 26.5 points
  from the current order) but it is not.

opw-3275585

closes odoo/odoo#129963

X-original-commit: 70256e5cf8359a09687acc3e2d4f8792ef4f9801
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-28 00:27:54 +02:00
roen-odoo a79dfeda98 [FIX] point_of_sale : use correct account for pos order reversal
Current behavior:
When you try to invoice an order that was made in a different pos
session, a reversed payment is created and then the invoice is created.
But the reversed payment was using a different journal than the one
used to create the order, which is not correct.

Steps to reproduce:
- Open a PoS session
- Make an order and pay it with the customer account
- Close the session
- Open a new session
- Go to the orders list and show the paid orders, you should see the
  order you made in the previous session.
- Click on it and click on the invoice button
- Go to the accounting app and check the entries created for the
  invoice, you should see a reversed payment entry that uses a
  different account than the one used to create the order payment.

opw-3249116

closes odoo/odoo#127064

X-original-commit: a646baf6901f88434543cb34397c98f1d5c294c4
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-05 17:34:06 +02:00
roen-odoo 46b18d391f [FIX] point_of_sale: fix kit total cost when sold in PoS with fifo/avco
Current behavior:
When selling a kit in PoS, the total cost of the kit is not computed
correctly if the product category was using fifo/avco.

Steps to reproduce:
- Create a product category using fifo
- Create a kit product with 2 products in it (Comp A with a cost of 5
  and Comp B with a cost of 10). Total cost of product is 15.
- Create a PoS order with the kit product, and validate it
- Check the total cost of the product in the pos sale order, it is 0
  but it should be 15.

opw-3189949

closes odoo/odoo#127325

X-original-commit: 6fd2a939651e7afc06fa9eed2eeeebc34752fc25
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-05 14:33:58 +02:00
roen-odoo 27a583082c [FIX] point_of_sale: use pos_order partner when not connected
Current behavior:
When using the QRCode on ticket to create an invoice, it was always
creating a new partner, even if a partner was already set on the order.

Steps to reproduce:
- Activate the QRCode on receipt feature
- Create a PoS order and create a new customer for it
- Pay the order and print the receipt
- Scan the QRCode on the receipt to create an invoice
- On the new window enter the customer informations and see the invoice
- Now go check the customers list in the backend, you will see 2
  customers have been created.

opw-3275938

closes odoo/odoo#126303

X-original-commit: 0a867a4e53d97da707b14062e0abafc18a1c827c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-06-26 13:21:00 +02:00
roen-odoo 03bb883d2c [FIX] point_of_sale: prevent adding not saleable product with scan
Current behavior:
When scanning the barcode of a product that is not saleable, the product
was added to the order.

Steps to reproduce:
- Create a product that is not saleable and not available in PoS
- Set a barcode for this product
- Open the PoS, and scan the barcode of the product
- The product is added to the order even if it is not saleable

opw-3325238

closes odoo/odoo#126293

X-original-commit: 3a3997e22b6a21c66455718a117c7c424526745e
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-06-26 13:20:57 +02:00
roen-odoo 55af8eb20d [FIX] pos_sale: downpayment refund correctly added to origin order
Current behavior:
When you refund a downpayment in the PoS, the downpayment is not added
to the original order.

Steps to reproduce:
- Create an order in the sales app
- Open the PoS and make a downpayment for the order
- Refund the downpayment you just made
- Go back to the original order in the sales app, the downpayment is
  correctly added, but the refund of the downpayment is not added.
- The order should contain : The original product, the downpayment and
  the refund of the downpayment.

opw-3275708

closes odoo/odoo#126250

X-original-commit: 95c770c8164ef3d11d27c8cb0fc85e0b0d0054c3
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-06-23 18:00:24 +02:00
roen-odoo 075da19e4e [FIX] pos_loyalty: specific discountable take discount into account
Current behavior:
When computing the discountable values of an order, the discount of the
program where not taken into account if you used specific discountable
products.

Steps to reproduce:
- Create products A and B with a price of 20$
- Create a loyalty program
- Rule:
  - Minimum qty : 2
  - Apply on specific products : Product A and Product B
  - Reward : 5 points per order
- Reward:
  - 10$ per order
  - In exchange of 2 points
  - Apply on specific products : Product A and Product B
- Open PoS and add Product A and Product B to the order
- A reward should be added automatically with a value of -10$
- Click on the reward button, another reward should be added but it has
  the wrong value. It should be -10$ but it is not.

opw-3232565

closes odoo/odoo#126245

X-original-commit: f33d3b09ff49aae1fdaf3379915b7e7b5f03080c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-06-23 18:00:13 +02:00
roen-odoo 84d9344e5d [FIX] point_of_sale: fix css for cash in/out popup
Current behavior:
When the text for the button in the cash in/out popup is too long, the
first number of the amount is hidden behind the currency symbol.

Steps to reproduce:
- Install l10n_bo and PoS
- Switch language to Spanish
- Create and open a PoS with a cash payment method
- Open the cash in/out popup, enter a value.
- The first number of the amount is hidden behind the currency symbol.

opw-3324406

closes odoo/odoo#126120

X-original-commit: decafb5b7d59967d64f5bb553e95fe32c7b0ccb8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-06-23 15:11:31 +02:00
roen-odoo 31b8151736 [FIX] pos_stripe: fix stripe rounding issue
Current behavior:
When you setup a stripe payment terminal, there was a rounding issue.
If you sold a product for 1.10€ with a tax of 7%, the total amount
was 1.18€, but the amount sent to the stripe terminal was 1.17€.

Steps to reproduce:
- Setup the stripe payment terminal
- Create a product with a price of 1.10€ and a tax of 7%
- Create a POS order with this product, the total is 1.18€
- Pay the order with the stripe payment terminal, the amount sent to
  the terminal is 1.17€

opw-3298277

closes odoo/odoo#124372

X-original-commit: 356a6b089c020a9a83c8c7b65b588a50491c13a8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-06-08 23:01:26 +02:00
roen-odoo ba8d431704 [FIX] point_of_sale: correctly link credit notes and invoice from PoS
Current behavior:
When creating a credit note from a PoS order, the credit note is not
linked to the invoice of the orginal order.

Steps to reproduce:
- Make an order in the PoS, validate it and invoice it
- Make a refund of this order and invoice it too.
- Go to the credit note, the original invoice is not mentionned in the
  reference field.

opw-3150637

closes odoo/odoo#123976

X-original-commit: d3ff97f498e0fcc97ec32194988268a7e2afc631
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-06-06 19:19:48 +02:00
roen-odoo bd1acd4877 [FIX] point_of_sale: long product name completely visible
Current behavior:
When a product had a too long name, the name was truncated and couldn't
be completely seen.

Steps to reproduce:
- Change the name of a product to a very long name with spaces
- Open the POS
- The product name is truncated

Note:
To fix this we stop showing placeholders when a product doesn't have an
image set.

opw-3245538

closes odoo/odoo#121982

X-original-commit: 13a20470238e14465b4010096f0f6914c1e93a3f
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-05-23 14:51:59 +02:00
roen-odoo b13e9f5fdd [FIX] pos_discount: stop applying discount to tips
Current behavior:
When adding a tips to an order, then applying a global discount. The
discount is applied to the tips when it should not.

Steps to reproduce:
- Open POS
- Add a product to the order
- Add a tips to the order
- Apply a global discount
- The discount is calculated on the tips and the products

opw-3271886

closes odoo/odoo#121071

X-original-commit: 97c7ebcd203de64da43a74e298d6bfab08694c5c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-05-11 16:01:19 +02:00
roen-odoo a25d20ee3e [FIX] pos_sale: correctly update move qty when settling a pos order
Current behavior:
When settling a pos order containing 2 different product, the qty of the
2 products would be modified even if you only deliver one of them
through the pos order.

Steps to reproduce:
- Create 2 product A and B
- Create a sale order with 1 product A and 1 product B
- Open a PoS session, and settle the order you just created
- Deliver only 1 product A
- Close the PoS session
- Go the the sale order delivery, you will see that the qty are not
  correct

opw-3227053

closes odoo/odoo#120898

X-original-commit: c1f905111060fff6e6bdfae1849e1a633a88ae02
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-05-10 16:36:49 +02:00
roen-odoo 6b014dd0d6 [REV] pos_loyalty: revert gift card specifid point computation
The correct behavior for the gift cards should be that the value of the
gift card is equal to the value of the order line.
For example :
-50$ giftcard -> Apply discount 50% on the order line -> 25$ gift card

If we want to apply a discount on a gift card we need to use the global
discount

The commit we are reverting was forcing the value of the gift card to be
the base value of the order line.

This reverts commit 83ceeecde76a859749d0659d6c387d95155c8425.

OPW-3264945

closes odoo/odoo#120794

X-original-commit: 023e2f2571ab7c814ed3cad45871fc221562fb67
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-05-09 06:07:44 +02:00
roen-odoo 546ba05e5b [FIX] loyalty: make sure demo user can open pos
Current behavior:
When you try to open the pos as a demo user, you get an error message.

Steps to reproduce:
- Install pos and loyalty modules
- Log in as demo user
- Try to open the pos
- You get an error message

opw-3297341

closes odoo/odoo#120334

X-original-commit: 5f6a1df7eda6909df302bc6cfa3ba02d8a2de3d7
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-05-02 20:01:41 +02:00
roen-odoo 5db35ac7c5 [FIX] point_of_sale: correctly show discount on receipt
Current behavior:
When a fiscal position is applied on an order in the PoS, the change of
price was interpreted as a discount. This shouldn't be the case.

Steps to reproduce:
- Create a tax that is included in the price (e.g. 10%)
- Create a fiscal position that match this tax and change it to no tax
- Change the pricelist option to show discount
- Create a product with a price of 100€
- Open the PoS and add the product to the order
- Apply the fiscal position
- Pay the order, and go to the receipt screen
- There is a discount showed on the receipt

opw-3154499

closes odoo/odoo#119902

X-original-commit: c7e1e634f76ef01920f7bcc7ccb43b3f28736499
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-04-27 11:21:17 +02:00
roen-odoo 45be644319 [FIX] point_of_sale: Add sales description to pos invoice
Current behavior:
If you add a sale description to a product, it will not be added to the
invoice created from the PoS.

Steps to reproduce:
- Add a sale description to a product
- Create a PoS order with this product
- Create an invoice from the PoS order
- The sale description is not added to the invoice

opw-3221481

closes odoo/odoo#119516

X-original-commit: 37538c876f30fb1b3a9368f12a16edb1806777f8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-04-25 17:23:14 +02:00
roen-odoo 2eafad8bf1 [FIX] pos_restaurant : add missing t-ref
Current behavior:
When printing a bill in the restaurant you had an error poping.

Steps to reproduce:
- Open a restaurant session
- Go on a table and add some products
- Click on the bill button
- Click on the print button
- You get an error

opw-3259014

closes odoo/odoo#119041

X-original-commit: 1d1808e7136c6416fe88c28e7971e97707de2557
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-04-20 10:51:49 +02:00
roen-odoo b9b10d5614 [FIX] purchase: stop adding useless vendor to product vendor list
Current behavior:
When you create a contact and a delivery adress for this contact. If you
add the delivery adress as a vendor to a product, and purchase this
product from the delivery adress, the contact will be added to the
product vendor list.

Steps to reproduce:
- Create contact C
- Create delivery adress D for C
- Create product P
- Add D as a vendor to P
- Create PO for P from D, and confirm it
- Go to P, and check the vendor list (C is there)

opw-3177309

closes odoo/odoo#117902

X-original-commit: 67031d2b3d7d52297d18a69c76b4f747b17142e3
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-04-06 14:58:56 +02:00
roen-odoo 7d9035c79a [FIX] point_of_sale: Correct margin for product with no cost
Current behavior:
In the pos order report the margin is not shown for products with no
cost.

Steps to reproduce:
- Create a product with no cost
- Open a pos session, add the product to the order and validate it
- Go to the pos order report and check the margin for the product
- The margin is not shown

opw-3232131

closes odoo/odoo#117723

X-original-commit: 223400d371615907a7ba7d5616ffeec307892f16
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-04-05 15:11:23 +02:00
roen-odoo a31ad57791 [FIX] point_of_sale: display default pricelist price as base price
Current behavior:
When a discount is applied on a product because of a pricelist. The base
price is displayed without applying the default pricelist on it.

Steps to reproduce:
- Create product A with price of 10€
- Create pricelsit PL1 that change price of product A to 7€(fixed price)
- Create pricelist PL2 based on PL1 that use a formula to apply 10% on
  all products.
- Change PoS default pricelist to PL1 and make PL1 and PL2 available on
  the PoS.
- Open a PoS session and add product A to the order. Price should be 7€.
- Apply PL2 on the order.
- The product line shows that the price was 10€ has been discounted to
  6.30€. The base price should be 7€.

opw-3200027

closes odoo/odoo#117273

X-original-commit: 395235f202513267fcf3cde28ae51fa0a5caeb42
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-03-31 15:52:39 +02:00
roen-odoo 37edaca7af [FIX] point_of_sale: Correctly set owner on picking create from POS
Current behavior:
If you create a product tracked by serial number and set an owner on the
product. If you make an order from the PoS with this product, the owner
wouldn't be set correctly on the picking created from the PoS.

Steps to reproduce:
- Create product A, tracked by serial number, storable, and available in
    the PoS.
- Add some quantity of product A with an owner (e.g. "Owner A").
- Create a PoS order with product A.
- Validate the order.
- Close the PoS session, go to the picking created from the PoS order
  there will not be any owner set on the picking.

opw-3206618

closes odoo/odoo#116919

X-original-commit: d6c44280eb8a86925392e87cf1a35bfe8b00177e
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-03-29 14:26:04 +02:00