summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorAdrien Widart <awt@odoo.com>2021-03-16 09:08:04 +0000
committerAdrien Widart <awt@odoo.com>2021-03-16 09:15:55 +0000
commitd2d495bca3e91862470702f1ef07aa27c33d8e2d (patch)
tree57875502afabe961659e2090c7467aba1f3d9d8c /addons/web/static/src/js
parent09d8b027e39d1d2eb15abb8d9fe564292fa96d32 (diff)
[FIX] purchase,purchase_product_matrix: ignore date planned
When adding a variant product, if the option "Variant Grid Entry" is enabled, it will reset the delivery date of each purchase order line. To reproduce the error: (Use demo data) 1. In Settings, enable "Variant Grid Entry" 2. Create an RfQ 3. Add the field "Delivery Date" to purchase order line view 4. Add a basic product (e.g. "[FURN_6666] Acoustic Bloc Screens") - Keep its delivery date in mind 5. Add a variant product (e.g. "[E-COM12] Conference Chair (CONFIG)") Error: The delivery date of the first purchase order line has changed for no reason. Moreover, suppose that in step 4, the user defines a specific date: the latter will still be changed after the variant product is added. When adding a product, the delivery date of the purchase order and its lines are recomputed. However, an override of `onchange` ensures that the new delivery date of the lines will be ignored if the `onchange` concerns the field `order_line`. Here is the problem: when using the Variant Grid Entry, the `onchange` concerns the field `grid`. As a result, the new delivery dates are kept. This explains the creation of `_must_delete_date_planned` in this fix. However, when returing the result of an `onchange` linked to `grid`, the result contains the existing lines (on client side) and the new ones (from the Variant Grid Entry). If the field `date_planned` of the new lines is deleted, the client will raise an error when it tries to render these dates (it has no information about their value). Since existing lines are of the form `(0, <client_id>, <values>)`, this fix only deletes `date_planned` field for lines with <client_id> defined. OPW-2454164 closes odoo/odoo#67916 Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions