Accept Merge Request #1668: (feature/消息提醒优化 -> develop)
Merge Request: 提示优化 Created By: @管欢 Reviewed By: @胡尧 Approved By: @胡尧 Accepted By: @管欢 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1668?initial=true
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
'sequence': 120,
|
||||
'summary': 'Control the quality of your products',
|
||||
'website': 'https://www.odoo.com/app/quality',
|
||||
'depends': ['quality'],
|
||||
'depends': ['quality', 'sf_manufacturing'],
|
||||
'description': """
|
||||
Quality Control
|
||||
===============
|
||||
|
||||
@@ -1618,6 +1618,26 @@ class MrpProduction(models.Model):
|
||||
})
|
||||
return action
|
||||
|
||||
def _subcontract_sanity_check(self):
|
||||
for production in self:
|
||||
if production.product_tracking != 'none' and not self.lot_producing_id:
|
||||
raise UserError(_('You must enter a serial number for %s') % production.product_id.name)
|
||||
for sml in production.move_raw_ids.move_line_ids:
|
||||
if sml.tracking != 'none' and not sml.lot_id:
|
||||
picking_ids = production.picking_ids.filtered(
|
||||
lambda p: p.state not in ['done', 'cancel'])
|
||||
picking_num = len(picking_ids)
|
||||
picking_info = ', '.join(
|
||||
['%s:%s' % (picking.picking_type_id.name, picking.name) for picking in picking_ids]
|
||||
)
|
||||
if picking_info:
|
||||
raise UserError(_('您有%s补给未完成: %s') % (
|
||||
picking_num, picking_info))
|
||||
else:
|
||||
raise UserError(
|
||||
_('您必须为以下各%s行输入序列号') % sml.product_id.display_name)
|
||||
return True
|
||||
|
||||
|
||||
class sf_detection_result(models.Model):
|
||||
_name = 'sf.detection.result'
|
||||
|
||||
@@ -611,6 +611,7 @@ class StockPicking(models.Model):
|
||||
sale_info = production_list[0].sale_order_id
|
||||
if sale_info:
|
||||
item.sale_order_id = sale_info.id
|
||||
item.retrospect_ref = sale_info.order_code
|
||||
if item.picking_type_id.sequence_code == 'DL':
|
||||
item.person_of_delivery = sale_info.person_of_delivery
|
||||
item.telephone_of_delivery = sale_info.telephone_of_delivery
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='backorder_id']" position="after">
|
||||
<field name="retrospect_ref"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='origin']" position="after">
|
||||
<field name="sale_order_id"/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user