我正在使用odoo 10.Onchange上,我需要设置move_lines
的move_lines
字段中的purchase_order_line
值stock_picking
。它会将值设置为该字段,但在保存记录后,move_lines字段为空(值消失)。值保存在Odoo中后消失10
我的代码:
data = {
'name': line.product_id.name,
'price_unit': line.price_unit,
'product_uom': line.product_uom.id,
'product_uom_qty': line.product_qty,
'purchase_line_id': line.id,
'procurement_id': line.procurement_ids.id,
'date_expected': date_planned,
'product_id': line.product_id.id,
'state': 'draft',
'origin': line.order_id.name,
'location_id': line.product_id.property_stock_production.id,
'picking_id': self.id,
'location_dest_id': line.order_id.picking_type_id.default_location_dest_id.id
}
move = self.env['stock.move'].create(data)
self.move_lines = move
后,没有在现场出现这将设置线值的move_lines
field.But。
我不知道我犯了什么错误?!
提示:您的优先级不是我们的。订单如:ASAP只会帮助收集你的评论。尽快。 – GhostCat