Closed simahawk closed 5 years ago
Make sure nobody can add a non bound product to the cart. Collateral goal: allow to control product availability for selling from different contexts.
Add a generic method to product to check it no matter where.
_add_to_cart_allowed
product.product
cart.add_item
Aggregator issue: #452
https://github.com/shopinvader/odoo-shopinvader/pull/511
done
Goal
Make sure nobody can add a non bound product to the cart. Collateral goal: allow to control product availability for selling from different contexts.
Solution
Add a generic method to product to check it no matter where.
TODO
_add_to_cart_allowed
method toproduct.product
(gets backend and partner)cart.add_item
(partner and backend come from service context)Aggregator issue: #452