[FIX] stock: duplicate foreach keys in replenishment history
Before this commit: The key used in the foreach, `line`, is an object, which is converted into the following string `[object Object]`, resulting in duplicate keys and display a traceback when changing the supplier on an orderpoint. After this commit: The key used is `line.name`, which is a unique date across the dataset, preventing any duplicate keys. opw-3168077 closes odoo/odoo#114254 X-original-commit: 364ba497fc86928bf4a7be5b6777f8e2fffdf127 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com> Signed-off-by: Walravens Mathieu (wama) <wama@odoo.com>
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<hr/>
|
||||
<table t-if="jsonValue.replenishment_history" class="table table-borderless">
|
||||
<tbody>
|
||||
<t t-foreach="jsonValue.replenishment_history" t-key="line" t-as="line">
|
||||
<t t-foreach="jsonValue.replenishment_history" t-key="line.name" t-as="line">
|
||||
<tr>
|
||||
<td><t t-esc="line.name"/></td>
|
||||
<td class="text-end text-nowrap" t-esc="line.quantity + ' ' + line.uom_name"/>
|
||||
|
||||
Reference in New Issue
Block a user