优化权限相关

This commit is contained in:
mgw
2023-12-17 10:48:51 +08:00
parent 0a3bd37224
commit 6738a855bb
15 changed files with 561 additions and 4 deletions

View File

@@ -37,6 +37,9 @@ access_purchase_order_line_group_purchase_director,access_purchase_order_line_gr
access_purchase_order,purchase.order,purchase.model_purchase_order,sf_base.group_plan_dispatch,1,0,0,0
access_purchase_order_line,purchase.order.line,purchase.model_purchase_order_line,sf_base.group_plan_dispatch,1,0,0,0
access_account_move_line,account.move.line,account.model_account_move_line,sf_base.group_plan_dispatch,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
37 access_purchase_order purchase.order purchase.model_purchase_order sf_base.group_plan_dispatch 1 0 0 0
38 access_purchase_order_line purchase.order.line purchase.model_purchase_order_line sf_base.group_plan_dispatch 1 0 0 0
39 access_account_move_line account.move.line account.model_account_move_line sf_base.group_plan_dispatch 1 0 0 0
40
41
42
43
44
45

View File

@@ -7,4 +7,6 @@ access_maintenance_standard_image,maintenance_standard_image,model_maintenance_s
access_sf_robot_axis_num,sf_robot_axis_num,model_sf_robot_axis_num,sf_group_equipment_user,1,1,1,1
access_maintenance_request,maintenance_request,model_maintenance_request,sf_base.group_plan_dispatch,1,0,0,0
access_sf_maintenance_logs,sf_maintenance_logs,model_sf_maintenance_logs,sf_base.group_plan_dispatch,1,0,0,0
access_equipment_maintenance_standards,equipment_maintenance_standards,model_equipment_maintenance_standards,sf_base.group_plan_dispatch,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
7 access_sf_robot_axis_num sf_robot_axis_num model_sf_robot_axis_num sf_group_equipment_user 1 1 1 1
8 access_maintenance_request maintenance_request model_maintenance_request sf_base.group_plan_dispatch 1 0 0 0
9 access_sf_maintenance_logs sf_maintenance_logs model_sf_maintenance_logs sf_base.group_plan_dispatch 1 0 0 0
10 access_equipment_maintenance_standards equipment_maintenance_standards model_equipment_maintenance_standards sf_base.group_plan_dispatch 1 0 0 0
11
12

View File

@@ -15,6 +15,33 @@ class MrpProduction(models.Model):
schedule_state = fields.Selection([('未排', '未排'), ('已排', '已排')],
string='排程状态', default='未排')
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
@api.depends('request_ids')
def _compute_maintenance_count(self):
for production in self:

View File

@@ -85,3 +85,23 @@ access_mrp_production_split_multi,access.mrp.production.split.multi,mrp.model_mr
access_mrp_production_split,access.mrp.production.split,mrp.model_mrp_production_split,sf_base.group_sf_mrp_user,1,1,1,0
access_mrp_production_split_line,access.mrp.production.split.line,mrp.model_mrp_production_split_line,sf_base.group_sf_mrp_user,1,1,1,0
access_mrp_workcenter_capacity_manager,mrp.workcenter.capacity.manager,mrp.model_mrp_workcenter_capacity,sf_base.group_sf_mrp_user,1,1,1,0
access_mrp_production,mrp_production,model_mrp_production,sf_base.group_plan_dispatch,1,1,1,0
access_mrp_workorder,mrp_workorder,model_mrp_workorder,sf_base.group_plan_dispatch,1,0,0,0
access_sf_production_line,sf.production.line,model_sf_production_line,sf_base.group_plan_dispatch,1,1,1,0
access_mrp_workcenter,mrp_workcenter,model_mrp_workcenter,sf_base.group_plan_dispatch,1,1,1,0
access_mrp_bom,mrp.bom,mrp.model_mrp_bom,sf_base.group_plan_dispatch,1,1,1,0
access_mrp_bom_line,mrp.bom.line,mrp.model_mrp_bom_line,sf_base.group_plan_dispatch,1,0,0,0
access_mrp_unbuild,mrp.unbuild,mrp.model_mrp_unbuild,sf_base.group_plan_dispatch,1,1,1,0
access_stock_scrap,stock.scrap,stock.model_stock_scrap,sf_base.group_plan_dispatch,1,1,1,0
access_sf_model_type,sf.model.type,model_sf_model_type,sf_base.group_plan_dispatch,1,1,1,0
access_mrp_routing_workcenter,mrp.routing.workcenter,mrp.model_mrp_routing_workcenter,sf_base.group_plan_dispatch,1,1,1,0
access_mrp_document,mrp.document,mrp.model_mrp_document,sf_base.group_plan_dispatch,1,0,0,0
access_sf_product_model_type_routing_sort,sf.product.model.type.routing.sort,model_sf_product_model_type_routing_sort,sf_base.group_plan_dispatch,1,0,0,0
access_sf_embryo_model_type_routing_sort,sf.embryo.model.type.routing.sort,model_sf_embryo_model_type_routing_sort,sf_base.group_plan_dispatch,1,0,0,0
access_sf_surface_technics_model_type_routing_sort,sf.surface_technics.model.type.routing.sort,model_sf_surface_technics_model_type_routing_sort,sf_base.group_plan_dispatch,1,0,0,0
access_mrp_workcenter_capacity,mrp.workcenter.capacity,mrp.model_mrp_workcenter_capacity,sf_base.group_plan_dispatch,1,0,0,0
access_mrp_workcenter_productivity,mrp.workcenter.productivity,mrp.model_mrp_workcenter_productivity,sf_base.group_plan_dispatch,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
85 access_mrp_production_split_line access.mrp.production.split.line mrp.model_mrp_production_split_line sf_base.group_sf_mrp_user 1 1 1 0
86 access_mrp_workcenter_capacity_manager mrp.workcenter.capacity.manager mrp.model_mrp_workcenter_capacity sf_base.group_sf_mrp_user 1 1 1 0
87 access_mrp_production mrp_production model_mrp_production sf_base.group_plan_dispatch 1 1 1 0
88 access_mrp_workorder mrp_workorder model_mrp_workorder sf_base.group_plan_dispatch 1 0 0 0
89 access_sf_production_line sf.production.line model_sf_production_line sf_base.group_plan_dispatch 1 1 1 0
90 access_mrp_workcenter mrp_workcenter model_mrp_workcenter sf_base.group_plan_dispatch 1 1 1 0
91 access_mrp_bom mrp.bom mrp.model_mrp_bom sf_base.group_plan_dispatch 1 1 1 0
92 access_mrp_bom_line mrp.bom.line mrp.model_mrp_bom_line sf_base.group_plan_dispatch 1 0 0 0
93 access_mrp_unbuild mrp.unbuild mrp.model_mrp_unbuild sf_base.group_plan_dispatch 1 1 1 0
94 access_stock_scrap stock.scrap stock.model_stock_scrap sf_base.group_plan_dispatch 1 1 1 0
95 access_sf_model_type sf.model.type model_sf_model_type sf_base.group_plan_dispatch 1 1 1 0
96 access_mrp_routing_workcenter mrp.routing.workcenter mrp.model_mrp_routing_workcenter sf_base.group_plan_dispatch 1 1 1 0
97 access_mrp_document mrp.document mrp.model_mrp_document sf_base.group_plan_dispatch 1 0 0 0
98 access_sf_product_model_type_routing_sort sf.product.model.type.routing.sort model_sf_product_model_type_routing_sort sf_base.group_plan_dispatch 1 0 0 0
99 access_sf_embryo_model_type_routing_sort sf.embryo.model.type.routing.sort model_sf_embryo_model_type_routing_sort sf_base.group_plan_dispatch 1 0 0 0
100 access_sf_surface_technics_model_type_routing_sort sf.surface_technics.model.type.routing.sort model_sf_surface_technics_model_type_routing_sort sf_base.group_plan_dispatch 1 0 0 0
101 access_mrp_workcenter_capacity mrp.workcenter.capacity mrp.model_mrp_workcenter_capacity sf_base.group_plan_dispatch 1 0 0 0
102 access_mrp_workcenter_productivity mrp.workcenter.productivity mrp.model_mrp_workcenter_productivity sf_base.group_plan_dispatch 1 0 0 0
103
104
105
106
107

View File

@@ -52,6 +52,24 @@
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_mrp_production_form_view" model="ir.ui.view">
<field name="name">custom.mrp.production.form</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="//form//header//button[@name='action_confirm']" position="after">
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</xpath>
</field>
</record>
<!-- <record id="custom_mrp_production_form_view" model="ir.ui.view"> -->
<!-- <field name="name">custom.mrp.production.form</field> -->
<!-- <field name="model">mrp.production</field> -->

View File

@@ -18,6 +18,7 @@
'security/ir.model.access.csv',
# 'security/rules.xml',
'views/view.xml',
'views/change_manufactuing.xml'
],
'assets': {

View File

@@ -2,3 +2,4 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import custom_plan
from . import change_manufactuing

View File

@@ -0,0 +1,293 @@
# -*- coding: utf-8 -*-
import re
from odoo import api, fields, models, _
class CustomMrpUnBuild(models.Model):
_inherit = 'mrp.unbuild'
_description = "拆解单"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
class CustomStockScrap(models.Model):
_inherit = 'stock.scrap'
_description = "报废单"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
class CustomWorkCenter(models.Model):
_inherit = 'mrp.workcenter'
_description = "工作中心"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
class CustomSfProductionLine(models.Model):
_inherit = 'sf.production.line'
_description = "生产线"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
class CustomSfModelType(models.Model):
_inherit = 'sf.model.type'
_description = "模型类型"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
class CustomMrpRoutingWorkcenter(models.Model):
_inherit = 'mrp.routing.workcenter'
_description = "工序"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
class CustomProductTemplate(models.Model):
_inherit = 'product.template'
_description = "产品模板"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
class CustomMrpBom(models.Model):
_inherit = 'mrp.bom'
_description = "BOM清单"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})
class CustomStockLot(models.Model):
_inherit = 'stock.lot'
_description = "批次序列号"
check_status = fields.Boolean(string='启用状态', default=False, readonly=True)
active = fields.Boolean(string='已归档', default=True)
def action_check(self):
"""
审核启用
"""
self.check_status = True
self.active = True
def action_uncheck(self):
"""
审核禁用
"""
self.check_status = False
self.active = False
def archive(self):
"""
归档
"""
self.write({'active': False})
def unarchive(self):
"""
取消归档
"""
self.write({'active': True})

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- 增加权限相关的按钮 -->
<record id="custom_mrp_unbuild_form_view" model="ir.ui.view">
<field name="name">custom.mrp.unbuild.form</field>
<field name="model">mrp.unbuild</field>
<field name="inherit_id" ref="mrp.mrp_unbuild_form_view"/>
<field name="arch" type="xml">
<xpath expr="//form//header//button[@name='action_validate']" position="after">
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</xpath>
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_stock_scrap_form_view" model="ir.ui.view">
<field name="name">custom.stock.scrap.form</field>
<field name="model">stock.scrap</field>
<field name="inherit_id" ref="stock.stock_scrap_form_view"/>
<field name="arch" type="xml">
<xpath expr="//form//header//button[@name='action_validate']" position="after">
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</xpath>
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_product_template_form_view" model="ir.ui.view">
<field name="name">custom.product.template.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//form//header" position="inside">
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</xpath>
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_mrp_bom_form_view" model="ir.ui.view">
<field name="name">custom.mrp.bom.form</field>
<field name="model">mrp.bom</field>
<field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
<field name="arch" type="xml">
<xpath expr="//form//sheet" position="before">
<header>
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</header>
</xpath>
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_view_production_lot_form" model="ir.ui.view">
<field name="name">custom.view.production.lot.form</field>
<field name="model">stock.lot</field>
<field name="inherit_id" ref="stock.view_production_lot_form"/>
<field name="arch" type="xml">
<xpath expr="//form//sheet" position="before">
<header>
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</header>
</xpath>
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_sf_production_line_form" model="ir.ui.view">
<field name="name">custom.sf.production.line.form</field>
<field name="model">sf.production.line</field>
<field name="inherit_id" ref="sf_manufacturing.sf_production_line_form"/>
<field name="arch" type="xml">
<xpath expr="//form//sheet" position="before">
<header>
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</header>
</xpath>
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_form_sf_model_type" model="ir.ui.view">
<field name="name">custom.form.sf.model.type</field>
<field name="model">sf.model.type</field>
<field name="inherit_id" ref="sf_manufacturing.form_sf_model_type"/>
<field name="arch" type="xml">
<xpath expr="//form//group" position="before">
<header>
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</header>
</xpath>
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_mrp_workcenter_view_form" model="ir.ui.view">
<field name="name">custom.mrp.workcenter.view.form</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_workcenter_view"/>
<field name="arch" type="xml">
<xpath expr="//form//sheet" position="before">
<header>
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</header>
</xpath>
</field>
</record>
<!-- 增加权限相关的按钮 -->
<record id="custom_mrp_routing_workcenter_form_view" model="ir.ui.view">
<field name="name">custom.mrp.routing.workcenter.form.view</field>
<field name="model">mrp.routing.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_routing_workcenter_form_view"/>
<field name="arch" type="xml">
<xpath expr="//form//sheet" position="before">
<header>
<field name="active" invisible="1"/>
<field name="check_status" invisible="1"/>
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
</header>
</xpath>
</field>
</record>
</data>
</odoo>

View File

View File

@@ -16,7 +16,7 @@
'depends': ['quality_control', 'sf_maintenance'],
'data': [
'security/ir.model.access.csv',
'views/view.xml'
# 'views/view.xml'
],
'assets': {

View File

@@ -40,4 +40,7 @@ access_quality_alert_team_group_sf_order_user,quality_alert_team_group_sf_order_
access_quality_alert_team_group_sf_mrp_manager,quality_alert_team_group_sf_mrp_manager,quality.model_quality_alert_team,sf_base.group_sf_mrp_manager,1,0,0,0
access_quality_alert_stage,quality.alert.stage,quality.model_quality_alert_stage,sf_base.group_plan_dispatch,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
40
41
42
43
44
45
46

View File

@@ -10,6 +10,9 @@ access_crm_team_member_director,crm_team_member_director,sales_team.model_crm_te
access_res_users,res_users,base.model_res_users,sf_base.group_sale_director,1,1,1,0
access_sale_order,sale_order,model_sale_order,sf_base.group_plan_dispatch,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
10 access_res_users res_users base.model_res_users sf_base.group_sale_director 1 1 1 0
11 access_sale_order sale_order model_sale_order sf_base.group_plan_dispatch 1 0 0 0
12
13
14
15
16
17
18

View File

@@ -10,7 +10,7 @@
""",
'category': 'sf',
'website': 'https://www.sf.jikimo.com',
'depends': ['stock', 'web', ],
'depends': ['stock', 'web', 'sf_base'],
'data': [
'security/sf_stock_security.xml',
'security/ir.model.access.csv',

View File

@@ -94,3 +94,19 @@ access_stock_picking_label_type_user,picking.label.type.user,stock.model_picking
access_stock_lot_label_layout_user,lot.label.layout.user,stock.model_lot_label_layout,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_replenish_option,stock.replenishment.option,stock.model_stock_replenishment_option,sf_warehouse.group_sf_stock_user,1,1,1,0
access_mrp_production,mrp.production,mrp.model_mrp_production,sf_warehouse.group_sf_stock_user,1,1,1,0
access_sf_shelf_location,sf.shelf.location,model_sf_shelf_location,sf_base.group_plan_dispatch,1,0,0,0
access_stock_move,stock.move,stock.model_stock_move,sf_base.group_plan_dispatch,1,0,0,0
access_stock_scrap_user,stock.scrap.user,stock.model_stock_scrap,sf_base.group_plan_dispatch,1,0,0,0
access_stock_scrap_manager,stock.scrap.manager,stock.model_stock_scrap,sf_base.group_plan_dispatch,1,0,0,0
access_stock_picking,stock.picking,stock.model_stock_picking,sf_base.group_plan_dispatch,1,0,0,0
access_stock_lot,stock.lot,stock.model_stock_lot,sf_base.group_plan_dispatch,1,1,1,0
access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,stock.model_stock_warehouse_orderpoint,sf_base.group_plan_dispatch,1,0,0,0
access_stock_quant,stock.quant,stock.model_stock_quant,sf_base.group_plan_dispatch,1,0,0,0
access_product_product,product.product,product.model_product_product,sf_base.group_plan_dispatch,1,1,1,0
access_product_template,product.template,product.model_product_template,sf_base.group_plan_dispatch,1,1,1,0
access_stock_inventory_conflict,stock.inventory.conflict,stock.model_stock_inventory_conflict,sf_base.group_plan_dispatch,1,0,0,0
access_stock_inventory_warning,stock.inventory.warning,stock.model_stock_inventory_warning,sf_base.group_plan_dispatch,1,0,0,0
access_stock_inventory_adjustment_name,stock.inventory.adjustment.name,stock.model_stock_inventory_adjustment_name,sf_base.group_plan_dispatch,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
94 access_stock_replenish_option stock.replenishment.option stock.model_stock_replenishment_option sf_warehouse.group_sf_stock_user 1 1 1 0
95 access_mrp_production mrp.production mrp.model_mrp_production sf_warehouse.group_sf_stock_user 1 1 1 0
96 access_sf_shelf_location sf.shelf.location model_sf_shelf_location sf_base.group_plan_dispatch 1 0 0 0
97 access_stock_move stock.move stock.model_stock_move sf_base.group_plan_dispatch 1 0 0 0
98 access_stock_scrap_user stock.scrap.user stock.model_stock_scrap sf_base.group_plan_dispatch 1 0 0 0
99 access_stock_scrap_manager stock.scrap.manager stock.model_stock_scrap sf_base.group_plan_dispatch 1 0 0 0
100 access_stock_picking stock.picking stock.model_stock_picking sf_base.group_plan_dispatch 1 0 0 0
101 access_stock_lot stock.lot stock.model_stock_lot sf_base.group_plan_dispatch 1 1 1 0
102 access_stock_warehouse_orderpoint stock.warehouse.orderpoint stock.model_stock_warehouse_orderpoint sf_base.group_plan_dispatch 1 0 0 0
103 access_stock_quant stock.quant stock.model_stock_quant sf_base.group_plan_dispatch 1 0 0 0
104 access_product_product product.product product.model_product_product sf_base.group_plan_dispatch 1 1 1 0
105 access_product_template product.template product.model_product_template sf_base.group_plan_dispatch 1 1 1 0
106 access_stock_inventory_conflict stock.inventory.conflict stock.model_stock_inventory_conflict sf_base.group_plan_dispatch 1 0 0 0
107 access_stock_inventory_warning stock.inventory.warning stock.model_stock_inventory_warning sf_base.group_plan_dispatch 1 0 0 0
108 access_stock_inventory_adjustment_name stock.inventory.adjustment.name stock.model_stock_inventory_adjustment_name sf_base.group_plan_dispatch 1 0 0 0
109
110
111
112