Merge branch 'feature/wechat_message' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/销售和排程添加消息推送
This commit is contained in:
@@ -3,6 +3,7 @@ from odoo import models, fields, api
|
|||||||
|
|
||||||
class SaleOrder(models.Model):
|
class SaleOrder(models.Model):
|
||||||
_name = "sale.order"
|
_name = "sale.order"
|
||||||
|
_description = "销售订单"
|
||||||
_inherit = ["sale.order", "jikimo.message.dispatch"]
|
_inherit = ["sale.order", "jikimo.message.dispatch"]
|
||||||
|
|
||||||
def create(self, vals_list):
|
def create(self, vals_list):
|
||||||
|
|||||||
BIN
jikimo_system_order/static/description/系统工单.png
Normal file
BIN
jikimo_system_order/static/description/系统工单.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 533 B |
@@ -234,7 +234,7 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<menuitem name="系统工单" id="work_order_1_list" web_icon="jikimo_system_order,static/description/icon.png"/>
|
<menuitem name="系统工单" id="work_order_1_list" web_icon="jikimo_system_order,static/description/系统工单.png"/>
|
||||||
<menuitem name="工单" id="work_order" parent="work_order_1_list" action="system_order"/>
|
<menuitem name="工单" id="work_order" parent="work_order_1_list" action="system_order"/>
|
||||||
<menuitem name="工单模板" id="work_order_template" parent="work_order_1_list" action="work_template" groups="jikimo_system_order.group_operations_permissions_rwc"/>
|
<menuitem name="工单模板" id="work_order_template" parent="work_order_1_list" action="work_template" groups="jikimo_system_order.group_operations_permissions_rwc"/>
|
||||||
<menuitem name="工单分类" id="work_order_type" parent="work_order_1_list" action="classify" groups="jikimo_system_order.group_operations_permissions_rwc"/>
|
<menuitem name="工单分类" id="work_order_type" parent="work_order_1_list" action="classify" groups="jikimo_system_order.group_operations_permissions_rwc"/>
|
||||||
|
|||||||
BIN
quality_control/static/description/质量.png
Normal file
BIN
quality_control/static/description/质量.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 702 B |
@@ -1024,7 +1024,7 @@
|
|||||||
<menuitem
|
<menuitem
|
||||||
id="menu_quality_root"
|
id="menu_quality_root"
|
||||||
name="Quality"
|
name="Quality"
|
||||||
web_icon="quality_control,static/description/icon.svg"
|
web_icon="quality_control,static/description/质量.png"
|
||||||
sequence="150"
|
sequence="150"
|
||||||
groups="quality.group_quality_user"/>
|
groups="quality.group_quality_user"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
pystrich
|
pystrich
|
||||||
cpca
|
cpca
|
||||||
|
pycryptodome==3.20
|
||||||
|
|||||||
@@ -242,3 +242,8 @@ access_sf_fixture_materials_basic_parameters_group_sf_stock_manager,sf_fixture_m
|
|||||||
access_sf_multi_mounting_type_group_sf_stock_manager,sf_multi_mounting_type_group_sf_stock_manager,model_sf_multi_mounting_type,sf_base.group_sf_stock_manager,1,0,0,0
|
access_sf_multi_mounting_type_group_sf_stock_manager,sf_multi_mounting_type_group_sf_stock_manager,model_sf_multi_mounting_type,sf_base.group_sf_stock_manager,1,0,0,0
|
||||||
access_sf_machine_brand_group_sf_stock_manager,sf_machine_brand_group_sf_stock_manager,model_sf_machine_brand,sf_base.group_sf_stock_manager,1,0,0,0
|
access_sf_machine_brand_group_sf_stock_manager,sf_machine_brand_group_sf_stock_manager,model_sf_machine_brand,sf_base.group_sf_stock_manager,1,0,0,0
|
||||||
access_sf_cutting_tool_type_group_sf_stock_manager,sf_cutting_tool_type_group_sf_stock_manager,model_sf_cutting_tool_type,sf_base.group_sf_stock_manager,1,0,0,0
|
access_sf_cutting_tool_type_group_sf_stock_manager,sf_cutting_tool_type_group_sf_stock_manager,model_sf_cutting_tool_type,sf_base.group_sf_stock_manager,1,0,0,0
|
||||||
|
|
||||||
|
|
||||||
|
access_sf_cutting_tool_material_group_plan_dispatch,sf_cutting_tool_material_group_plan_dispatch,model_sf_cutting_tool_material,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
|
access_sf_functional_cutting_tool_model_group_plan_dispatch,sf_functional_cutting_tool_model_group_plan_dispatch,model_sf_functional_cutting_tool_model,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
|
access_sf_cutting_tool_type_group_plan_dispatch,sf_cutting_tool_type_group_plan_dispatch,model_sf_cutting_tool_type,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
|
|||||||
|
BIN
sf_maintenance/static/description/维护.png
Normal file
BIN
sf_maintenance/static/description/维护.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 858 B |
@@ -1230,5 +1230,9 @@
|
|||||||
action="hr_equipment_action1"
|
action="hr_equipment_action1"
|
||||||
sequence="0"/>
|
sequence="0"/>
|
||||||
|
|
||||||
|
<menuitem
|
||||||
|
id="maintenance.menu_maintenance_title"
|
||||||
|
web_icon="sf_maintenance,static/description/维护.png"/>
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -184,7 +184,8 @@ class WorkpieceDeliveryWizard(models.TransientModel):
|
|||||||
if not barcode.isdigit():
|
if not barcode.isdigit():
|
||||||
# 判断是否是AGV接驳站名称
|
# 判断是否是AGV接驳站名称
|
||||||
agv_site = self.env['sf.agv.site'].search([('name', '=', barcode)])
|
agv_site = self.env['sf.agv.site'].search([('name', '=', barcode)])
|
||||||
self.feeder_station_start_id = agv_site.id # 修正:移除 .id
|
if agv_site:
|
||||||
|
self.feeder_station_start_id = agv_site.id # 修正:移除 .id
|
||||||
return
|
return
|
||||||
|
|
||||||
if delivery_type == '上产线':
|
if delivery_type == '上产线':
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
token = fields.Char(string='TOKEN', default='b811ac06-3f00-11ed-9aed-0242ac110003')
|
token = fields.Char(string='TOKEN', default='b811ac06-3f00-11ed-9aed-0242ac110003')
|
||||||
sf_secret_key = fields.Char(string='密钥', default='wBmxej38OkErKhD6')
|
sf_secret_key = fields.Char(string='密钥', default='wBmxej38OkErKhD6')
|
||||||
sf_url = fields.Char(string='访问地址', default='https://sf.cs.jikimo.com')
|
sf_url = fields.Char(string='访问地址', default='https://sf.cs.jikimo.com')
|
||||||
|
|
||||||
center_control_url = fields.Char(string='中控访问地址',
|
center_control_url = fields.Char(string='中控访问地址',
|
||||||
default='http://172.16.21.50:8001')
|
default='http://172.16.21.50:8001')
|
||||||
center_control_Authorization = fields.Char(string='中控访问认证')
|
center_control_Authorization = fields.Char(string='中控访问认证')
|
||||||
|
|
||||||
|
task_type_no = fields.Char('任务单类型编号')
|
||||||
model_parser_url = fields.Char('特征识别路径')
|
model_parser_url = fields.Char('特征识别路径')
|
||||||
ftp_host = fields.Char(string='FTP的ip')
|
ftp_host = fields.Char(string='FTP的ip')
|
||||||
ftp_port = fields.Char(string='FTP端口')
|
ftp_port = fields.Char(string='FTP端口')
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<field name="name">jikimo.bom.form</field>
|
<field name="name">jikimo.bom.form</field>
|
||||||
<field name="model">jikimo.bom</field>
|
<field name="model">jikimo.bom</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<form create="False">
|
||||||
<header>
|
<header>
|
||||||
<button type="action" name="%(action_jikimo_bom_wizard)d"
|
<button type="action" name="%(action_jikimo_bom_wizard)d"
|
||||||
class="btn btn-info" string="组装方式.." context="{'default_bom_id':id}"
|
class="btn btn-info" string="组装方式.." context="{'default_bom_id':id}"
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<notebook colspan="4">
|
<notebook colspan="4">
|
||||||
<page string="物料清单">
|
<page string="物料清单">
|
||||||
<field name="product_ids" context="{'jikimo_bom_product': True}">
|
<field name="product_ids" context="{'jikimo_bom_product': True}">
|
||||||
<tree>
|
<tree create="False">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<!-- <field name="categ_id"/>-->
|
<!-- <field name="categ_id"/>-->
|
||||||
<field name="cutting_tool_material_id"/>
|
<field name="cutting_tool_material_id"/>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='extension']" position="after">
|
<xpath expr="//field[@name='extension']" position="after">
|
||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="knife_handle_model" enable_counters="1"/>
|
<field name="functional_cutting_tool_model_id" enable_counters="1"/>
|
||||||
<!-- <field name="job_id" enable_counters="1"/>-->
|
<!-- <field name="job_id" enable_counters="1"/>-->
|
||||||
<!-- <field name="department_id" enable_counters="1"/>-->
|
<!-- <field name="department_id" enable_counters="1"/>-->
|
||||||
<!-- <field name="company_id" enable_counters="1"/>-->
|
<!-- <field name="company_id" enable_counters="1"/>-->
|
||||||
|
|||||||
@@ -17,6 +17,22 @@ class JikimoBomWizard(models.TransientModel):
|
|||||||
], string='组装方式', required=True)
|
], string='组装方式', required=True)
|
||||||
is_ok = fields.Boolean('确认上述信息正确无误。')
|
is_ok = fields.Boolean('确认上述信息正确无误。')
|
||||||
|
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def default_get(self, fields):
|
||||||
|
res = super(JikimoBomWizard, self).default_get(fields)
|
||||||
|
# 根据某个字段的值设置默认选项
|
||||||
|
if 'default_bom_id' in self.env.context:
|
||||||
|
jikimo_bom = self.env['jikimo.bom'].browse(self.env.context['default_bom_id'])
|
||||||
|
if not jikimo_bom:
|
||||||
|
return res
|
||||||
|
|
||||||
|
if jikimo_bom.options:
|
||||||
|
res['assembly_options'] = jikimo_bom.options
|
||||||
|
# some_field_value = self.env.context.get('some_field')
|
||||||
|
# if some_field_value == 'condition_value':
|
||||||
|
# res['default_option'] = 'option2' # 设置为特定选项
|
||||||
|
return res
|
||||||
def submit(self):
|
def submit(self):
|
||||||
if not self.bom_id:
|
if not self.bom_id:
|
||||||
raise UserError('缺少bom信息')
|
raise UserError('缺少bom信息')
|
||||||
|
|||||||
@@ -931,13 +931,6 @@ class SfStockMoveLine(models.Model):
|
|||||||
if not record.destination_location_id.product_id:
|
if not record.destination_location_id.product_id:
|
||||||
record.destination_location_id.product_id = record.product_id.id
|
record.destination_location_id.product_id = record.product_id.id
|
||||||
|
|
||||||
@api.model_create_multi
|
|
||||||
def create(self, vals_list):
|
|
||||||
|
|
||||||
records = super(SfStockMoveLine, self).create(vals_list)
|
|
||||||
self.put_shelf_location(records)
|
|
||||||
return records
|
|
||||||
|
|
||||||
|
|
||||||
class SfStockPicking(models.Model):
|
class SfStockPicking(models.Model):
|
||||||
_inherit = 'stock.picking'
|
_inherit = 'stock.picking'
|
||||||
@@ -1122,6 +1115,12 @@ class SfPickingType(models.Model):
|
|||||||
'sf_warehouse.group_sf_stock_manager'
|
'sf_warehouse.group_sf_stock_manager'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def _get_action(self, action_xmlid):
|
||||||
|
action = super(SfPickingType, self)._get_action(action_xmlid)
|
||||||
|
if not self.env.user.has_group('base.group_system'):
|
||||||
|
action['context']['create'] = False
|
||||||
|
return action
|
||||||
|
|
||||||
|
|
||||||
class CustomStockMove(models.Model):
|
class CustomStockMove(models.Model):
|
||||||
_name = 'stock.move'
|
_name = 'stock.move'
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<record model="ir.actions.act_window" id="stock.stock_picking_type_action">
|
<record model="ir.actions.act_window" id="stock.stock_picking_type_action">
|
||||||
<field name="context">{'search_default_groupby_code':1}</field>
|
<field name="context">{'search_default_groupby_code':1}</field>
|
||||||
|
<field name="domain">[('name', '!=', '制造')]</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="view_location_form_sf_inherit" model="ir.ui.view">
|
<record id="view_location_form_sf_inherit" model="ir.ui.view">
|
||||||
|
|||||||
@@ -77,18 +77,20 @@ class ShelfLocationWizard(models.TransientModel):
|
|||||||
|
|
||||||
def confirm_the_change(self):
|
def confirm_the_change(self):
|
||||||
if self.destination_barcode_id:
|
if self.destination_barcode_id:
|
||||||
|
stocks = []
|
||||||
if self.lot_id:
|
if self.lot_id:
|
||||||
self.current_barcode_id.product_sn_id = False
|
self.current_barcode_id.product_sn_id = False
|
||||||
self.destination_barcode_id.product_sn_id = self.lot_id.id
|
self.destination_barcode_id.product_sn_id = self.lot_id.id
|
||||||
self.create_stock_moves(self.lot_id, 1)
|
stocks = self.create_stock_moves(self.lot_id, 1)
|
||||||
elif self.current_product_sn_ids:
|
elif self.current_product_sn_ids:
|
||||||
for current_product_sn_id in self.current_product_sn_ids:
|
for current_product_sn_id in self.current_product_sn_ids:
|
||||||
self.create_stock_moves(current_product_sn_id.lot_id, current_product_sn_id.qty_num)
|
stocks = self.create_stock_moves(current_product_sn_id.lot_id, current_product_sn_id.qty_num)
|
||||||
current_product_sn_id.write({
|
current_product_sn_id.write({
|
||||||
'qty_num': 0
|
'qty_num': 0
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
raise ValidationError('没有需要变更的批次/序列号!')
|
raise ValidationError('没有需要变更的批次/序列号!')
|
||||||
|
self.env['stock.move.line'].sudo().put_shelf_location(stocks[-1])
|
||||||
else:
|
else:
|
||||||
raise ValidationError('请选择目标货位编码!')
|
raise ValidationError('请选择目标货位编码!')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user