mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[15.0][ADD] subscription_oca
This commit is contained in:
20
subscription_oca/views/product_template_views.xml
Normal file
20
subscription_oca/views/product_template_views.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
<record id="product_template_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.sub.form</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="priority" eval="8" />
|
||||
<field name="inherit_id" ref="product.product_template_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='sales']" position="inside">
|
||||
<group>
|
||||
<field name="subscribable" />
|
||||
<field
|
||||
name="subscription_template_id"
|
||||
attrs="{'invisible': [('subscribable', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
28
subscription_oca/views/res_partner_views.xml
Normal file
28
subscription_oca/views/res_partner_views.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- Inherit Form View to Modify it -->
|
||||
<record id="res_partner_view_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_view_partner_invoices" position="after">
|
||||
<field name="subscription_ids" invisible="1" />
|
||||
<button
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-recycle"
|
||||
name="action_view_subscription_ids"
|
||||
attrs="{'invisible': [('subscription_ids', '=', False)]}"
|
||||
>
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="subscription_count" />
|
||||
</span>
|
||||
<span class="o_stat_text">Subscriptions</span>
|
||||
</div>
|
||||
</button>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
29
subscription_oca/views/sale_order_views.xml
Normal file
29
subscription_oca/views/sale_order_views.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding='UTF-8' ?>
|
||||
<odoo>
|
||||
<record id="view_sale_order_form" model="ir.ui.view">
|
||||
<field name="name">view.sale_order.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
|
||||
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_view_subscriptions"
|
||||
attrs="{'invisible': [('subscriptions_count', '=', 0)]}"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
>
|
||||
<field
|
||||
name="subscriptions_count"
|
||||
widget="statinfo"
|
||||
string="Subscriptions"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
73
subscription_oca/views/sale_subscription_stage_views.xml
Normal file
73
subscription_oca/views/sale_subscription_stage_views.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_subscription_stage_form" model="ir.ui.view">
|
||||
<field name="name">view.subscription.stage.form</field>
|
||||
<field name="model">sale.subscription.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Subscription stage">
|
||||
<sheet>
|
||||
<group name="main">
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="in_progress" invisible="True" />
|
||||
<field
|
||||
name="sequence"
|
||||
help="
|
||||
This field dictates the stages' visual order on the Kanban and form view. Although is purely visual, mind that if the order isn't
|
||||
consequent with your needs, you could have a 'Closed'-type stage before a 'Ready to start' one.
|
||||
"
|
||||
/>
|
||||
<field
|
||||
name="type"
|
||||
help="Stages define the life-cycle of a given subscription; this is,
|
||||
a subscription can be a 'Ready to start', 'In progress' or 'Closed' type of stage.
|
||||
Bear in mind that there can only be one 'Closed'-type stage."
|
||||
/>
|
||||
<field name="fold" />
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="description"
|
||||
placeholder="Add new description..."
|
||||
nolabel="1"
|
||||
/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_subscription_stage_tree" model="ir.ui.view">
|
||||
<field name="name">view.subscription.stage.tree</field>
|
||||
<field name="model">sale.subscription.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="subscription_stage_action" model="ir.actions.act_window">
|
||||
<field name="name">Susbcription stages</field>
|
||||
<field name="res_model">sale.subscription.stage</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to create a new subscription stage.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="subscription_stage_menu"
|
||||
parent="sale_subscription_configuration_menu"
|
||||
action="subscription_stage_action"
|
||||
sequence="20"
|
||||
name="Subscription stages"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
27
subscription_oca/views/sale_subscription_tag_views.xml
Normal file
27
subscription_oca/views/sale_subscription_tag_views.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_sale_subscription_tag_tree" model="ir.ui.view">
|
||||
<field name="name">view.sale.subscription.tag.tree</field>
|
||||
<field name="model">sale.subscription.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="top">
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="subscription_tag_action" model="ir.actions.act_window">
|
||||
<field name="name">Tags</field>
|
||||
<field name="res_model">sale.subscription.tag</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="subscription_tag_menu"
|
||||
parent="sale_subscription_configuration_menu"
|
||||
action="subscription_tag_action"
|
||||
sequence="40"
|
||||
name="Subscription tags"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
135
subscription_oca/views/sale_subscription_template_views.xml
Normal file
135
subscription_oca/views/sale_subscription_template_views.xml
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="sale_subscription_template_form" model="ir.ui.view">
|
||||
<field name="name">sale.subscription.template.form</field>
|
||||
<field name="model">sale.subscription.template</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_view_product_ids"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
>
|
||||
<field
|
||||
name="product_ids_count"
|
||||
widget="statinfo"
|
||||
string="Products"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
name="action_view_subscription_ids"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
>
|
||||
<field
|
||||
name="subscription_count"
|
||||
widget="statinfo"
|
||||
string="Subscriptions"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</group>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field
|
||||
name="name"
|
||||
placeholder="e.g. Monthly Subscription"
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<notebook>
|
||||
<page string="Invoicing">
|
||||
<group>
|
||||
<group name="left_group">
|
||||
<label for="recurring_interval" string="Invoice" />
|
||||
<div class="o_row oe_inline">
|
||||
<span class="every">Every</span>
|
||||
<field name="recurring_interval" colspan="2" />
|
||||
<field
|
||||
name="recurring_rule_type"
|
||||
colspan="2"
|
||||
required="1"
|
||||
/>
|
||||
</div>
|
||||
<field
|
||||
name="recurring_rule_boundary"
|
||||
widget="radio"
|
||||
options="{'horizontal':true}"
|
||||
/>
|
||||
<label
|
||||
for="recurring_rule_count"
|
||||
attrs="{'invisible': [('recurring_rule_boundary','=','unlimited')]}"
|
||||
/>
|
||||
<div
|
||||
class="o_row "
|
||||
attrs="{'invisible': [('recurring_rule_boundary','=','unlimited')]}"
|
||||
>
|
||||
<span class="mr-1">For</span>
|
||||
<field
|
||||
name="recurring_rule_count"
|
||||
class="oe_inline"
|
||||
/>
|
||||
month(s)
|
||||
</div>
|
||||
<field name="invoicing_mode" widget="radio" />
|
||||
<field
|
||||
name="invoice_mail_template_id"
|
||||
attrs="{'invisible': [('invoicing_mode','!=','invoice_send')], 'required': [('invoicing_mode', '=', 'invoice_send')]}"
|
||||
/>
|
||||
</group>
|
||||
<group name="right_group">
|
||||
<field name="code" readonly="0" />
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Terms and Conditions">
|
||||
<group>
|
||||
<field
|
||||
nolabel="1"
|
||||
name="description"
|
||||
placeholder="Terms and Conditions"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
</sheet>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
|
||||
</record>
|
||||
|
||||
<record id="sale_subscription_template_tree" model="ir.ui.view">
|
||||
<field name="name">sale.subscription.template.tree</field>
|
||||
<field name="model">sale.subscription.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="recurring_interval" />
|
||||
<field name="recurring_rule_type" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sale_subscription_template_act_window" model="ir.actions.act_window">
|
||||
<field name="name">Subscription templates</field>
|
||||
<field name="res_model">sale.subscription.template</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="sale_template_subscription_menu"
|
||||
parent="sale_subscription_configuration_menu"
|
||||
action="sale_subscription_template_act_window"
|
||||
sequence="2"
|
||||
/>
|
||||
</odoo>
|
||||
473
subscription_oca/views/sale_subscription_views.xml
Normal file
473
subscription_oca/views/sale_subscription_views.xml
Normal file
@@ -0,0 +1,473 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="sale_subscription_form" model="ir.ui.view">
|
||||
<field name="name">sale.subscription.form</field>
|
||||
<field name="model">sale.subscription</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="New subscription">
|
||||
<header>
|
||||
<button
|
||||
string="Create Invoice"
|
||||
name="manual_invoice"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
/>
|
||||
|
||||
<button
|
||||
string="Close subscription"
|
||||
class="btn-danger"
|
||||
name="action_close_subscription"
|
||||
type="object"
|
||||
help="A given subscription can be marked as closed when, for example, renewal is not desired."
|
||||
attrs="{'invisible': [('in_progress', '=', False)]}"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="stage_id"
|
||||
widget="statusbar"
|
||||
clickable="1"
|
||||
options="{'fold_field': 'fold'}"
|
||||
/>
|
||||
|
||||
</header>
|
||||
<sheet>
|
||||
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="action_view_sale_order_ids"
|
||||
type="object"
|
||||
attrs="{'invisible': [('sale_order_ids_count', '=', 0)]}"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
>
|
||||
<field
|
||||
name="sale_order_ids_count"
|
||||
widget="statinfo"
|
||||
string="Sales"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
name="action_view_account_invoice_ids"
|
||||
attrs="{'invisible': [('account_invoice_ids_count', '=', 0)]}"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
>
|
||||
<field
|
||||
name="account_invoice_ids_count"
|
||||
widget="statinfo"
|
||||
string="Invoices"
|
||||
/>
|
||||
</button>
|
||||
|
||||
|
||||
</div>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
text="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<h1 class="flex-fill d-flex flex-row">
|
||||
<field name="name" force_save="1" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group name="left_group">
|
||||
<field name="active" invisible="1" />
|
||||
<field name="in_progress" invisible="True" />
|
||||
<field name="partner_id" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field name="pricelist_id" />
|
||||
<field
|
||||
name="date_start"
|
||||
attrs="{'readonly':['|',('active','=',False), ('in_progress', '=', True)]}"
|
||||
/>
|
||||
<field
|
||||
name="date"
|
||||
attrs="{'invisible':[('recurring_rule_boundary', '=', True)]}"
|
||||
/>
|
||||
<field
|
||||
name="close_reason_id"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<field name="recurring_rule_boundary" invisible="1" />
|
||||
|
||||
</group>
|
||||
<group name="right_group">
|
||||
|
||||
<field name="template_id" />
|
||||
<field name="crm_team_id" />
|
||||
<field
|
||||
name="recurring_next_date"
|
||||
attrs="{'invisible': ['|', ('recurring_next_date', '=', False), ('in_progress', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="company_id"
|
||||
options="{'no_create': True}"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page
|
||||
string="Subscription lines"
|
||||
name="subscription_lines_page"
|
||||
>
|
||||
<field name="sale_subscription_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="product_id" required="True" />
|
||||
<field
|
||||
name="name"
|
||||
required="True"
|
||||
widget="section_and_note_text"
|
||||
/>
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field name="product_uom_qty" required="True" />
|
||||
<field name="price_unit" required="True" />
|
||||
<field name="discount" required="True" />
|
||||
<field name="tax_ids" widget="many2many_tags" />
|
||||
<field
|
||||
name="price_subtotal"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
<field
|
||||
name="price_total"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
</tree>
|
||||
</field>
|
||||
<group
|
||||
class="oe_subtotal_footer oe_right"
|
||||
colspan="2"
|
||||
name="subscription_total"
|
||||
>
|
||||
<field
|
||||
name="recurring_total"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
<field
|
||||
name="amount_tax"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
<div
|
||||
class="oe_subtotal_footer_separator oe_inline o_td_label"
|
||||
>
|
||||
<label for="amount_total" />
|
||||
</div>
|
||||
<field
|
||||
name="amount_total"
|
||||
nolabel="1"
|
||||
class="oe_subtotal_footer_separator"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Misc" name="misc_page">
|
||||
<group>
|
||||
<field name="description" />
|
||||
<field name="terms" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other info" name="other_info_page">
|
||||
<group>
|
||||
<group>
|
||||
<field name="code" />
|
||||
<field name="tag_ids" widget="many2many_tags" />
|
||||
<field name="sale_order_id" />
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="journal_id"
|
||||
domain="[('type', '=', 'sale')]"
|
||||
/>
|
||||
<field name="fiscal_position_id" />
|
||||
<field name="user_id" />
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
</sheet>
|
||||
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="activity_ids" widget="mail_activity" />
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sale_subscription_tree" model="ir.ui.view">
|
||||
<field name="name">sale.subscription.tree</field>
|
||||
<field name="model">sale.subscription</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" optional="show" />
|
||||
<field name="partner_id" optional="show" />
|
||||
<field name="recurring_next_date" optional="show" />
|
||||
<field name="code" optional="show" />
|
||||
<field name="user_id" optional="show" />
|
||||
<field name="recurring_total" sum="Total subtotal" optional="show" />
|
||||
<field name="amount_tax" sum="Total Tax" optional="show" />
|
||||
<field name="amount_total" sum="Total" optional="show" />
|
||||
<field name="template_id" optional="show" />
|
||||
<field name="stage_str" optional="show" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="sale_subscription_kanban" model="ir.ui.view">
|
||||
<field name="name">sale.subscription.kanban</field>
|
||||
<field name="model">sale.subscription</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban
|
||||
default_group_by="stage_id"
|
||||
default_order="write_date,sequence"
|
||||
class="o_kanban_small_column o_opportunity_kanban"
|
||||
>
|
||||
<!-- <field name="stage_id" options='{"group_by_tooltip": {"requirements": "Description"}}'/> -->
|
||||
<field name="stage_id" />
|
||||
<field name="code" />
|
||||
<field name="write_date" />
|
||||
<field name="sequence" invisible="1" />
|
||||
<field name="partner_id" />
|
||||
<field name="user_id" />
|
||||
<field name="recurring_total" />
|
||||
<field name="currency_id" />
|
||||
<field name="activity_state" />
|
||||
<field name="tag_ids" />
|
||||
<field name="amount_total" />
|
||||
<field name="activity_ids" />
|
||||
<field name="image" />
|
||||
<field name="color" />
|
||||
<progressbar
|
||||
field="activity_state"
|
||||
colors="{"planned": "success", "today": "warning", "overdue": "danger"}"
|
||||
sum_field="recurring_total"
|
||||
help="This bar allows to filter the opportunities based on scheduled activities."
|
||||
/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div
|
||||
t-attf-class="
|
||||
#{!selection_mode ? kanban_color(record.color.raw_value) : ''}
|
||||
oe_kanban_global_click_edit
|
||||
oe_semantic_html_override
|
||||
oe_kanban_card"
|
||||
>
|
||||
<div class="o_dropdown_kanban dropdown" modifiers="{}">
|
||||
<a
|
||||
role="button"
|
||||
class="dropdown-toggle o-no-caret btn"
|
||||
data-toggle="dropdown"
|
||||
data-display="static"
|
||||
href="#"
|
||||
aria-label="Menú desplegable"
|
||||
title="Menú desplegable"
|
||||
modifiers="{}"
|
||||
>
|
||||
<span class="fa fa-ellipsis-v" modifiers="{}" />
|
||||
</a>
|
||||
<div class="dropdown-menu" role="menu" modifiers="{}">
|
||||
<a
|
||||
role="menuitem"
|
||||
class="dropdown-item oe_kanban_action oe_kanban_action_a"
|
||||
modifiers="{}"
|
||||
data-type="edit"
|
||||
href="#"
|
||||
>
|
||||
Edit
|
||||
</a>
|
||||
<a
|
||||
role="menuitem"
|
||||
class="dropdown-item oe_kanban_action oe_kanban_action_a"
|
||||
modifiers="{}"
|
||||
data-type="delete"
|
||||
href="#"
|
||||
>
|
||||
Delete
|
||||
</a>
|
||||
<ul
|
||||
class="oe_kanban_colorpicker"
|
||||
data-field="color"
|
||||
modifiers="{}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<div>
|
||||
<field name="name" />
|
||||
<strong>
|
||||
<div>
|
||||
<field
|
||||
name="recurring_total"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
/>
|
||||
</div>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<field name="tag_ids" widget="many2many_tags" />
|
||||
</div>
|
||||
|
||||
<div class="text-muted o_kanban_record_subtitle">
|
||||
<t t-if="record.amount_total.raw_value">
|
||||
<field
|
||||
name="amount_total"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency'}"
|
||||
/>
|
||||
<span t-if="record.partner_id.value">,</span>
|
||||
</t>
|
||||
<span t-if="record.partner_id.value">
|
||||
<t t-esc="record.partner_id.value" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="o_kanban_record_bottom">
|
||||
<div class="oe_kanban_bottom_left">
|
||||
<field
|
||||
name="activity_ids"
|
||||
widget="kanban_activity"
|
||||
/>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<t t-set="unassigned">
|
||||
<t t-esc="_t('Unassigned')" />
|
||||
</t>
|
||||
<img
|
||||
t-att-src="kanban_image('res.users', 'image', record.user_id.raw_value)"
|
||||
t-att-title="record.user_id.value || unassigned"
|
||||
t-att-alt="record.user_id.value"
|
||||
class="oe_kanban_avatar"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_sale_order_pending_filter" model="ir.ui.view">
|
||||
<field name="name">sale.order.pending.filter</field>
|
||||
<field name="model">sale.subscription</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="to_renew" />
|
||||
<filter
|
||||
string="Pending subscriptions"
|
||||
name="pendingsubs"
|
||||
domain="[('to_renew','=', True)]"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_product_suscribable_filter" model="ir.ui.view">
|
||||
<field name="name">product.suscribable.filter</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="subscribable" />
|
||||
<filter
|
||||
string="Suscribable products"
|
||||
name="subsproducts"
|
||||
domain="[('subscribable','=', True)]"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_subscription_close_reason_tree" model="ir.ui.view">
|
||||
<field name="name">view.subscription.close.reason.tree</field>
|
||||
<field name="model">sale.subscription.close.reason</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="subscription_close_reason_action" model="ir.actions.act_window">
|
||||
<field name="name">Close reasons</field>
|
||||
<field name="res_model">sale.subscription.close.reason</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
|
||||
<record id="sale_subscription_action" model="ir.actions.act_window">
|
||||
<field name="name">Subscriptions</field>
|
||||
<field name="res_model">sale.subscription</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
</record>
|
||||
|
||||
<record id="subscription_product_template_action" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">
|
||||
{'search_default_subsproducts': True, "default_type": "service", "default_subscribable": True}
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="sale_subscription_root"
|
||||
groups="sales_team.group_sale_salesman_all_leads"
|
||||
name="Subscriptions"
|
||||
web_icon="subscription_oca,static/img/icon.png"
|
||||
sequence="7"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="sale_subscription_configuration_menu"
|
||||
parent="sale_subscription_root"
|
||||
sequence="20"
|
||||
name="Configuration"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="subscription_menu"
|
||||
parent="sale_subscription_root"
|
||||
name="Subscriptions"
|
||||
sequence="1"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="sale_subscription_menu"
|
||||
parent="subscription_menu"
|
||||
action="sale_subscription_action"
|
||||
sequence="1"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="product_subscription_menu"
|
||||
parent="subscription_menu"
|
||||
action="subscription_product_template_action"
|
||||
sequence="3"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="subscription_close_reason_menu"
|
||||
parent="sale_subscription_configuration_menu"
|
||||
action="subscription_close_reason_action"
|
||||
sequence="30"
|
||||
name="Close reasons"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user