-
-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][ADD] pos_container_deposit #1278
base: 16.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hbrunn. Thanks a lot for porting and finishing this module ! (I need it in V16 in a few monthes ;-))
Some remarks inline + functional review.
Functional review :
problem 1 :
set consign as not available in PoS
set product as available in pos + consign
when selecting the product, there is an not handled error.
Proposal : (not sure)
- at least add a more sexy message in the Javascript. "The product X has a consign, but it is not available in the point of sale, please make the consign available in the PoS".
- (alternatively, load silently the consign, I think it's possible dynamicaly in recent version).
- maybe (not sure), add a constrains, when setting consign on product, if consign are not available in PoS.
Problem 2 :
- select a product in PoS : OK.
- click a second time on the product : KO.
b9bbc7b
to
5991181
Compare
@legalsylvain thanks for your comprehensive review, took all your points. I took the liberty to fix you quoting yourself which messed up runboat ;-) |
69db797
to
0406afd
Compare
oh thanks ! |
pos_deposit/static/src/js/models.js
Outdated
Gui.showPopup("ErrorPopup", { | ||
title: _t("Deposit not available"), | ||
body: _t( | ||
"The product is configured as having a deposit but the deposit product is not available in POS." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UX nitpicking : I guess product.deposit_product_id[1]
contains the name of the deposit. we could add it in the message, so the user know directly which product he has to enable for the PoS.
pos_deposit/readme/ROADMAP.rst
Outdated
@@ -0,0 +1 @@ | |||
- If the screen refreshes or session is reopened, the link between product and container is lost, so the quantities can get out of sync. This is not something that happens often and can be 'repaired' by removing and re-adding a product to the order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't faced that issue. I mean
- open PoS
- Add a product (it adds a consign)
- set quantity = 33 (it set qty = 33 on consign)
- refresh
- set quantity = 50 on product (it set qty = 50 on consign).
What is the "bug" / "limitation" described here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, that's a leftover from v13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code review and test. LGTM. Thanks !
@legalsylvain curious about your take on discussion with the customer: currently you can edit the deposit product line independently of the line it's a deposit for, I was thinking about doing this because a customer buys 10 bottles and returns 5, then you don't need to scan 5 negative deposit bottles, but just edit the quantity of the deposit. Do you consider this a valid use case, or should we rather not allow editing the deposit line at all? |
Yes. return and purchase consign in a single sale is a common use case, at least in my business : For exemple, the groceries sell beer in returnable bottles. So regularly, the customer comes with an empty bottle, and leaves with a full one. But I have another questions. (not blocking point).
There are first :
If I understand correctly, the 4 modules mentioned above implement something similar to your implementation in the product level, but in a more complex (or complete) manner, with packaging. Also there are :
But I'm not sure to understand very well the usage of those modules (Finally, there is https://github.com/OCA/account-financial-tools/tree/16.0/account_cash_deposit but this is a very disctinct topic) All this to say that the OCA is full of “deposit” modules that talk about a variety of things. I don't have any clear proposals on this subject though. thanks for reading. |
@legalsylvain Currently in the two installations where this is used, they have manually created "negative deposit products" that mirror the regular ones. In such a case, it makes sense to make the "automatic" POS order line readonly and locked to the number of products, eg 10 beer always comes with 10 bottles, and if bottles come back, it's going to be a separate order line with 5 "return bottles". This is of course not good for stockkeeping, but in their case they don't care because they've set the containers as consumables and just don't count stock. Though for installations that do keep stock it can work by selling negative amounts of containers on a separate line, I've tested this in 16.0 and it also seems to be possible. In your opinion should we:
PS. About the |
I don't understand how you can "add a new negative line". If I click on the consign, it readd a quantity 1 to the existing line. It doesn't create a new line. Or do you use this module https://github.com/OCA/pos/tree/16.0/pos_order_new_line ?
hum.... you have to in any case. if product Test and Test 2 use the same consign product, quantity of line "Test" / "Test 2" and "consign" are different. Don't you think ? screenshot of the current runboat : Sorry If I missed something. |
True but i was talking the case where we decide to lock the existing consign product line to readonly state, and make sure that Odoo adds a new line instead? In that case, the newly added line can be made a negative one.
.... yes, I didn't think of that but you're right, they add up in the same line. Though even then, we can have the both options of A) locking that particular line and having it governed only by the amounts on the product lines that use that line, or B) allowing it to be manually edited. I think the main problem with B is that it requires quite the amount of math in the head of the salesperson in the case where people bring back crates/bottles and it's easy to make mistakes? Anyway, it still remains my question to you whether you would be in favour of A, B or a configuration option deciding between the both. @hbrunn While testing with two products (say X, Y) using the same consign/deposit product (P) I found bugs though:
|
ah. yes. indeed. Well, for me :
|
I agree with tom's suggestion.
Regarding the issue with calculation of number of deposits products X. At the moment we have in our v8 version;
|
@denniiiiis So to clarify, your preference would be this:
And not this, unless it's an option that can be switched off:
Then also, your preference would be that each new product that has a matching deposit has their own, paired and separate deposit line, which is locked. So in the end if people buy 5 milk, 5 cola and also return 3 bottles, it would look like this:
Correct? |
@legalsylvain If we then make it in this way and rename the module, would you add your own process as an option that can be selected, later this year? Or would you perhaps explain your users to prefer this option also (I agree with Dennis that it's both easier for the cashier and clearer for everyone) |
I'm totally agree with the following solution. MILK 2 In fact, it will be better : bottle 2 I mean, when we scan a product, the consign is added before the product added. Otherwise, if the user want to change price, quantity, etc., he will change the price / quantity of the consign, that is not what he want. Don't you think ? Otherwise, LGTM. For the renaming, sorry for the extra work. I think that it's better to rename now than once merged in OCA repo. |
@legalsylvain, I got your point regarding the order and see the benefits. @thomaspaulb / @hbrunn , maybe we could make it (order) a configuration option as well? |
If after scanning MILK, bottle comes automatically but the focus jumps back to MILK and the bottle line is locked / can't be edited, does your order argument still apply? |
I think it's OK in that case. |
b040a3f
to
16a431d
Compare
followed up everything here and added js tests |
Should the title of the MR rather be [ADD][16.0] pos_container_deposit, since the 13.0 one was never merged and likely wont be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works well!
This PR has the |
migration of #616 with @legalsylvain's comments applied