Navigation Menu

Skip to content

Commit

Permalink
[IMP] Get values from onchange
Browse files Browse the repository at this point in the history
  • Loading branch information
MiquelRForgeFlow committed Aug 18, 2017
1 parent ad2d168 commit bf6d898
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sale_product_set/wizard/product_set_add.py
Expand Up @@ -35,10 +35,13 @@ def add_set(self):

def prepare_sale_order_line_data(self, sale_order_id, set, set_line,
max_sequence=0):
return {
sale_line = self.env['sale.order.line'].new({
'order_id': sale_order_id,
'product_id': set_line.product_id.id,
'product_uom': set_line.product_id.uom_id.id,
'product_uom_qty': set_line.quantity * self.quantity,
'sequence': max_sequence + set_line.sequence,
}
})
sale_line.product_id_change()
line_values = sale_line._convert_to_write(sale_line._cache)
return line_values

0 comments on commit bf6d898

Please sign in to comment.