新增产线类型方法校验
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
from . import sf_demand_plan_print_wizard
|
||||
from . import sf_release_plan_wizard
|
||||
from . import sf_demand_plan_detail_wizard
|
||||
|
||||
15
sf_demand_plan/wizard/sf_demand_plan_detail_wizard.py
Normal file
15
sf_demand_plan/wizard/sf_demand_plan_detail_wizard.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import logging
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SfDemandPlanDetailWizard(models.TransientModel):
|
||||
_name = 'sf.demand.plan.detail.wizard'
|
||||
_description = u'需求计划详情向导'
|
||||
|
||||
demand_plan_line_ids = fields.Many2many(comodel_name="sf.production.demand.plan",
|
||||
string="需求计划明细", readonly=True)
|
||||
|
||||
mrp_production_ids = fields.Many2many('mrp.production', string='关联制造订单', readonly=True)
|
||||
21
sf_demand_plan/wizard/sf_demand_plan_detail_wizard_view.xml
Normal file
21
sf_demand_plan/wizard/sf_demand_plan_detail_wizard_view.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="action_plan_detail_form" model="ir.ui.view">
|
||||
<field name="name">sf.demand.plan.detail.wizard.form</field>
|
||||
<field name="model">sf.demand.plan.detail.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="详情">
|
||||
<notebook>
|
||||
<page string="制造订单">
|
||||
<field name="mrp_production_ids"
|
||||
widget="many2many"
|
||||
options="{
|
||||
'views': [[false, 'tree'], [false, 'form']],
|
||||
'context': {'tree_view_ref': 'mrp.mrp_production_tree_view'}
|
||||
}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -5,7 +5,7 @@ from odoo import models, fields, api, _
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SfDemandPlanPrintWizard(models.TransientModel):
|
||||
class SfDemandPlanPrintWizard(models.Model):
|
||||
_name = 'sf.demand.plan.print.wizard'
|
||||
_description = u'打印向导'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user