Skip to content
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

[ADD][16.0] pos_default_quantity #1238

Closed
wants to merge 23 commits into from

Conversation

carmenbianca
Copy link
Member

Migrated from v12 @ https://github.com/coopiteasy/cie-pos/tree/12.0/pos_default_quantity

This module adds a field for a default quantity to Unit of Measure Categories.
When this is filled in, and when this functionality is enabled in the Point of
Sale configuration, then adding that product to an order in the Point of Sale
will set the quantity to that value by default.

Internal task T12149

robinkeunen and others added 22 commits September 24, 2024 10:45
fixup! [ADD] pos_default_quantity: sets default orderline quantity

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
When restoring the order from a json, previous code overwrote quantity with default quantity

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
- followed oca guidelines
- not tested on odoo 10.0

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
- followed oca guidelines
- not tested on odoo 11.0

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
- followed oca guidelines

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
[REF] pre-commit automatic  linting

[REF] lint xml

[REF] optimize imports

[WIP] add readmes and fix manifests

[REF] lint csv

[REF] flake8 fixes

[REF] class-camelcase

[REF] method-compute

[REF] duplicate-id-csv

pre-commit second pass

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @carmenbianca . Thanks for sharing.

  • could you provide a use case, when this module is interesting for end user. I'm not sure to understand.
  • naive question : when you port a module from 12 to 16, why do you make migration to 13 / 14 /15 and not directly to 16 ?

thanks !

@victor-champonnois
Copy link
Member

victor-champonnois commented Sep 25, 2024

@legalsylvain Regarding the use case, it's an old module do I don't know the original intention. From what supermarkets told me, they use it on weighted products by setting a very high default minimal amount.
This prevents the cashier from forgetting to put a weight on the product (because the total of the order is then very high if the weight is not manually set).

I don't know if it's the original intent of the module but some supermarkets are attached to it. I am sure there are better way to prevent forgetting to put the weight though.

@legalsylvain
Copy link
Contributor

I don't know if it's the original intent of the module but some supermarkets are attached to it. I am sure there are better way to prevent forgetting to put the weight though.

;-)

@victor-champonnois
Copy link
Member

@carmenbianca does the module works on your side ? I tested it on products with a "kg" and a "g" uom but the default quantity is not set on the POS.

@carmenbianca
Copy link
Member Author

@carmenbianca
Copy link
Member Author

@legalsylvain

  • could you provide a use case, when this module is interesting for end user. I'm not sure to understand.

the use-case is a little beyond me. doing this by UoM category instead of, say, product category is a strange choice, but I just ported it as-is. I could 100% understand keeping this as an internal module. I'm just trying to lower the amount of internal modules where I can to be nicer members of the community.

  • naive question : when you port a module from 12 to 16, why do you make migration to 13 / 14 /15 and not directly to 16 ?

Those are the OCA contribution guidelines. Now technically I didn't do a good job of this, and this wasn't an OCA module to begin with, so that history wasn't super important.

@victor-champonnois
Copy link
Member

@carmenbianca I test on the runboat, following the steps in the documented configuration, but I don't see it working in the POS. Could you have a look at the runboat ? (I test with the product called "kg product", with the "weight" uom category).

@carmenbianca
Copy link
Member Author

@victor-champonnois you're right, it doesn't work (any longer?). i was also able to reproduce the dysfunction locally.

also, apparently the 'technical' section is hidden unless you use debugging mode. that isn't great; to fix.

@carmenbianca carmenbianca marked this pull request as draft September 26, 2024 09:47
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
@carmenbianca
Copy link
Member Author

@victor-champonnois fixed. there was a typo in the javascript that mustn't have been there before.

i also moved the setting to the 'inventory' section. not a perfect match, but it's the best match without creating a new section.

Copy link
Member

@victor-champonnois victor-champonnois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix, LGTM functionnally!

@victor-champonnois
Copy link
Member

@carmenbianca I am not sure it's a good OCA fit though, since the known use case is as bit of a hack.

@carmenbianca
Copy link
Member Author

@victor-champonnois agreed, closing in favour of coopiteasy/cie-pos#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants