summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/session_instance.js
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2016-03-07 13:57:27 +0100
committerMartin Trigaux <mat@odoo.com>2016-03-17 17:26:52 +0100
commitea50cb3806a1cd336e67928814479bcc97b0b9d7 (patch)
treeb6e711d9da45667c5a2447fba0d7f9275fc6668b /addons/web/static/src/js/framework/session_instance.js
parent788c1334e2cbe26fa26d4c6d4974dc413dbff608 (diff)
[IMP] website_sale: clean cart update methods
* _cart_find_product_line The method _cart_find_product_line is always called with only one record. The fact that the return statement was inside the loop confirms the for loop is not useful. The method will now return recordsets instead of ids. Convert the overrides to the new API for cleaner code and avoid old-new api headhache. Side note: the website_sale_option override logic is very counter intuitive and should probably be refactored. * _cart_update Add ensure_one to be sure working on only one sale.order. The method is always called on only one order and does not make sense to be used on multiple (is the action that is done on one line of the cart). The return format is the updated line without link to multiple orders. Remove the for loop and assume self is only one order.
Diffstat (limited to 'addons/web/static/src/js/framework/session_instance.js')
0 files changed, 0 insertions, 0 deletions