mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-26 12:31:59 +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,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="sale_quotation_builder.res_config_settings_view_form_inherit" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.sale.management.inherit.sale.quotation.builder</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="sale_management.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//label[@for='module_sale_quotation_builder']/following::div/em" position="replace"/>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="sale_order_template_view_form_inherit_sale_quotation_builder" model="ir.ui.view">
|
||||
<field name="name">sale.order.template.form.inherit.sale_quotation_builder</field>
|
||||
<field name="inherit_id" ref="sale_management.sale_order_template_view_form"/>
|
||||
<field name="model">sale.order.template</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<sheet position="before">
|
||||
<header>
|
||||
<button name="action_open_template" type="object" string="Design Template" class="oe_highlight"/>
|
||||
</header>
|
||||
</sheet>
|
||||
|
||||
<xpath expr="//notebook[@name='description']" position="inside">
|
||||
<page string="Website Description" name="website_description">
|
||||
<field name="website_description" />
|
||||
</page>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//tree/field[@name='product_uom_id']" position="after">
|
||||
<field name="website_description" invisible="1"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//notebook[@name='main_book']" position="inside">
|
||||
<field name="website_description" invisible="1"/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="sale_order_form_quote_design" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.sale_quotation_builder</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale_management.sale_order_form_quote"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//page/field[@name='order_line']/tree/field[@name='name']" position="after">
|
||||
<field name="website_description" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//page/field[@name='order_line']/form/field[@name='name']" position="after">
|
||||
<field name="website_description" invisible="1"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//page/field[@name='sale_order_option_ids']/kanban/field[@name='product_id']" position="after">
|
||||
<field name="website_description" invisible="1" readonly="1" force_save="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//page/field[@name='sale_order_option_ids']/form//field[@name='name']" position="after">
|
||||
<field name="website_description" invisible="1" readonly="1" force_save="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//page/field[@name='sale_order_option_ids']/tree/field[@name='name']" position="after">
|
||||
<field name="website_description" invisible="1" readonly="1" force_save="1"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//button[@name='button_add_to_order']" position="after">
|
||||
<field name="website_description" invisible="1"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='require_payment']" position="after">
|
||||
<field name="website_description" invisible="1"/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="sale_order_portal_content_inherit_sale_quotation_builder" name="Order Design" inherit_id="sale.sale_order_portal_content">
|
||||
<xpath expr="//div[@id='informations']" position="after">
|
||||
<div t-field="sale_order.website_description" class="oe_no_empty"/>
|
||||
<t t-set="product_tmpl_ids" t-value="[]"/>
|
||||
<t t-foreach="sale_order.order_line" t-as="line">
|
||||
<t t-if="line.product_id.product_tmpl_id.id not in product_tmpl_ids">
|
||||
<t t-set="product_tmpl_ids" t-value="product_tmpl_ids + [line.product_id.product_tmpl_id.id]"/>
|
||||
<a t-att-id="line.id"/>
|
||||
<div class="alert alert-info alert-dismissible mt16 css_non_editable_mode_hidden o_not_editable" t-ignore="True" role="status">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
Product: <strong t-out="line.product_id.name"/>:
|
||||
the content below will disappear if this
|
||||
product is removed from the quote.
|
||||
</div>
|
||||
<div t-att-class="'oe_no_empty' if line.website_description else 'oe_no_empty d-print-none'" t-field="line.website_description"/>
|
||||
</t>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Template to edit the quotation template with the website editor -->
|
||||
<template id="so_template" name="SO Template">
|
||||
<t t-call="website.layout">
|
||||
<body>
|
||||
<t t-set="o_portal_fullwidth_alert">
|
||||
<t t-call="portal.portal_back_in_edit_mode">
|
||||
<t t-set="backend_url" t-value="'/web#model=%s&id=%s&action=%s&view_type=form' % (template._name, template.id, request.env.ref('sale_management.sale_order_template_action').id)"/>
|
||||
<t t-set="custom_html">This is a preview of the sale order template.</t>
|
||||
</t>
|
||||
</t>
|
||||
<div class="container o_sale_order">
|
||||
<div class="row mt16">
|
||||
<div class="col-lg-9 ms-auto">
|
||||
<div class="alert alert-info" t-ignore="True" role="status">
|
||||
<p>
|
||||
<strong>Template Header:</strong> this content
|
||||
will appear on all quotations using this
|
||||
template.
|
||||
</p>
|
||||
<p class="text-muted">
|
||||
Titles with style <i>Heading 2</i> and
|
||||
<i>Heading 3</i> will be used to generate the
|
||||
table of content automatically.
|
||||
</p>
|
||||
</div>
|
||||
<div id="template_introduction" t-field="template.website_description" class="oe_no_empty"/>
|
||||
<t t-set="product_tmpl_ids" t-value="[]"/>
|
||||
<t t-foreach="template.sale_order_template_line_ids" t-as="line">
|
||||
<t t-if="line.product_id.product_tmpl_id.id not in product_tmpl_ids">
|
||||
<t t-set="product_tmpl_ids" t-value="product_tmpl_ids + [line.product_id.product_tmpl_id.id]"/>
|
||||
<div class="alert alert-info mt16" t-ignore="True" role="status">
|
||||
Product: <strong t-out="line.product_id.name"/>:
|
||||
this content will appear on the quotation only if this
|
||||
product is put on the quote.
|
||||
</div>
|
||||
<div t-field="line.website_description" class="oe_no_empty"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-set="product_tmpl_ids" t-value="[]"/>
|
||||
<t t-foreach="template.sale_order_template_option_ids" t-as="option_line">
|
||||
<t t-if="option_line.product_id.product_tmpl_id.id not in product_tmpl_ids">
|
||||
<t t-set="product_tmpl_ids" t-value="product_tmpl_ids + [option_line.product_id.product_tmpl_id.id]"/>
|
||||
<div class="alert alert-info mt16" t-ignore="True" role="status">
|
||||
Optional Product: <strong t-out="option_line.product_id.name"/>:
|
||||
this content will appear on the quotation only if this
|
||||
product is used in the quote.
|
||||
</div>
|
||||
<div t-field="option_line.website_description" class="oe_no_empty"/>
|
||||
</t>
|
||||
</t>
|
||||
<section id="terms" class="container" t-if="not is_html_empty(template.note)">
|
||||
<h1 t-ignore="True">Terms & Conditions</h1>
|
||||
<p t-field="template.note"/>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="brand_promotion" inherit_id="website.brand_promotion">
|
||||
<xpath expr="//t[@t-call='web.brand_promotion_message']" position="replace">
|
||||
<t t-call="web.brand_promotion_message">
|
||||
<t t-set="_message">
|
||||
An awesome <a target="_blank" href="https://www.odoo.com/app/crm?utm_source=db&utm_medium=portal">Open Source CRM</a>
|
||||
</t>
|
||||
<t t-set="_utm_medium" t-valuef="portal"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue