[18.0] [MIG] pos_product_cost_security#2120
Conversation
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/
cvinh
left a comment
There was a problem hiding this comment.
I tested it in runboat and I have no products in the pos screen with admin account (not belonging to any product_cost group)
|
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... |
|
/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
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 |
392b966 to
cd6d889
Compare
|
I added a fix to hide margin and cost fields in the backend https://github.com/parvezqureshi/product-attribute/pull/1/commits ... unless it's a core odoo's bug |
|
The patch seems correct. |
|
There is an issue with my patch parvezqureshi#1 (comment) |
|
I'm wondering how this module will work with OCA/pos#1483 |
|
Hello @cvinh, I don’t have that specific use case. I’ve been testing OCA/pos#1483 using a POS user with minimum permissions, and I haven’t been able to reproduce the issue. I assume this might be because I don’t have the product_cost_security module installed in my database. In any case, both modules are available in version 17, and I don't think any problems have ever been found with them. |


No description provided.