~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to consumption_calculation/consumption_view.xml

ConsumptionĀ Calc

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
                    <field colspan="4" name="line_ids" mode="tree" nolabel="1" widget="one2many_list" attrs="{'readonly': [('created_ok', '=', True)]}">
30
30
                                                <tree string="Products" editable="top" colors="red:prodlot_id and consumed_qty>product_qty;blue: not prodlot_id and consumed_qty>product_qty">
31
31
                            <field name="product_id" on_change="product_onchange(product_id, parent.cons_location_id, uom_id, prodlot_id)"
32
 
                                context="{'location': parent.cons_location_id}"
 
32
                                context="{'location': parent.cons_location_id, 'compute_child': False}"
33
33
                                domain="[('nomen_ids', '=', parent.nomen_id), ('list_ids', '=', parent.sublist_id)]" />
34
34
                            <field name="uom_id" 
35
35
                                on_change="uom_onchange(product_id, parent.cons_location_id, uom_id, prodlot_id)"/>
36
36
                            <field name="product_qty" />
37
37
                            <field name="prodlot_id" 
38
38
                                on_change="change_prodlot(product_id, prodlot_id, expiry_date, parent.cons_location_id, uom_id)"
39
 
                                domain="[('product_id', '=', product_id), ('stock_real', '>', 0)]"
40
 
                                context="{'location': parent.cons_location_id, 'location_id': parent.cons_location_id, 'uom': uom_id, 'hidden_perishable_mandatory': date_mandatory}"
 
39
                                domain="[('product_id', '=', product_id), ('stock_available', '>', 0)]"
 
40
                                context="{'location_id': parent.cons_location_id, 'uom': uom_id, 'hidden_perishable_mandatory': date_mandatory}"
41
41
                                attrs="{'required': [('batch_mandatory', '=', True)], 'readonly': [('batch_mandatory', '=', False)]}" />
42
42
                            <field name="expiry_date"
43
43
                                on_change="change_expiry(expiry_date, product_id, parent.cons_location_id, uom_id)"