库存根据权限增加审核按钮 以及审核状态
This commit is contained in:
@@ -6,8 +6,8 @@ import os
|
|||||||
from odoo import models, fields, api, _
|
from odoo import models, fields, api, _
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
#from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
#from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
|
|
||||||
|
|
||||||
class ResProductMo(models.Model):
|
class ResProductMo(models.Model):
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class MrStaticResourceDataSync(models.Model):
|
|||||||
# logging.info("材料型号已每日同步成功")
|
# logging.info("材料型号已每日同步成功")
|
||||||
# self.env['mrs.international.standards']._cron_mrs_international_standards_func()
|
# self.env['mrs.international.standards']._cron_mrs_international_standards_func()
|
||||||
# logging.info("材料型号材料应用已每日同步成功")
|
# logging.info("材料型号材料应用已每日同步成功")
|
||||||
self.env['material.apply']._cron_material_apply_func()
|
self.env['material.apply'].sync_material_apply()
|
||||||
logging.info("材料型号材料应用已每日同步成功")
|
logging.info("材料型号材料应用已每日同步成功")
|
||||||
self.env['sf.production.process.category'].sync_production_process_category_yesterday()
|
self.env['sf.production.process.category'].sync_production_process_category_yesterday()
|
||||||
logging.info("表面工艺类别已每日同步成功")
|
logging.info("表面工艺类别已每日同步成功")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo import fields, models, api
|
from odoo import fields, models, api
|
||||||
#from quatotion import readSql, feature_recognize, auto_quatotion
|
from quatotion import readSql, feature_recognize, auto_quatotion
|
||||||
|
|
||||||
__author__ = 'jinling.yang'
|
__author__ = 'jinling.yang'
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import os
|
|||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import requests
|
import requests
|
||||||
#from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
#from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo.exceptions import ValidationError, UserError
|
from odoo.exceptions import ValidationError, UserError
|
||||||
|
|||||||
@@ -226,6 +226,14 @@ class ShelfLocation(models.Model):
|
|||||||
name = fields.Char('名称', required=True, size=20)
|
name = fields.Char('名称', required=True, size=20)
|
||||||
barcode = fields.Char('编码', copy=False, size=15)
|
barcode = fields.Char('编码', copy=False, size=15)
|
||||||
|
|
||||||
|
check_state = fields.Selection([
|
||||||
|
('enable', '启用'),
|
||||||
|
('close', '关闭')
|
||||||
|
], string='审核状态', default='close')
|
||||||
|
|
||||||
|
def action_check(self):
|
||||||
|
self.check_state = 'enable'
|
||||||
|
|
||||||
# 仓库类别(selection:库区、库位、货位)
|
# 仓库类别(selection:库区、库位、货位)
|
||||||
location_type = fields.Selection([
|
location_type = fields.Selection([
|
||||||
('货架', '货架'),
|
('货架', '货架'),
|
||||||
@@ -568,3 +576,75 @@ class SfProductCategory(models.Model):
|
|||||||
|
|
||||||
def action_check(self):
|
def action_check(self):
|
||||||
self.check_state = 'enable'
|
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'
|
||||||
|
|
||||||
|
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'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
access_stock_location,stock.location,model_stock_location,base.group_user,1,1,1,0
|
access_sf_shelf_location,sf.shelf.location,model_sf_shelf_location,sf_warehouse.group_sf_stock_user,1,1,1,0
|
||||||
|
|
||||||
access_procurement_group,procurement.group,stock.model_procurement_group,base.group_user,1,1,1,0
|
access_procurement_group,procurement.group,stock.model_procurement_group,base.group_user,1,1,1,0
|
||||||
access_stock_warehouse_manager,stock.warehouse.manager,stock.model_stock_warehouse,sf_warehouse.group_sf_stock_user,1,1,1,0
|
access_stock_warehouse_manager,stock.warehouse.manager,stock.model_stock_warehouse,sf_warehouse.group_sf_stock_user,1,1,1,0
|
||||||
|
|||||||
|
@@ -1,178 +1,194 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<record id="view_shelf_location_tree" model="ir.ui.view">
|
<record id="view_shelf_location_tree" model="ir.ui.view">
|
||||||
<field name="name">Shelf Location tree</field>
|
<field name="name">Shelf Location tree</field>
|
||||||
<field name="model">sf.shelf.location</field>
|
<field name="model">sf.shelf.location</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Shelf Location">
|
<tree string="Shelf Location">
|
||||||
<field name="name" string="名称"/>
|
<field name="name" string="名称"/>
|
||||||
<field name="barcode" string="编码"/>
|
<field name="barcode" string="编码"/>
|
||||||
<field name="location_type"/>
|
<field name="location_type"/>
|
||||||
</tree>
|
<field name="check_state" widget="label_selection"
|
||||||
</field>
|
options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>
|
||||||
</record>
|
<button name="action_check" string="审核" type="object"
|
||||||
|
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||||
|
groups="sf_warehouse.group_sf_stock_manager"
|
||||||
|
class="oe_highlight"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="view_shelf_location_form" model="ir.ui.view">
|
<record id="view_shelf_location_form" model="ir.ui.view">
|
||||||
<field name="name">Shelf Location form</field>
|
<field name="name">Shelf Location form</field>
|
||||||
<field name="model">sf.shelf.location</field>
|
<field name="model">sf.shelf.location</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Shelf Location">
|
<form string="Shelf Location">
|
||||||
<header>
|
<header>
|
||||||
<button string="生成货位" name="create_location" type="object" class="oe_highlight" attrs="{'invisible': [('hide_shelf', '=', False)]}"/>
|
<button string="生成货位" name="create_location" type="object" class="oe_highlight"
|
||||||
</header>
|
attrs="{'invisible': [('hide_shelf', '=', False)]}"/>
|
||||||
<sheet>
|
</header>
|
||||||
<group>
|
<sheet>
|
||||||
<field name="hide_shelf" invisible="1"/>
|
<group>
|
||||||
<field name="hide_location" invisible="1"/>
|
<field name="hide_shelf" invisible="1"/>
|
||||||
<field name="name" string="名称"/>
|
<field name="hide_location" invisible="1"/>
|
||||||
<field name="barcode" string="编码"/>
|
<field name="name" string="名称"/>
|
||||||
<field name="location_type"/>
|
<field name="barcode" string="编码"/>
|
||||||
<field name="shelf_location_id" attrs="{'invisible': [('location_type', '=', '货位')]}"/>
|
<field name="location_type"/>
|
||||||
<field name="location_id" attrs="{'readonly': [('location_type', '=', '货位')], 'invisible': [('location_type', '=', '货架')]}"/>
|
<field name="shelf_location_id" attrs="{'invisible': [('location_type', '=', '货位')]}"/>
|
||||||
<field name="channel" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
<field name="location_id"
|
||||||
<field name="direction" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
attrs="{'readonly': [('location_type', '=', '货位')], 'invisible': [('location_type', '=', '货架')]}"/>
|
||||||
<field name="product_sn_id" attrs="{'invisible': [('hide_location', '=', False)]}"/>
|
<field name="channel"
|
||||||
<!-- <field name="product_type" widget="many2many_tags"/> -->
|
attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||||
<field name="shelf_height" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
<field name="direction"
|
||||||
<field name="shelf_layer" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||||
<field name="layer_capacity" attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
<field name="product_sn_id" attrs="{'invisible': [('hide_location', '=', False)]}"/>
|
||||||
<!-- <field name="product_id" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '占用')]}"/> -->
|
<!-- <field name="product_type" widget="many2many_tags"/> -->
|
||||||
<field name="product_id" attrs="{'invisible': [('hide_location', '=', False)]}"/>
|
<field name="shelf_height"
|
||||||
<!-- <field name="product_type" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '占用')]}" widget="many2many_tags"/> -->
|
attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||||
<field name="location_status" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False)]}"/>
|
<field name="shelf_layer"
|
||||||
</group>
|
attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||||
</sheet>
|
<field name="layer_capacity"
|
||||||
</form>
|
attrs="{'invisible': [('hide_shelf', '=', False)], 'required': [('hide_shelf', '!=', False)]}"/>
|
||||||
</field>
|
<!-- <field name="product_id" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '占用')]}"/> -->
|
||||||
</record>
|
<field name="product_id" attrs="{'invisible': [('hide_location', '=', False)]}"/>
|
||||||
|
<!-- <field name="product_type" attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False), ('location_status', '=', '占用')]}" widget="many2many_tags"/> -->
|
||||||
|
<field name="location_status"
|
||||||
|
attrs="{'invisible': [('hide_location', '=', False)], 'required': [('hide_location', '!=', False)]}"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="shelf_location_kanban_view" model="ir.ui.view">
|
<record id="shelf_location_kanban_view" model="ir.ui.view">
|
||||||
<field name="name">shelf.location.kanban</field>
|
<field name="name">shelf.location.kanban</field>
|
||||||
<field name="model">sf.shelf.location</field>
|
<field name="model">sf.shelf.location</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<kanban class="o_kanban_mobile" js_class="custom_kanban">
|
<kanban class="o_kanban_mobile" js_class="custom_kanban">
|
||||||
<templates>
|
<templates>
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click
|
<div t-attf-class="oe_kanban_card oe_kanban_global_click
|
||||||
#{record.location_status.raw_value == '空闲' ? 'kanban_color_1' : ''}
|
#{record.location_status.raw_value == '空闲' ? 'kanban_color_1' : ''}
|
||||||
#{record.location_status.raw_value == '占用' ? 'kanban_color_2' : ''}
|
#{record.location_status.raw_value == '占用' ? 'kanban_color_2' : ''}
|
||||||
#{record.location_status.raw_value == '禁用' ? 'kanban_color_3' : ''}">
|
#{record.location_status.raw_value == '禁用' ? 'kanban_color_3' : ''}">
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<div class="o_kanban_card_header">
|
<div class="o_kanban_card_header">
|
||||||
<div class="o_kanban_card_header_title">
|
<div class="o_kanban_card_header_title">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 内容 -->
|
||||||
|
<div class="o_kanban_record_bottom">
|
||||||
|
<field name="location_status"/>
|
||||||
|
</div>
|
||||||
|
<div class="o_kanban_record_bottom">
|
||||||
|
<field name="product_sn_id"/>
|
||||||
|
<span>|</span>
|
||||||
|
<field name="product_id"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</t>
|
||||||
<!-- 内容 -->
|
<!-- <t t-name="kanban-box"> -->
|
||||||
<div class="o_kanban_record_bottom">
|
<!-- <div t-attf-class="oe_kanban_card oe_kanban_global_click -->
|
||||||
<field name="location_status"/>
|
<!-- #{record.location_status.raw_value == '空闲' ? 'kanban_color_1' : ''} -->
|
||||||
</div>
|
<!-- #{record.location_status.raw_value == '占用' ? 'kanban_color_2' : ''} -->
|
||||||
<div class="o_kanban_record_bottom">
|
<!-- #{record.location_status.raw_value == '禁用' ? 'kanban_color_3' : ''}"> -->
|
||||||
<field name="product_sn_id"/>
|
<!-- --><!-- 看板内容 -->
|
||||||
<span> | </span>
|
<!-- </div> -->
|
||||||
<field name="product_id"/>
|
<!-- <div t-attf-class="oe_kanban_card"> -->
|
||||||
</div>
|
<!-- --><!-- 标题 -->
|
||||||
</div>
|
<!-- <div class="o_kanban_card_header"> -->
|
||||||
</t>
|
<!-- <div class="o_kanban_card_header_title"> -->
|
||||||
<!-- <t t-name="kanban-box"> -->
|
<!-- <field name="name"/> -->
|
||||||
<!-- <div t-attf-class="oe_kanban_card oe_kanban_global_click -->
|
<!-- </div> -->
|
||||||
<!-- #{record.location_status.raw_value == '空闲' ? 'kanban_color_1' : ''} -->
|
<!-- </div> -->
|
||||||
<!-- #{record.location_status.raw_value == '占用' ? 'kanban_color_2' : ''} -->
|
<!-- --><!-- 内容 -->
|
||||||
<!-- #{record.location_status.raw_value == '禁用' ? 'kanban_color_3' : ''}"> -->
|
<!-- <div class="o_kanban_record_bottom"> -->
|
||||||
<!-- --><!-- 看板内容 -->
|
<!-- <field name="location_status"/> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<!-- <div t-attf-class="oe_kanban_card"> -->
|
<!-- <div class="o_kanban_record_bottom"> -->
|
||||||
<!-- --><!-- 标题 -->
|
<!-- <field name="product_sn_id"/> -->
|
||||||
<!-- <div class="o_kanban_card_header"> -->
|
<!-- <span> | </span> -->
|
||||||
<!-- <div class="o_kanban_card_header_title"> -->
|
<!-- <field name="product_id"/> -->
|
||||||
<!-- <field name="name"/> -->
|
<!-- </div> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<!-- </div> -->
|
<!-- </t> -->
|
||||||
<!-- --><!-- 内容 -->
|
</templates>
|
||||||
<!-- <div class="o_kanban_record_bottom"> -->
|
</kanban>
|
||||||
<!-- <field name="location_status"/> -->
|
</field>
|
||||||
<!-- </div> -->
|
</record>
|
||||||
<!-- <div class="o_kanban_record_bottom"> -->
|
|
||||||
<!-- <field name="product_sn_id"/> -->
|
|
||||||
<!-- <span> | </span> -->
|
|
||||||
<!-- <field name="product_id"/> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- </t> -->
|
|
||||||
</templates>
|
|
||||||
</kanban>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- 搜索视图 -->
|
<!-- 搜索视图 -->
|
||||||
<record id="shelf_location_search_view" model="ir.ui.view">
|
<record id="shelf_location_search_view" model="ir.ui.view">
|
||||||
<field name="name">shelf.location.search</field>
|
<field name="name">shelf.location.search</field>
|
||||||
<field name="model">sf.shelf.location</field>
|
<field name="model">sf.shelf.location</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="货架货位">
|
<search string="货架货位">
|
||||||
<searchpanel class="account_root">
|
<searchpanel class="account_root">
|
||||||
<!-- <field name="location_type" icon="fa-filter"/> -->
|
<!-- <field name="location_type" icon="fa-filter"/> -->
|
||||||
<field name="location_id" select="multi" icon="fa-filter"/>
|
<field name="location_id" select="multi" icon="fa-filter"/>
|
||||||
<!-- <field name="location_status" icon="fa-filter"/> -->
|
<!-- <field name="location_status" icon="fa-filter"/> -->
|
||||||
</searchpanel>
|
</searchpanel>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="shelf_location_kanban_action_id" model="ir.actions.act_window">
|
<record id="shelf_location_kanban_action_id" model="ir.actions.act_window">
|
||||||
<field name="name">货架货位</field>
|
<field name="name">货架货位</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sf.shelf.location</field>
|
<field name="res_model">sf.shelf.location</field>
|
||||||
<field name="view_mode">kanban,form</field>
|
<field name="view_mode">kanban,form</field>
|
||||||
<field name="domain">[('location_type', '=', '货位')]</field>
|
<field name="domain">[('location_type', '=', '货位'),('check_state','=','enable')]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- <record id="example_action" model="ir.actions.act_window"> -->
|
<!-- <record id="example_action" model="ir.actions.act_window"> -->
|
||||||
<!-- <field name="name">Example</field> -->
|
<!-- <field name="name">Example</field> -->
|
||||||
<!-- <field name="type">ir.actions.act_window</field> -->
|
<!-- <field name="type">ir.actions.act_window</field> -->
|
||||||
<!-- <field name="res_model">stock.location</field> -->
|
<!-- <field name="res_model">stock.location</field> -->
|
||||||
<!-- <field name="view_mode">kanban</field> -->
|
<!-- <field name="view_mode">kanban</field> -->
|
||||||
<!-- <field name="searchpanel">true</field> -->
|
<!-- <field name="searchpanel">true</field> -->
|
||||||
<!-- <field name="searchpanel_field_label">货架</field> -->
|
<!-- <field name="searchpanel_field_label">货架</field> -->
|
||||||
<!-- <field name="searchpanel_field_name">parent_id</field> -->
|
<!-- <field name="searchpanel_field_name">parent_id</field> -->
|
||||||
<!-- <field name="searchpanel_field_group_by">['parent_id']</field> -->
|
<!-- <field name="searchpanel_field_group_by">['parent_id']</field> -->
|
||||||
<!-- <field name="domain">[('location_type', '=', '货位')]</field> -->
|
<!-- <field name="domain">[('location_type', '=', '货位')]</field> -->
|
||||||
<!-- </record> -->
|
<!-- </record> -->
|
||||||
|
|
||||||
|
|
||||||
<menuitem id="shelf_location_kanban_menu" name="货位看板" parent="stock.menu_stock_root"
|
<menuitem id="shelf_location_kanban_menu" name="货位看板" parent="stock.menu_stock_root"
|
||||||
sequence="51"
|
sequence="51"
|
||||||
action="shelf_location_kanban_action_id"/>
|
action="shelf_location_kanban_action_id"
|
||||||
|
groups="sf_warehouse.group_sf_stock_user"/>
|
||||||
|
|
||||||
<record id="action_sf_shelf_location" model="ir.actions.act_window">
|
<record id="action_sf_shelf_location" model="ir.actions.act_window">
|
||||||
<field name="name">货架货位</field>
|
<field name="name">货架货位</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sf.shelf.location</field>
|
<field name="res_model">sf.shelf.location</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- <record id="example_action" model="ir.actions.act_window"> -->
|
<!-- <record id="example_action" model="ir.actions.act_window"> -->
|
||||||
<!-- <field name="name">Example</field> -->
|
<!-- <field name="name">Example</field> -->
|
||||||
<!-- <field name="type">ir.actions.act_window</field> -->
|
<!-- <field name="type">ir.actions.act_window</field> -->
|
||||||
<!-- <field name="res_model">stock.location</field> -->
|
<!-- <field name="res_model">stock.location</field> -->
|
||||||
<!-- <field name="view_mode">kanban</field> -->
|
<!-- <field name="view_mode">kanban</field> -->
|
||||||
<!-- <field name="searchpanel">true</field> -->
|
<!-- <field name="searchpanel">true</field> -->
|
||||||
<!-- <field name="searchpanel_field_label">货架</field> -->
|
<!-- <field name="searchpanel_field_label">货架</field> -->
|
||||||
<!-- <field name="searchpanel_field_name">parent_id</field> -->
|
<!-- <field name="searchpanel_field_name">parent_id</field> -->
|
||||||
<!-- <field name="searchpanel_field_group_by">['parent_id']</field> -->
|
<!-- <field name="searchpanel_field_group_by">['parent_id']</field> -->
|
||||||
<!-- <field name="domain">[('location_type', '=', '货位')]</field> -->
|
<!-- <field name="domain">[('location_type', '=', '货位')]</field> -->
|
||||||
<!-- </record> -->
|
<!-- </record> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- <menuitem id="menu_stock_location" name="货位状态" parent="stock.menu_stock_root" -->
|
<!-- <menuitem id="menu_stock_location" name="货位状态" parent="stock.menu_stock_root" -->
|
||||||
<!-- sequence="50" -->
|
<!-- sequence="50" -->
|
||||||
<!-- action="kanban_action_id"/> -->
|
<!-- action="kanban_action_id"/> -->
|
||||||
|
|
||||||
<menuitem id="menu_sf_shelf_location" name="货架货位" parent="stock.menu_warehouse_config"
|
<menuitem id="menu_sf_shelf_location" name="货架货位" parent="stock.menu_warehouse_config"
|
||||||
sequence="2"
|
sequence="2"
|
||||||
action="action_sf_shelf_location"/>
|
action="action_sf_shelf_location"
|
||||||
|
groups="sf_warehouse.group_sf_stock_user"/>
|
||||||
|
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,16 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<!-- <record id="view_location_tree2_sf_inherit" model="ir.ui.view"> -->
|
|
||||||
<!-- <field name="name">stock.location.tree.sf.inherit</field> -->
|
|
||||||
<!-- <field name="model">stock.location</field> -->
|
|
||||||
<!-- <field name="inherit_id" ref="stock.view_location_tree2"/> -->
|
|
||||||
<!-- <field name="arch" type="xml"> -->
|
|
||||||
<!-- <xpath expr="//tree/field[@name='complete_name']" position="before"> -->
|
|
||||||
<!-- <field name="barcode"/> -->
|
|
||||||
<!-- </xpath> -->
|
|
||||||
<!-- </field> -->
|
|
||||||
<!-- </record> -->
|
|
||||||
|
|
||||||
<record id="view_location_form_sf_inherit" model="ir.ui.view">
|
<record id="view_location_form_sf_inherit" model="ir.ui.view">
|
||||||
<field name="name">stock.location.form.sf.inherit</field>
|
<field name="name">stock.location.form.sf.inherit</field>
|
||||||
@@ -184,6 +175,18 @@
|
|||||||
<!-- sequence="50" -->
|
<!-- sequence="50" -->
|
||||||
<!-- action="kanban_action_id"/> -->
|
<!-- action="kanban_action_id"/> -->
|
||||||
|
|
||||||
|
<record id="view_location_tree2_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.location.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.location</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_location_tree2"/>
|
||||||
|
<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_warehouse_form_sf_inherit" model="ir.ui.view">
|
<record id="view_warehouse_form_sf_inherit" model="ir.ui.view">
|
||||||
<field name="name">stock.warehouse.form.sf.inherit</field>
|
<field name="name">stock.warehouse.form.sf.inherit</field>
|
||||||
@@ -203,6 +206,18 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_warehouse_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.warehouse.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.warehouse</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_warehouse_tree"/>
|
||||||
|
<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_route_form_sf_inherit" model="ir.ui.view">
|
<record id="view_route_form_sf_inherit" model="ir.ui.view">
|
||||||
@@ -223,6 +238,18 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_route_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.route.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.route</field>
|
||||||
|
<field name="inherit_id" ref="stock.stock_location_route_tree"/>
|
||||||
|
<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_rule_form_sf_inherit" model="ir.ui.view">
|
<record id="view_rule_form_sf_inherit" model="ir.ui.view">
|
||||||
<field name="name">stock.rule.form.sf.inherit</field>
|
<field name="name">stock.rule.form.sf.inherit</field>
|
||||||
@@ -242,6 +269,18 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_rule_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.rule.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.rule</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_stock_rule_tree"/>
|
||||||
|
<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_picking_type_form_sf_inherit" model="ir.ui.view">
|
<record id="view_picking_type_form_sf_inherit" model="ir.ui.view">
|
||||||
<field name="name">stock.picking.type.form.sf.inherit</field>
|
<field name="name">stock.picking.type.form.sf.inherit</field>
|
||||||
@@ -261,8 +300,20 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_picking_type_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.picking.type.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.picking.type</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_picking_type_tree"/>
|
||||||
|
<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_product_category_form_sf_inherit" model="ir.ui.view">
|
<record id="view_product_category_form_sf_inherit" model="ir.ui.view">
|
||||||
<field name="name">product.category.form.sf.inherit</field>
|
<field name="name">product.category.form.sf.inherit</field>
|
||||||
<field name="model">product.category</field>
|
<field name="model">product.category</field>
|
||||||
@@ -280,5 +331,168 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</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">
|
||||||
|
<field name="name">barcode.nomenclature.form.sf.inherit</field>
|
||||||
|
<field name="model">barcode.nomenclature</field>
|
||||||
|
<field name="inherit_id" ref="barcodes.view_barcode_nomenclature_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>
|
||||||
|
|
||||||
|
<record id="view_barcode_nomenclature_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">barcode.nomenclature.tree.sf.inherit</field>
|
||||||
|
<field name="model">barcode.nomenclature</field>
|
||||||
|
<field name="inherit_id" ref="barcodes.view_barcode_nomenclature_tree"/>
|
||||||
|
<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_putaway_rule_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.putaway.rule.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.putaway.rule</field>
|
||||||
|
<field name="inherit_id" ref="stock.stock_putaway_list"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[last()]" position="after">
|
||||||
|
<field name="check_state" widget="label_selection"
|
||||||
|
options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>
|
||||||
|
<button name="action_check" string="审核" type="object"
|
||||||
|
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||||
|
groups="sf_warehouse.group_sf_stock_manager"
|
||||||
|
class="oe_highlight"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<!--重订货规则根据权限增加审核按钮-->
|
||||||
|
<record id="view_warehouse_orderpoint_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.warehouse.orderpoint.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.warehouse.orderpoint</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[last()]" position="after">
|
||||||
|
<field name="check_state" widget="label_selection"
|
||||||
|
options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>
|
||||||
|
<button name="action_check" string="审核" type="object"
|
||||||
|
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||||
|
groups="sf_warehouse.group_sf_stock_manager"
|
||||||
|
class="oe_highlight"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--库存调整根据权限增加审核按钮-->
|
||||||
|
<record id="view_quant_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.quant.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.quant</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_stock_quant_tree_inventory_editable"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[last()]" position="after">
|
||||||
|
<field name="check_state" widget="label_selection"
|
||||||
|
options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>
|
||||||
|
<button name="action_check" string="审核" type="object"
|
||||||
|
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||||
|
groups="sf_warehouse.group_sf_stock_manager"
|
||||||
|
class="oe_highlight"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<!--报废单根据权限增加审核按钮-->
|
||||||
|
<record id="view_stock_scrap_form_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.scrap.form.sf.inherit</field>
|
||||||
|
<field name="model">stock.scrap</field>
|
||||||
|
<field name="inherit_id" ref="stock.stock_scrap_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_stock_scrap_tree_sf_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.scrap.tree.sf.inherit</field>
|
||||||
|
<field name="model">stock.scrap</field>
|
||||||
|
<field name="inherit_id" ref="stock.stock_scrap_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>
|
||||||
|
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
Reference in New Issue
Block a user