制造订单页面新增生产线和计划开始加工时间字段
This commit is contained in:
@@ -324,32 +324,22 @@ class sf_production_plan(models.Model):
|
||||
raise UserError(e)
|
||||
|
||||
|
||||
# # sf生产排程
|
||||
# class sf_produce_plan(models.Model):
|
||||
# _name = 'sf.produce.plan'
|
||||
# _description = 'sf生产排程'
|
||||
class ReMrpProduction(models.Model):
|
||||
_inherit = 'mrp.production'
|
||||
|
||||
# # 重写create方法,使得创建坯料预制排程时,如果给出了计划结束时间,则计划开始时间为计划结束时间减去坯料预制时间
|
||||
# @api.model
|
||||
# def create(self, vals):
|
||||
# # 评估结束时间
|
||||
# vals['plan_end_time'] = self._get_plan_end_time(vals['plan_start_time'], vals['quantity'])
|
||||
# return super(sf_pl_plan, self).create(vals)
|
||||
production_line_id = fields.Many2one('sf.production.line', string='生产线', compute='_compute_production_line_id',
|
||||
store=True)
|
||||
plan_start_processing_time = fields.Datetime('计划开始加工时间')
|
||||
|
||||
@api.depends('name')
|
||||
def _compute_production_line_id(self):
|
||||
for production in self:
|
||||
if production.name:
|
||||
plan_production = self.env['sf.production.plan'].search([('production_id', '=', production.id)])
|
||||
if plan_production:
|
||||
production.production_line_id = plan_production.production_line_id
|
||||
production.plan_start_processing_time = plan_production.date_planned_start
|
||||
|
||||
# # 当不设置计划结束时间时,增加计算计划结束时间的方法
|
||||
# @api.onchange('plan_start_time', 'quantity')
|
||||
# def _onchange_plan_start_time(self):
|
||||
# if self.plan_start_time and self.quantity:
|
||||
# self.plan_end_time = self._get_plan_end_time(self.plan_start_time, self.quantity)
|
||||
#
|
||||
# # 计算计划结束时间
|
||||
# def _get_plan_end_time(self, plan_start_time, quantity):
|
||||
# # 坯料预制时间
|
||||
# pl_time = 0.5
|
||||
# # 计划结束时间 = 计划开始时间 + 坯料预制时间
|
||||
# plan_end_time = plan_start_time + pl_time
|
||||
# return plan_end_time
|
||||
#
|
||||
|
||||
# 机台作业计划
|
||||
class machine_work_schedule(models.Model):
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
<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"/> -->
|
||||
<!-- <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>
|
||||
@@ -27,32 +28,33 @@
|
||||
<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"/> -->
|
||||
<!-- <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_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>
|
||||
@@ -62,10 +64,12 @@
|
||||
<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"/> -->
|
||||
<!-- <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>
|
||||
@@ -81,10 +85,12 @@
|
||||
<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"/> -->
|
||||
<!-- <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>
|
||||
@@ -100,10 +106,12 @@
|
||||
<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"/> -->
|
||||
<!-- <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>
|
||||
@@ -119,10 +127,12 @@
|
||||
<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"/> -->
|
||||
<!-- <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>
|
||||
@@ -138,10 +148,12 @@
|
||||
<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"/> -->
|
||||
<!-- <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>
|
||||
@@ -157,10 +169,12 @@
|
||||
<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"/> -->
|
||||
<!-- <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>
|
||||
|
||||
@@ -5,13 +5,16 @@
|
||||
<field name="name">sf.production.plan.tree</field>
|
||||
<field name="model">sf.production.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<!-- <tree string="订单计划" editable="bottom"> -->
|
||||
<!-- <tree string="订单计划" editable="bottom"> -->
|
||||
<tree string="订单计划">
|
||||
<header>
|
||||
<!-- <button name="do_production_schedule" type="object" string="批量排程"/> -->
|
||||
<button string="批量排程" name="%(sf_plan.action_plan_some)d" type="action" class="btn-primary"/>
|
||||
<!-- <button name="do_production_schedule" type="object" string="批量排程"/> -->
|
||||
<button string="批量排程" name="%(sf_plan.action_plan_some)d" type="action"
|
||||
class="btn-primary"/>
|
||||
</header>
|
||||
<field name="state" widget="badge" decoration-warning="state == 'draft'" decoration-success="state == 'done'" decoration-info="state == 'processing'" decoration-danger="state == 'finished'"/>
|
||||
<field name="state" widget="badge" decoration-warning="state == 'draft'"
|
||||
decoration-success="state == 'done'" decoration-info="state == 'processing'"
|
||||
decoration-danger="state == 'finished'"/>
|
||||
<field name="name"/>
|
||||
<field name="origin"/>
|
||||
<field name="order_deadline"/>
|
||||
@@ -20,8 +23,12 @@
|
||||
<field name="date_planned_start"/>
|
||||
<field name="date_planned_finished"/>
|
||||
<field name="schedule_setting"/>
|
||||
<button name="do_production_schedule" class="btn schedule_done" string="生产排程" type="object" attrs="{'invisible': [('state', 'not in', ['draft'])]}" groups="sf_base.group_plan_dispatch"/>
|
||||
<button name="cancel_production_schedule" class="btn schedule_cancel" string="取消排程" type="object" attrs="{'invisible': [('state', 'not in', ['done'])]}" groups="sf_base.group_plan_dispatch"/>
|
||||
<button name="do_production_schedule" class="btn schedule_done" string="生产排程" type="object"
|
||||
attrs="{'invisible': [('state', 'not in', ['draft'])]}"
|
||||
groups="sf_base.group_plan_dispatch"/>
|
||||
<button name="cancel_production_schedule" class="btn schedule_cancel" string="取消排程"
|
||||
type="object" attrs="{'invisible': [('state', 'not in', ['done'])]}"
|
||||
groups="sf_base.group_plan_dispatch"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -32,14 +39,17 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="订单计划">
|
||||
<header>
|
||||
<!-- <button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight" icon="fa-step-forward"/> -->
|
||||
<button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight" options='{"calendar_view": true, "date_begin": "2020-01-01", "date_end": "2020-12-31"}' groups="sf_base.group_plan_dispatch" attrs="{'invisible': [('state', '=', 'done')]}"/>
|
||||
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight" groups="sf_base.group_plan_dispatch" attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
||||
<!-- <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 string="执行排程" name="do_production_schedule" type="object" class="oe_highlight" icon="fa-step-forward"/> -->
|
||||
<button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight"
|
||||
options='{"calendar_view": true, "date_begin": "2020-01-01", "date_end": "2020-12-31"}'
|
||||
groups="sf_base.group_plan_dispatch" attrs="{'invisible': [('state', '=', 'done')]}"/>
|
||||
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight"
|
||||
groups="sf_base.group_plan_dispatch" attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
||||
<!-- <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 string="销售单" name="test_sale_order" type="object" class="oe_highlight"/> -->
|
||||
<!-- <button string="测试流程" name="liucheng_cs" type="object" class="oe_highlight"/> -->
|
||||
<!-- <button string="销售单" name="test_sale_order" type="object" class="oe_highlight"/> -->
|
||||
<!-- <button string="测试流程" name="liucheng_cs" type="object" class="oe_highlight"/> -->
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,done,processing,finished"/>
|
||||
</header>
|
||||
<sheet>
|
||||
@@ -68,54 +78,54 @@
|
||||
<field name="shift" widget="time"/>
|
||||
|
||||
<!-- Chatter -->
|
||||
<!-- <div class="oe_chatter"> -->
|
||||
<!-- <field name="message_follower_ids" widget="mail_followers"/> -->
|
||||
<!-- <field name="message_ids" widget="mail_thread"/> -->
|
||||
<!-- <field name="activity_ids"/> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div class="oe_chatter"> -->
|
||||
<!-- <field name="message_follower_ids" widget="mail_followers"/> -->
|
||||
<!-- <field name="message_ids" widget="mail_thread"/> -->
|
||||
<!-- <field name="activity_ids"/> -->
|
||||
<!-- </div> -->
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
</group>
|
||||
<!-- <group string="规格信息" col="1"> -->
|
||||
<!-- <group col="3"> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="length"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="width"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="thickness"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- </group> -->
|
||||
<!-- <field name="length"/> -->
|
||||
<!-- <field name="width"/> -->
|
||||
<!-- <field name="thickness"/> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="diameter"/> -->
|
||||
<!-- <field name="material"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group string="绑定订单"> -->
|
||||
<!-- <field name="customer_name"/> -->
|
||||
<!-- <field name="order_no"/> -->
|
||||
<!-- <field name="line_no"/> -->
|
||||
<!-- <field name="delivery_length"/> -->
|
||||
<!-- <field name="delivery_width"/> -->
|
||||
<!-- <field name="delivery_thickness"/> -->
|
||||
<!-- <field name="delivery_diameter"/> -->
|
||||
<!-- <field name="delivery_quantity"/> -->
|
||||
<!-- <field name="delivery_date"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group string="规格信息" col="1"> -->
|
||||
<!-- <group col="3"> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="length"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="width"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="thickness"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- </group> -->
|
||||
<!-- <field name="length"/> -->
|
||||
<!-- <field name="width"/> -->
|
||||
<!-- <field name="thickness"/> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="diameter"/> -->
|
||||
<!-- <field name="material"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group string="绑定订单"> -->
|
||||
<!-- <field name="customer_name"/> -->
|
||||
<!-- <field name="order_no"/> -->
|
||||
<!-- <field name="line_no"/> -->
|
||||
<!-- <field name="delivery_length"/> -->
|
||||
<!-- <field name="delivery_width"/> -->
|
||||
<!-- <field name="delivery_thickness"/> -->
|
||||
<!-- <field name="delivery_diameter"/> -->
|
||||
<!-- <field name="delivery_quantity"/> -->
|
||||
<!-- <field name="delivery_date"/> -->
|
||||
<!-- </group> -->
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- 搜索视图 -->
|
||||
<!-- 搜索视图 -->
|
||||
<record id="sf_production_plan_search" model="ir.ui.view">
|
||||
<field name="name">sf.production.plan.search</field>
|
||||
<field name="model">sf.production.plan</field>
|
||||
@@ -151,7 +161,7 @@
|
||||
default_scale="day"
|
||||
scales="day,week,month,year"
|
||||
precision="{'day': 'hour:quarter', 'week': 'day:half', 'month': 'day', 'year': 'month:quarter'}">
|
||||
<field name="shift"/>
|
||||
<field name="shift"/>
|
||||
<field name="name"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="date_planned_start"/>
|
||||
@@ -191,65 +201,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- <record id="sf_pl_plan_action" model="ir.actions.act_window"> -->
|
||||
<!-- <field name="name">制造订单生产计划</field> -->
|
||||
<!-- <field name="type">ir.actions.act_window</field> -->
|
||||
<!-- <field name="res_model">sf.pl.plan</field> -->
|
||||
<!-- <field name="view_mode">tree,form,gantt</field> -->
|
||||
<!-- </record> -->
|
||||
<!-- <record id="sf_production_gantt_view" model="ir.ui.view"> -->
|
||||
<!-- <field name="name">sf.production.plan.gantt</field> -->
|
||||
<!-- <field name="model">mrp.production</field> -->
|
||||
<!-- <field name="arch" type="xml"> -->
|
||||
<!-- <gantt class="o_mrp_workorder_gantt" date_stop="date_planned_finished" date_start="date_planned_start" -->
|
||||
<!-- string="制造订单生产计划" default_group_by="production_line_id" create="0" -->
|
||||
<!-- delete="0" sample="1" plan="0" -->
|
||||
<!-- display_unavailability="1" -->
|
||||
<!-- decoration-success="state == 'done'" -->
|
||||
<!-- decoration-secondary="state == 'cancel'" -->
|
||||
<!-- color="production_line_id" -->
|
||||
<!-- progress_bar="state" -->
|
||||
<!-- form_view_id="mrp.mrp_production_form_view"> -->
|
||||
<!-- <field name="name"/> -->
|
||||
<!-- <field name="product_qty"/> -->
|
||||
<!-- <field name="date_planned_start"/> -->
|
||||
<!-- <field name="date_planned_finished" string="计划结束时间"/> -->
|
||||
<!-- <field name="state"/> -->
|
||||
<!-- <templates> -->
|
||||
<!-- <div t-name="gantt-popover" class="container-fluid"> -->
|
||||
<!-- <div class="row g-0"> -->
|
||||
<!-- <div class="col"> -->
|
||||
<!-- <ul class="ps-1 mb-0 list-unstyled"> -->
|
||||
<!-- <li> -->
|
||||
<!-- <strong>开始时间:</strong> -->
|
||||
<!-- <t t-out="userTimezoneStartDate.format('L LTS')"/> -->
|
||||
<!-- </li> -->
|
||||
<!-- <li> -->
|
||||
<!-- <strong>结束时间:</strong> -->
|
||||
<!-- <t t-out="userTimezoneStopDate.format('L LTS')"/> -->
|
||||
<!-- </li> -->
|
||||
<!-- <li> -->
|
||||
<!-- <strong>数量:</strong> -->
|
||||
<!-- <t t-out="product_qty"/> -->
|
||||
<!-- </li> -->
|
||||
<!-- <li> -->
|
||||
<!-- <strong>状态:</strong> -->
|
||||
<!-- <t t-if="state === 'cancel'">已取消</t> -->
|
||||
<!-- <t t-elif="state === 'done'">已完成</t> -->
|
||||
<!-- <t t-elif="state === '已排程'">已排程</t> -->
|
||||
<!-- <t t-else="">其他状态</t> -->
|
||||
<!-- <t t-out="state"/> -->
|
||||
<!-- </li> -->
|
||||
<!-- </ul> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </templates> -->
|
||||
<!-- </gantt> -->
|
||||
<!-- </field> -->
|
||||
<!-- </record> -->
|
||||
|
||||
<record id="sf_machine_schedule_tree" model="ir.ui.view">
|
||||
<field name="name">sf.machine.schedule.tree</field>
|
||||
<field name="model">sf.machine.schedule</field>
|
||||
@@ -268,7 +219,7 @@
|
||||
<field name="view_mode">gantt,tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- 这个也是制造订单生产计划,只是把tree视图放在了默认位置 -->
|
||||
<!-- 这个也是制造订单生产计划,只是把tree视图放在了默认位置 -->
|
||||
<record id="sf_production_plan_action1" model="ir.actions.act_window">
|
||||
<field name="name">制造订单生产计划</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -284,11 +235,11 @@
|
||||
groups="sf_base.group_plan_dispatch"
|
||||
/>
|
||||
|
||||
<!-- <record model="ir.ui.menu" id="mrp_custom_menu" inherit_id="mrp.menu_mrp_manufacturing"> -->
|
||||
<!-- <field name="name">Custom Manufacturing Orders</field> -->
|
||||
<!-- <field name="action" ref="mrp.mrp_manufacturing_action"/> -->
|
||||
<!-- --><!-- 扩展现有的动作 --><!-- -->
|
||||
<!-- </record> -->
|
||||
<!-- <record model="ir.ui.menu" id="mrp_custom_menu" inherit_id="mrp.menu_mrp_manufacturing"> -->
|
||||
<!-- <field name="name">Custom Manufacturing Orders</field> -->
|
||||
<!-- <field name="action" ref="mrp.mrp_manufacturing_action"/> -->
|
||||
<!-- --><!-- 扩展现有的动作 --><!-- -->
|
||||
<!-- </record> -->
|
||||
<record model="ir.actions.act_window" id="mrp_custom_action">
|
||||
<!-- 自定义额外的动作 -->
|
||||
<field name="name">制造订单</field>
|
||||
@@ -305,17 +256,17 @@
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_machine_work_schedule">
|
||||
<!-- 自定义额外的动作 -->
|
||||
<!-- 自定义额外的动作 -->
|
||||
<field name="name">机台作业计划</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.machine.schedule</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
暂无机台作业计划
|
||||
暂无机台作业计划
|
||||
</p>
|
||||
<p>
|
||||
跟进请求的处理,并且和合作者沟通。
|
||||
跟进请求的处理,并且和合作者沟通。
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
@@ -335,13 +286,13 @@
|
||||
action="sf_manufacturing.sf_workpiece_delivery_act"
|
||||
parent="mrp.menu_mrp_manufacturing"
|
||||
/>
|
||||
<!-- <menuitem -->
|
||||
<!-- id="sale_custom_menu" -->
|
||||
<!-- name="报价单" -->
|
||||
<!-- sequence="50" -->
|
||||
<!-- action="sale_custom_action" -->
|
||||
<!-- parent="sf_production_plan_menu" -->
|
||||
<!-- /> -->
|
||||
<!-- <menuitem -->
|
||||
<!-- id="sale_custom_menu" -->
|
||||
<!-- name="报价单" -->
|
||||
<!-- sequence="50" -->
|
||||
<!-- action="sale_custom_action" -->
|
||||
<!-- parent="sf_production_plan_menu" -->
|
||||
<!-- /> -->
|
||||
<menuitem
|
||||
id="schedule_custom_menu"
|
||||
name="排程单"
|
||||
@@ -349,22 +300,17 @@
|
||||
action="sf_production_plan_action1"
|
||||
parent="sf_production_plan_menu"
|
||||
/>
|
||||
<!-- <menuitem -->
|
||||
<!-- id="machine_work_schedule" -->
|
||||
<!-- name="机台作业计划" -->
|
||||
<!-- sequence="200" -->
|
||||
<!-- action="action_machine_work_schedule" -->
|
||||
<!-- parent="sf_production_plan_menu" -->
|
||||
<!-- /> -->
|
||||
|
||||
|
||||
<!-- --><!-- 在现有菜单结构后面加入自定义的动作 -->
|
||||
<!-- <menuitem -->
|
||||
<!-- id="mrp_custom_menuitem" -->
|
||||
<!-- name="My Custom Menuitem" -->
|
||||
<!-- sequence="20" -->
|
||||
<!-- action="mrp_custom_action"/> -->
|
||||
<!-- --><!-- 自定义额外的菜单项 --><!-- -->
|
||||
<!-- </field> -->
|
||||
<record id="plan_mrp_production_form_view_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">plan.mrp.production.form.inherit.sf</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="sf_manufacturing.custom_mrp_production_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='programming_state']" position="after">
|
||||
<field name="production_line_id" readonly="1"/>
|
||||
<field name="plan_start_processing_time" readonly="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user