Merge branch 'develop' into feature/commercially_launched
This commit is contained in:
@@ -26,14 +26,15 @@
|
|||||||
<xpath expr="//field[@name='requested_by']" position="replace">
|
<xpath expr="//field[@name='requested_by']" position="replace">
|
||||||
<field name="supply_method"/>
|
<field name="supply_method"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='assigned_to']" position="replace">
|
<xpath expr="//field[@name='assigned_to']" position="attributes">
|
||||||
|
<attribute name="invisible">True</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='name']" position="attributes">
|
<xpath expr="//field[@name='name']" position="attributes">
|
||||||
<attribute name="invisible">True</attribute>
|
<attribute name="invisible">True</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='supplier_id']" position="after">
|
<xpath expr="//field[@name='supplier_id']" position="after">
|
||||||
<field name="requested_by" widget="many2one_avatar_user"/>
|
<field name="requested_by" widget="many2one_avatar_user"/>
|
||||||
<field name="assigned_to" widget="many2one_avatar_user"/>
|
<field name="assigned_to" widget="many2one_avatar_user" invisible="1"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='purchased_qty']" position="attributes">
|
<xpath expr="//field[@name='purchased_qty']" position="attributes">
|
||||||
<attribute name="string">采购数量</attribute>
|
<attribute name="string">采购数量</attribute>
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
<xpath expr="//field[@name='product_id']" position="after">
|
<xpath expr="//field[@name='product_id']" position="after">
|
||||||
<field name="related_product"/>
|
<field name="related_product"/>
|
||||||
<field name="part_number"/>
|
<field name="part_number"/>
|
||||||
<field name="part_name"/>
|
<field name="part_name" invisible="1"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -88,6 +88,16 @@ class StockPicking(models.Model):
|
|||||||
self.send_to_bfm()
|
self.send_to_bfm()
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
def _action_done(self):
|
||||||
|
"""处理创建欠单时,新单据验证序列号无法使用问题"""
|
||||||
|
todo_moves = self.move_ids.filtered(
|
||||||
|
lambda self: self.state in ['draft', 'waiting', 'partially_available', 'assigned', 'confirmed'])
|
||||||
|
res = super(StockPicking, self)._action_done()
|
||||||
|
todo_move = todo_moves.filtered(lambda mv: mv.quantity_done == 0)
|
||||||
|
if todo_move:
|
||||||
|
todo_move.move_line_nosuggest_ids.write({'qty_done': 1})
|
||||||
|
return res
|
||||||
|
|
||||||
def deal_move_ids(self, send_move_ids, send_move_line_ids):
|
def deal_move_ids(self, send_move_ids, send_move_line_ids):
|
||||||
move_ids = [] # 本次发货单
|
move_ids = [] # 本次发货单
|
||||||
move_line_ids = [] # 本次发货单行
|
move_line_ids = [] # 本次发货单行
|
||||||
|
|||||||
Reference in New Issue
Block a user