1.新增表面工艺外协路线初始化数据
This commit is contained in:
@@ -19,13 +19,6 @@ class SfLocation(models.Model):
|
||||
name = fields.Char('Location Name', required=True, size=20)
|
||||
barcode = fields.Char('Barcode', copy=False, size=15)
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
# 仓库类别(selection:库区、库位、货位)
|
||||
# location_type = fields.Selection([
|
||||
@@ -822,112 +815,15 @@ class SfProcurementGroup(models.Model):
|
||||
return res
|
||||
|
||||
|
||||
class SfWarehouse(models.Model):
|
||||
_inherit = 'stock.warehouse'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfRule(models.Model):
|
||||
_inherit = 'stock.rule'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfRoute(models.Model):
|
||||
_inherit = 'stock.route'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfPickingType(models.Model):
|
||||
_inherit = 'stock.picking.type'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfBarcodeNomenclature(models.Model):
|
||||
_inherit = 'barcode.nomenclature'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfPutawayRule(models.Model):
|
||||
_inherit = 'stock.putaway.rule'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '同意'),
|
||||
('close', '不同意')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfWarehouseOrderpoint(models.Model):
|
||||
_inherit = 'stock.warehouse.orderpoint'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '同意'),
|
||||
('close', '不同意')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfStockQuant(models.Model):
|
||||
_inherit = 'stock.quant'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '同意'),
|
||||
('close', '不同意')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfStockScrap(models.Model):
|
||||
_inherit = 'stock.scrap'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
def _default_show_operations(self):
|
||||
return self.user_has_groups('stock.group_production_lot,'
|
||||
'stock.group_stock_multi_locations,'
|
||||
'stock.group_tracking_lot',
|
||||
'sf_warehouse.group_sf_stock_user',
|
||||
'sf_warehouse.group_sf_stock_manager')
|
||||
|
||||
|
||||
class CustomStockMove(models.Model):
|
||||
|
||||
@@ -67,16 +67,16 @@
|
||||
</notebook>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//sheet" position="before">
|
||||
<header>
|
||||
<field name="check_state" invisible="1"/>
|
||||
<button name="action_check" string="审核" type="object"
|
||||
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||
groups="sf_warehouse.group_sf_stock_manager"
|
||||
class="oe_highlight"/>
|
||||
</header>
|
||||
<!-- <xpath expr="//sheet" position="before">-->
|
||||
<!-- <header>-->
|
||||
<!-- <field name="check_state" invisible="1"/>-->
|
||||
<!-- <button name="action_check" string="审核" type="object"-->
|
||||
<!-- attrs="{'invisible': [('check_state','=', 'enable')]}"-->
|
||||
<!-- groups="sf_warehouse.group_sf_stock_manager"-->
|
||||
<!-- class="oe_highlight"/>-->
|
||||
<!-- </header>-->
|
||||
|
||||
</xpath>
|
||||
<!-- </xpath>-->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -188,23 +188,23 @@
|
||||
<!-- </record>-->
|
||||
|
||||
<!--仓库根据权限增加审核按钮-->
|
||||
<record id="view_warehouse_form_sf_inherit" model="ir.ui.view">
|
||||
<field name="name">stock.warehouse.form.sf.inherit</field>
|
||||
<field name="model">stock.warehouse</field>
|
||||
<field name="inherit_id" ref="stock.view_warehouse"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="before">
|
||||
<header>
|
||||
<field name="check_state" invisible="1"/>
|
||||
<button name="action_check" string="审核" type="object"
|
||||
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||
groups="sf_warehouse.group_sf_stock_manager"
|
||||
class="oe_highlight"/>
|
||||
</header>
|
||||
<!-- <record id="view_warehouse_form_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.warehouse.form.sf.inherit</field>-->
|
||||
<!-- <field name="model">stock.warehouse</field>-->
|
||||
<!-- <field name="inherit_id" ref="stock.view_warehouse"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//sheet" position="before">-->
|
||||
<!-- <header>-->
|
||||
<!-- <field name="check_state" invisible="1"/>-->
|
||||
<!-- <button name="action_check" string="审核" type="object"-->
|
||||
<!-- attrs="{'invisible': [('check_state','=', 'enable')]}"-->
|
||||
<!-- groups="sf_warehouse.group_sf_stock_manager"-->
|
||||
<!-- class="oe_highlight"/>-->
|
||||
<!-- </header>-->
|
||||
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="view_warehouse_tree_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.warehouse.tree.sf.inherit</field>-->
|
||||
@@ -220,23 +220,23 @@
|
||||
|
||||
|
||||
<!--路线根据权限增加审核按钮-->
|
||||
<record id="view_route_form_sf_inherit" model="ir.ui.view">
|
||||
<field name="name">stock.route.form.sf.inherit</field>
|
||||
<field name="model">stock.route</field>
|
||||
<field name="inherit_id" ref="stock.stock_location_route_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="before">
|
||||
<header>
|
||||
<field name="check_state" invisible="1"/>
|
||||
<button name="action_check" string="审核" type="object"
|
||||
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||
groups="sf_warehouse.group_sf_stock_manager"
|
||||
class="oe_highlight"/>
|
||||
</header>
|
||||
<!-- <record id="view_route_form_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.route.form.sf.inherit</field>-->
|
||||
<!-- <field name="model">stock.route</field>-->
|
||||
<!-- <field name="inherit_id" ref="stock.stock_location_route_form_view"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//sheet" position="before">-->
|
||||
<!-- <header>-->
|
||||
<!-- <field name="check_state" invisible="1"/>-->
|
||||
<!-- <button name="action_check" string="审核" type="object"-->
|
||||
<!-- attrs="{'invisible': [('check_state','=', 'enable')]}"-->
|
||||
<!-- groups="sf_warehouse.group_sf_stock_manager"-->
|
||||
<!-- class="oe_highlight"/>-->
|
||||
<!-- </header>-->
|
||||
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="view_route_tree_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.route.tree.sf.inherit</field>-->
|
||||
@@ -251,23 +251,23 @@
|
||||
<!-- </record>-->
|
||||
|
||||
<!--规则根据权限增加审核按钮-->
|
||||
<record id="view_rule_form_sf_inherit" model="ir.ui.view">
|
||||
<field name="name">stock.rule.form.sf.inherit</field>
|
||||
<field name="model">stock.rule</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_rule_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="before">
|
||||
<header>
|
||||
<field name="check_state" invisible="1"/>
|
||||
<button name="action_check" string="审核" type="object"
|
||||
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||
groups="sf_warehouse.group_sf_stock_manager"
|
||||
class="oe_highlight"/>
|
||||
</header>
|
||||
<!-- <record id="view_rule_form_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.rule.form.sf.inherit</field>-->
|
||||
<!-- <field name="model">stock.rule</field>-->
|
||||
<!-- <field name="inherit_id" ref="stock.view_stock_rule_form"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//sheet" position="before">-->
|
||||
<!-- <header>-->
|
||||
<!-- <field name="check_state" invisible="1"/>-->
|
||||
<!-- <button name="action_check" string="审核" type="object"-->
|
||||
<!-- attrs="{'invisible': [('check_state','=', 'enable')]}"-->
|
||||
<!-- groups="sf_warehouse.group_sf_stock_manager"-->
|
||||
<!-- class="oe_highlight"/>-->
|
||||
<!-- </header>-->
|
||||
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="view_rule_tree_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.rule.tree.sf.inherit</field>-->
|
||||
@@ -282,23 +282,23 @@
|
||||
<!-- </record>-->
|
||||
|
||||
<!--作业类型根据权限增加审核按钮-->
|
||||
<record id="view_picking_type_form_sf_inherit" model="ir.ui.view">
|
||||
<field name="name">stock.picking.type.form.sf.inherit</field>
|
||||
<field name="model">stock.picking.type</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_type_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="before">
|
||||
<header>
|
||||
<field name="check_state" invisible="1"/>
|
||||
<button name="action_check" string="审核" type="object"
|
||||
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||
groups="sf_warehouse.group_sf_stock_manager"
|
||||
class="oe_highlight"/>
|
||||
</header>
|
||||
<!-- <record id="view_picking_type_form_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.picking.type.form.sf.inherit</field>-->
|
||||
<!-- <field name="model">stock.picking.type</field>-->
|
||||
<!-- <field name="inherit_id" ref="stock.view_picking_type_form"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//sheet" position="before">-->
|
||||
<!-- <header>-->
|
||||
<!-- <field name="check_state" invisible="1"/>-->
|
||||
<!-- <button name="action_check" string="审核" type="object"-->
|
||||
<!-- attrs="{'invisible': [('check_state','=', 'enable')]}"-->
|
||||
<!-- groups="sf_warehouse.group_sf_stock_manager"-->
|
||||
<!-- class="oe_highlight"/>-->
|
||||
<!-- </header>-->
|
||||
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="view_picking_type_tree_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.picking.type.tree.sf.inherit</field>-->
|
||||
|
||||
Reference in New Issue
Block a user