Merge branch 'develop' into feature/sale_order_route_pick
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="group_quality" model="res.groups">
|
||||
<record id="group_quality" model="res.groups">
|
||||
<field name="name">质检岗</field>
|
||||
<field name="category_id" ref="base.module_category_manufacturing_quality"/>
|
||||
</record>
|
||||
@@ -46,6 +46,11 @@
|
||||
<field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>
|
||||
</record>
|
||||
|
||||
<record id="group_production_engineer" model="res.groups">
|
||||
<field name="name">工艺工程师</field>
|
||||
<field name="implied_ids" eval="[(4, ref('group_sf_mrp_user'))]"/>
|
||||
<field name="category_id" ref="base.module_category_manufacturing_manufacturing"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.module.category" id="module_category_plan">
|
||||
<field name="name">计划</field>
|
||||
@@ -65,7 +70,7 @@
|
||||
<record id="group_plan_dispatch" model="res.groups">
|
||||
<field name="name">计划调度岗</field>
|
||||
<field name="category_id" ref="module_category_plan"/>
|
||||
<!-- <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> -->
|
||||
<!-- <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> -->
|
||||
</record>
|
||||
|
||||
<record id="group_plan_director" model="res.groups">
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form//sheet//notebook//page[@name='operations']" position="after">
|
||||
<page string="发货信息" name="tracking">
|
||||
<page string="发货信息" name="tracking" attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}">
|
||||
<group>
|
||||
<group>
|
||||
<field name="senderNickName" attrs="{'invisible': [('check_out', '!=', 'OUT')]}"/>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
'views/production_line_view.xml',
|
||||
'views/mrp_workcenter_views.xml',
|
||||
'views/mrp_workorder_view.xml',
|
||||
'views/stock_picking_view.xml',
|
||||
'views/model_type_view.xml',
|
||||
'views/agv_setting_views.xml',
|
||||
'views/sf_maintenance_equipment.xml',
|
||||
|
||||
@@ -141,11 +141,11 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_coarse_medium_fine = fields.Selection(related='cutting_tool_model_id.integral_coarse_medium_fine', string='粗/中/精')
|
||||
# cutting_tool_model_id.integral_coarse_medium_fine
|
||||
# cutting_tool_run_out_accuracy_max = fields.Float('端跳精度max', digits=(6, 1))
|
||||
cutting_tool_run_out_accuracy_max = fields.Char(related='cutting_tool_model_id.integral_run_out_accuracy_max', string='端跳精度max', digits=(6, 1))
|
||||
cutting_tool_run_out_accuracy_max = fields.Char(related='cutting_tool_model_id.integral_run_out_accuracy_max', string='端跳精度max')
|
||||
# cutting_tool_model_id.integral_run_out_accuracy_max
|
||||
# cutting_tool_run_out_accuracy_min = fields.Float('端跳精度min', digits=(6, 1))
|
||||
cutting_tool_run_out_accuracy_min = fields.Char(related='cutting_tool_model_id.integral_run_out_accuracy_min',
|
||||
string='端跳精度min', digits=(6, 1))
|
||||
string='端跳精度min')
|
||||
# cutting_tool_model_id.integral_run_out_accuracy_min
|
||||
# cutting_tool_blade_tip_working_size = fields.Char('刀尖倒角度(°)', size=20)
|
||||
cutting_tool_blade_tip_working_size = fields.Char(related='specification_id.blade_tip_working_size',
|
||||
|
||||
@@ -548,6 +548,35 @@ class StockPicking(models.Model):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
surface_technics_parameters_id = fields.Many2one('sf.production.process.parameter', string="表面工艺可选参数")
|
||||
person_of_delivery = fields.Char('收货人', compute='_compute_origin', store=True)
|
||||
telephone_of_delivery = fields.Char('电话号码', compute='_compute_origin', store=True)
|
||||
address_of_delivery = fields.Char('联系地址', compute='_compute_origin')
|
||||
|
||||
retrospect_ref = fields.Char('追溯参考', compute='_compute_origin', store=True)
|
||||
|
||||
@api.depends('origin')
|
||||
def _compute_origin(self):
|
||||
"""
|
||||
计算带料入库单对应销售单
|
||||
"""
|
||||
for item in self:
|
||||
if item.picking_type_id.sequence_code == 'DL' and item.origin:
|
||||
if 'WH/IN/' in item.origin:
|
||||
picking_id = self.env['stock.picking'].search([('name', '=', item.origin)])
|
||||
if picking_id and picking_id.origin:
|
||||
purchase_id = self.env['purchase.order'].sudo().search([('name', '=', picking_id.origin)])
|
||||
if purchase_id and purchase_id.origin:
|
||||
sale_id = self.env['sale.order'].sudo().search([('name', '=', purchase_id.origin)])
|
||||
item.person_of_delivery = sale_id.person_of_delivery
|
||||
item.telephone_of_delivery = sale_id.telephone_of_delivery
|
||||
item.address_of_delivery = sale_id.address_of_delivery
|
||||
|
||||
bom = self.env['mrp.bom'].sudo().search([('bom_line_ids.product_id', '=', self.move_ids.product_id.id)])
|
||||
if bom:
|
||||
if item.picking_type_id.sequence_code == 'DL':
|
||||
item.retrospect_ref = bom.product_tmpl_id.default_code
|
||||
elif item.picking_type_id.sequence_code in ['INT', 'PC']:
|
||||
item.retrospect_ref = bom.product_tmpl_id.name
|
||||
|
||||
# 设置外协出入单的名称
|
||||
def _get_name_Res(self, rescode):
|
||||
@@ -741,6 +770,8 @@ class ReStockMove(models.Model):
|
||||
self.next_serial = self.env['stock.lot']._get_next_serial(self.company_id, self.product_id)
|
||||
elif self.product_id.tracking == "lot":
|
||||
self._put_tool_lot(self.company_id, self.product_id, self.origin)
|
||||
if not self.move_line_nosuggest_ids:
|
||||
self._generate_serial_numbers()
|
||||
|
||||
return {
|
||||
'name': _('Detailed Operations'),
|
||||
|
||||
@@ -165,6 +165,10 @@ access_sf_agv_scheduling_group_sf_order_user,sf_agv_scheduling_group_sf_order_us
|
||||
access_sf_agv_scheduling_group_sf_mrp_manager,sf_agv_scheduling_group_sf_mrp_manager,model_sf_agv_scheduling,sf_base.group_sf_mrp_manager,1,1,1,0
|
||||
access_sf_agv_scheduling_group_sf_equipment_user,sf_agv_scheduling_group_sf_equipment_user,model_sf_agv_scheduling,sf_base.group_sf_equipment_user,1,1,1,0
|
||||
|
||||
access_sf_technology_design_group_plan_dispatch,sf_technology_design_group_plan_dispatch,model_sf_technology_design,sf_base.group_plan_dispatch,1,1,1,0
|
||||
access_sf_technology_design_group_sf_mrp_manager,sf_technology_design_group_sf_mrp_manager,model_sf_technology_design,sf_base.group_sf_mrp_manager,1,1,1,0
|
||||
access_sf_technology_design_group_production_engineer,sf_technology_design_group_production_engineer,model_sf_technology_design,sf_base.group_production_engineer,1,1,1,0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -197,7 +197,7 @@
|
||||
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('state','=','done')]}"/> -->
|
||||
<!-- <button name="button_workpiece_delivery" type="object" string="工件配送" class="btn-primary"-->
|
||||
<!-- attrs="{'invisible': ['|','|','|','|',('routing_type','!=','装夹预调'),('is_delivery','=',True),('state','!=','done'),('is_rework','=',True),'&',('rfid_code','in',['',False]),('state','=','done')]}"/>-->
|
||||
<button name="button_rework_pre" type="object" string="返工"
|
||||
<button name="button_rework_pre" type="object" string="异常反馈"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': ['|','|',('routing_type','!=','装夹预调'),('state','!=','progress'),('is_rework','=',True)]}"/>
|
||||
<button name="unbind_tray" type="object" string="解绑托盘"
|
||||
|
||||
@@ -1,22 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="view_stock_move_operations_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">stock.move.operations.form.inherit.sf</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_operations"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_assign_serial_show_details']" position="after">
|
||||
<button name="print_serial_numbers" string="序列号打印" type="object"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<!-- <record id="view_stock_move_operations_inherit_sf" model="ir.ui.view">-->
|
||||
<!-- <field name="name">stock.move.operations.form.inherit.sf</field>-->
|
||||
<!-- <field name="model">stock.move</field>-->
|
||||
<!-- <field name="inherit_id" ref="stock.view_stock_move_operations"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//button[@name='action_assign_serial_show_details']" position="after">-->
|
||||
<!-- <button name="print_serial_numbers" string="序列号打印" type="object"/>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record model="ir.ui.view" id="view_picking_form_inherit_sf">
|
||||
<record model="ir.ui.view" id="view_picking_form_inherit_sf_1">
|
||||
<field name="name">stock.picking.form.inherit.sf</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='user_id']" position="after">
|
||||
<field name="retrospect_ref"/>
|
||||
<field name="person_of_delivery"/>
|
||||
<field name="telephone_of_delivery"/>
|
||||
<field name="address_of_delivery"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_vpicktree_1" model="ir.ui.view">
|
||||
<field name="name">sf.vpicktree.1</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.vpicktree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='origin']" position="after">
|
||||
<field name="retrospect_ref"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_picking_internal_search_sf" model="ir.ui.view">
|
||||
<field name="name">stock.picking.search</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_internal_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='picking_type']" position="after">
|
||||
<filter string="追溯参考" name="retrospect_ref" domain="[]"
|
||||
context="{'group_by': 'retrospect_ref'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
@@ -32,9 +32,9 @@ class ReSaleOrder(models.Model):
|
||||
tracking=3,
|
||||
default='draft')
|
||||
deadline_of_delivery = fields.Date('订单交期', tracking=True)
|
||||
person_of_delivery = fields.Char('交货人')
|
||||
telephone_of_delivery = fields.Char('交货人电话号码')
|
||||
address_of_delivery = fields.Char('交货人地址')
|
||||
person_of_delivery = fields.Char('收货人')
|
||||
telephone_of_delivery = fields.Char('电话号码')
|
||||
address_of_delivery = fields.Char('联系地址')
|
||||
payments_way = fields.Selection([('现结', '现结'), ('月结', '月结')], '结算方式', default='现结', tracking=True)
|
||||
pay_way = fields.Selection([('转账', '转账'), ('微信', '微信'), ('支付宝', '支付宝')], '支付方式')
|
||||
check_status = fields.Selection([('pending', '待审核'), ('approved', '已审核'), ('fail', '不通过')], '审核状态')
|
||||
@@ -206,6 +206,8 @@ class RePurchaseOrder(models.Model):
|
||||
compute='_compute_user_id',
|
||||
store=True)
|
||||
|
||||
purchase_type = fields.Selection([('standard', '标准采购'), ('consignment', '委外加工')], string='采购类型', default='standard')
|
||||
|
||||
@api.depends('partner_id')
|
||||
def _compute_user_id(self):
|
||||
if not self.user_id:
|
||||
|
||||
@@ -158,6 +158,11 @@
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['purchase'])]}
|
||||
</attribute>
|
||||
</field>
|
||||
|
||||
<!-- 添加采购类型字段 -->
|
||||
<field name="partner_ref" position="after">
|
||||
<field name="purchase_type" string="采购类型" readonly="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@
|
||||
</field>
|
||||
<field name="payment_term_id" position="after">
|
||||
<field name="deadline_of_delivery" readonly="0"/>
|
||||
<field name="payments_way" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="pay_way" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="payments_way" invisible="1"/>
|
||||
<field name="pay_way" invisible="1"/>
|
||||
<!-- <field name="schedule_status" readonly="1"/> -->
|
||||
</field>
|
||||
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="before">
|
||||
@@ -179,17 +179,27 @@
|
||||
<attribute name="string">下单日期</attribute>
|
||||
</field>
|
||||
<field name="sale_order_template_id" position="after">
|
||||
<field name="person_of_delivery" string="交货人"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="telephone_of_delivery" string="交货人联系方式"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="address_of_delivery" string="交货人地址"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="remark" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_order_form_inherit_sale_stock_sf">
|
||||
<field name="name">view_order_form_inherit_sale_stock.sf</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale_stock.view_order_form_inherit_sale_stock"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='picking_policy']" position="before">
|
||||
<field name="person_of_delivery" string="收货人"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="telephone_of_delivery" string="电话号码"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="address_of_delivery" string="联系地址"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_quotation_with_onboarding_tree_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">sale.order.quotation.tree.inherit.sf</field>
|
||||
<field name="model">sale.order</field>
|
||||
|
||||
@@ -1119,6 +1119,8 @@ class SfPickingType(models.Model):
|
||||
action = super(SfPickingType, self)._get_action(action_xmlid)
|
||||
if not self.env.user.has_group('base.group_system'):
|
||||
action['context']['create'] = False
|
||||
if self.sequence_code in ['DL', 'INT', 'PC']:
|
||||
action['context']['search_default_retrospect_ref'] = 1
|
||||
return action
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user