mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 18:52:07 +02:00
Initial commit: Sale packages
This commit is contained in:
commit
14e3d26998
6469 changed files with 2479670 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data>
|
||||
<record id="mrp_production_form_view_sale" model="ir.ui.view">
|
||||
<field name="name">mrp.production.inherited.form.sale</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="priority">64</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='action_view_mrp_production_childs']" position="before">
|
||||
<button class="oe_stat_button" name="action_view_sale_orders" type="object" icon="fa-dollar" attrs="{'invisible': [('sale_order_count', '=', 0)]}" groups="sales_team.group_sale_salesman">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="sale_order_count"/></span>
|
||||
<span class="o_stat_text">Sale</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data></odoo>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data>
|
||||
<record id="sale_order_form_mrp" model="ir.ui.view">
|
||||
<field name="name">sale.order.inherited.form.mrp</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button class="oe_stat_button" name="action_view_mrp_production" type="object" icon="fa-wrench" attrs="{'invisible': [('mrp_production_count', '=', 0)]}" groups="mrp.group_mrp_user">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="mrp_production_count"/></span>
|
||||
<span class="o_stat_text">Manufacturing</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data></odoo>
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="sale_order_portal_content_inherit_sale_mrp"
|
||||
name="Orders MOs"
|
||||
inherit_id="sale.sale_order_portal_content">
|
||||
<xpath expr="//div[@id='informations']" position="inside">
|
||||
<t t-set="mrp_productions" t-value="sale_order.mrp_production_ids"/>
|
||||
<t t-if="mrp_productions">
|
||||
<div>
|
||||
<strong>Manufacturing Orders</strong>
|
||||
</div>
|
||||
<div>
|
||||
<t t-foreach="mrp_productions" t-as="mo">
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between">
|
||||
<div>
|
||||
<span t-out="mo.name"/>
|
||||
<div class="small d-lg-inline-block ms-3">
|
||||
Date:
|
||||
<span class="text-muted"
|
||||
t-field="mo.date_finished"
|
||||
t-options="{'date_only': True}"/>
|
||||
<span t-if="mo.state in ['draft', 'confirmed', 'progress', 'to_close']"
|
||||
class="text-muted"
|
||||
t-field="mo.date_planned_finished"
|
||||
t-options="{'date_only': True}"/>
|
||||
</div>
|
||||
</div>
|
||||
<span t-if="mo.state in ['to_close', 'done']"
|
||||
class="small badge text-bg-success orders_label_text_align">
|
||||
<i class="fa fa-fw fa-check"/> <b>Manufactured</b>
|
||||
</span>
|
||||
<span t-elif="mo.state == 'cancel'"
|
||||
class="small badge text-bg-danger orders_label_text_align">
|
||||
<i class="fa fa-fw fa-times"/> <b>Cancelled</b>
|
||||
</span>
|
||||
<span t-elif="mo.state in ['confirmed']"
|
||||
class="small badge text-bg-info orders_label_text_align">
|
||||
<i class="fa fa-fw fa-clock-o"/> <b>Confirmed</b>
|
||||
</span>
|
||||
<span t-elif="mo.state in ['progress']"
|
||||
class="small badge text-bg-warning orders_label_text_align">
|
||||
<i class="fa fa-fw fa-clock-o"/> <b>In progress</b>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue