Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into develop
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<field name="state" select="multi" string="状态" icon="fa-building" enable_counters="1"/>
|
||||
|
||||
<field name="construction_period_status" select="multi" icon="fa-building" enable_counters="1"/>
|
||||
<field name="tag_type" select="multi" icon="fa-building" enable_counters="1"/>
|
||||
<!-- <field name="manual_quotation" select="multi" string="" icon="fa-building" enable_counters="1"/>-->
|
||||
</searchpanel>
|
||||
|
||||
|
||||
@@ -141,8 +141,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
|
||||
# 是否绑定托盘
|
||||
is_trayed = fields.Boolean(string='是否绑定托盘', default=False)
|
||||
|
||||
tag_type = fields.Selection([("重新加工", "重新加工")], string="标签", tracking=True)
|
||||
|
||||
technology_design_id = fields.Many2one('sf.technology.design')
|
||||
|
||||
def _compute_default_construction_period_status(self):
|
||||
|
||||
@@ -286,6 +286,8 @@ class StockRule(models.Model):
|
||||
mrp_production = self.env['mrp.production'].sudo().search([('name', '=', production.origin)], limit=1)
|
||||
if mrp_production:
|
||||
sale_order = self.env['sale.order'].sudo().search([('name', '=', mrp_production.origin)])
|
||||
else:
|
||||
mrp_production = production
|
||||
if sale_order:
|
||||
# sale_order.write({'schedule_status': 'to schedule'})
|
||||
self.env['sf.production.plan'].sudo().with_company(company_id).create({
|
||||
@@ -293,7 +295,7 @@ class StockRule(models.Model):
|
||||
'order_deadline': sale_order.deadline_of_delivery,
|
||||
'production_id': production.id,
|
||||
'date_planned_start': production.date_planned_start,
|
||||
'origin': production.origin,
|
||||
'origin': mrp_production.origin,
|
||||
'product_qty': production.product_qty,
|
||||
'product_id': production.product_id.id,
|
||||
'state': 'draft',
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
</field>
|
||||
<xpath expr="//field[@name='qty_remaining']" position="after">
|
||||
<field name="manual_quotation" optional="show"/>
|
||||
<field name="tag_type" optional="show"/>
|
||||
<field name="construction_period_status" optional="show" widget="badge"
|
||||
decoration-success="construction_period_status == '正常'"
|
||||
decoration-warning="construction_period_status == '预警'"
|
||||
|
||||
@@ -15,6 +15,8 @@ class ReworkWizard(models.TransientModel):
|
||||
production_id = fields.Many2one('mrp.production', string='制造订单号')
|
||||
workorder_ids = fields.Many2many('mrp.workorder', 'rework_wizard_to_work_order', string='所有工单',
|
||||
domain="[('production_id', '=', production_id),('state','=','done')]")
|
||||
hidden_workorder_ids = fields.Many2many('mrp.workorder', 'rework_wizard_to_work_order_hidden',
|
||||
string='所有工单(hidden)')
|
||||
rework_reason = fields.Selection(
|
||||
[("programming", "编程"), ("cutter", "刀具"), ("clamping", "装夹"),
|
||||
("operate computer", "操机"),
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<field name="tool_state" invisible="True"/>
|
||||
<field name="routing_type" invisible="True"/>
|
||||
<field name="processing_panel_id" invisible="1"/>
|
||||
<field name="hidden_workorder_ids" invisible="1"/>
|
||||
<group>
|
||||
<field name="workorder_ids" string="工序" attrs='{"invisible": [("routing_type","=","装夹预调")]}'>
|
||||
<tree create="0" editable='bottom' delete="0">
|
||||
|
||||
@@ -259,10 +259,10 @@ class sf_production_plan(models.Model):
|
||||
# sale_obj = self.env['sale.order'].search([('name', '=', record.origin)])
|
||||
# if 'S' in sale_obj.name:
|
||||
# sale_obj.schedule_status = 'to process'
|
||||
mrp_production_ids = record.production_id._get_children().ids
|
||||
print('mrp_production_ids', mrp_production_ids)
|
||||
for i in mrp_production_ids:
|
||||
record.env['mrp.production'].sudo().browse(i).schedule_state = '已排'
|
||||
# mrp_production_ids = record.production_id._get_children().ids
|
||||
# print('mrp_production_ids', mrp_production_ids)
|
||||
# for i in mrp_production_ids:
|
||||
# record.env['mrp.production'].sudo().browse(i).schedule_state = '已排'
|
||||
# record.production_id.date_planned_start = record.date_planned_start
|
||||
# record.production_id.date_planned_finished = record.date_planned_finished
|
||||
record.sudo().production_id.production_line_id = record.production_line_id.id
|
||||
|
||||
Reference in New Issue
Block a user