Merge branch refs/heads/develop into refs/heads/feature/修改机床参数bug
This commit is contained in:
@@ -567,30 +567,6 @@ class SfPickingType(models.Model):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfProductCategory(models.Model):
|
||||
_inherit = 'product.category'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfUomCategory(models.Model):
|
||||
_inherit = 'uom.category'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfBarcodeNomenclature(models.Model):
|
||||
_inherit = 'barcode.nomenclature'
|
||||
|
||||
|
||||
@@ -37,5 +37,41 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- 原生的按钮对base.user可见,这里修改为对库存用户可见 -->
|
||||
<record id="sf_view_picking_form" model="ir.ui.view">
|
||||
<field name="name">sf.view.picking.form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form//header//button[@name='action_cancel']" position="replace">
|
||||
<button name="action_cancel" attrs="{'invisible': [('state', 'not in', ('assigned', 'confirmed', 'draft', 'waiting'))]}" string="取消" groups="sf_warehouse.group_sf_stock_user" type="object" data-hotkey="z"/>
|
||||
</xpath>
|
||||
<xpath expr="//form//header//button[@name='do_unreserve']" position="replace">
|
||||
<button name="do_unreserve" string="取消保留" groups="sf_warehouse.group_sf_stock_user" type="object" attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '=', 'incoming'), ('immediate_transfer', '=', True), '&', ('state', '!=', 'assigned'), ('move_type', '!=', 'one'), '&', ('state', 'not in', ('assigned', 'confirmed')), ('move_type', '=', 'one')]}" data-hotkey="w"/>
|
||||
</xpath>
|
||||
<xpath expr="//form//header//button[@name='button_scrap']" position="replace">
|
||||
<button name="button_scrap" groups="sf_warehouse.group_sf_stock_user" type="object" string="报废" attrs="{'invisible': ['|', '&', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done'), '&', ('picking_type_code', '=', 'outgoing'), ('state', '=', 'done')]}" data-hotkey="y"/>
|
||||
</xpath>
|
||||
<xpath expr="//form//header//button[@name='action_assign']" position="replace">
|
||||
<button name="action_assign" attrs="{'invisible': [('show_check_availability', '=', False)]}" string="检查可用量" type="object" class="oe_highlight" groups="sf_warehouse.group_sf_stock_user" data-hotkey="q"/>
|
||||
</xpath>
|
||||
<xpath expr="//form//header//button[@name='%(stock.act_stock_return_picking)d']" position="replace">
|
||||
<button name="%(stock.act_stock_return_picking)d" string="退回" attrs="{'invisible': [('state', '!=', 'done')]}" type="action" groups="sf_warehouse.group_sf_stock_user" data-hotkey="k"/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_stock_scrap_form_view" model="ir.ui.view">
|
||||
<field name="name">sf.stock.scrap.form.view</field>
|
||||
<field name="model">stock.scrap</field>
|
||||
<field name="inherit_id" ref="stock.stock_scrap_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header//button[@name='action_validate']" position="replace">
|
||||
<button name="action_validate" states="draft" string="Validate" type="object" class="oe_highlight" context="{'not_unlink_on_discard': True}" data-hotkey="v" groups="sf_warehouse.group_sf_stock_user"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -313,67 +313,6 @@
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
<!--产品类别根据权限增加审核按钮-->
|
||||
<record id="view_product_category_form_sf_inherit" model="ir.ui.view">
|
||||
<field name="name">product.category.form.sf.inherit</field>
|
||||
<field name="model">product.category</field>
|
||||
<field name="inherit_id" ref="product.product_category_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>
|
||||
|
||||
<!-- <record id="view_product_category_tree_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">product.category.tree.sf.inherit</field>-->
|
||||
<!-- <field name="model">product.category</field>-->
|
||||
<!-- <field name="inherit_id" ref="product.product_category_list_view"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//field[last()]" position="after">-->
|
||||
<!-- <field name="check_state" widget="label_selection"-->
|
||||
<!-- options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!--计量单位类别根据权限增加审核按钮-->
|
||||
<record id="view_uom_category_form_sf_inherit" model="ir.ui.view">
|
||||
<field name="name">uom.category.form.sf.inherit</field>
|
||||
<field name="model">uom.category</field>
|
||||
<field name="inherit_id" ref="uom.product_uom_categ_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>
|
||||
|
||||
<!-- <record id="view_uom_category_tree_sf_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">uom.category.tree.sf.inherit</field>-->
|
||||
<!-- <field name="model">uom.category</field>-->
|
||||
<!-- <field name="inherit_id" ref="uom.product_uom_categ_tree_view"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//field[last()]" position="after">-->
|
||||
<!-- <field name="check_state" widget="label_selection"-->
|
||||
<!-- options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!--条码命名规则根据权限增加审核按钮-->
|
||||
<record id="view_barcode_nomenclature_form_sf_inherit" model="ir.ui.view">
|
||||
|
||||
Reference in New Issue
Block a user