Skip to content

Conversation

@parvezqureshi
Copy link

No description provided.

chienandalu and others added 9 commits October 31, 2025 11:51
Glue module between Point of Sale and Product Cost Security
In a multicompany environment, doing a sudo() to override the security
in the PoS data loading could bring us more data than needed. Therefore
we just use the sudo to retrieve the cost and then join the data
altogether retrived with the user's permissions.

TT48609
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-pos_product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-pos_product_cost_security/
Currently translated at 100.0% (2 of 2 strings)

Translation: product-attribute-16.0/product-attribute-16.0-pos_product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-pos_product_cost_security/it/
Copy link

@cvinh cvinh left a comment

Choose a reason for hiding this comment

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

I tested it in runboat and I have no products in the pos screen with admin account (not belonging to any product_cost group)

@parvezqureshi
Copy link
Author

not belonging to

Without this module, we got permission errors.
This is a glue module to avoid permission errors when loading data in the Point of Sale if the user has no standard_price (cost) field permissions.

Screenshot_from_2025-10-31_12-43-43

For showing product, you want to add product_cost group.

image

@cvinh
Copy link

cvinh commented Oct 31, 2025

I'm sorry, I didn't know this module before, is it supposed to hide all products from a pos session and just hide error ... and only let people that have the right to see product cost to sell a product ? This is weird so I don't think so...
I know a guy who knows the answer... @pedrobaeza
#556

@pedrobaeza
Copy link
Member

/ocabot migration pos_product_cost_security

This bridge module allows to bypass the problem, as the way things are loaded in PoS and the groups ORM handling in fields is a bit "tricky".

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Oct 31, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 31, 2025
66 tasks
@cvinh
Copy link

cvinh commented Oct 31, 2025

/ocabot migration pos_product_cost_security

This bridge module allows to bypass the problem, as the way things are loaded in PoS and the groups ORM handling in fields is a bit "tricky".

Oh I see, then I understand better how pos_product_cost_security works. This is a sum up

  • in v16 : without pos_product_cost_security the point of sale does not open at all with access right error. If we install the module, the point of sale opens and the seller can use it even if he has no cost access rights...
  • in this PR : with or without the pos_product_cost_security, the point of sale opens but there are no products. if we search a product with "Search More" button, we have the access right error.

The expected behavior is that a user without the cost rights can use the point of sale

@parvezqureshi I think the PR from which you started does not work neither

@parvezqureshi parvezqureshi force-pushed the 18_mig_pos_product_cost_security branch from 392b966 to cd6d889 Compare November 10, 2025 06:37
Copy link

@cvinh cvinh left a comment

Choose a reason for hiding this comment

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

tested in runboat

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.

8 participants