[14.0][MIG] agreement_serviceprofile (Version 12.0 to 14.0)

[MIG] Black

[MIG] Black
This commit is contained in:
Patrick Wilson
2021-05-04 13:49:14 -06:00
committed by Olga Marco
parent 7a4e3df740
commit 2e19f4a2ba
14 changed files with 290 additions and 147 deletions

View File

@@ -1,33 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Agreement Form View -->
<record id="agreement_fsm_order_form_view" model="ir.ui.view">
<field name="name">agreement.form.fsm.order.view</field>
<field name="model">agreement</field>
<field name="inherit_id" ref="agreement_legal.partner_agreement_form_view"/>
<field name="inherit_id" ref="agreement_legal.partner_agreement_form_view" />
<field name="arch" type="xml">
<notebook position="inside">
<page name="serviceprofiles" string="Service Profiles">
<field name="serviceprofile_ids">
<tree>
<field name="name"/>
<field name="product_id"/>
<field name="product_variant_id"/>
<field name="name" />
<field name="product_id" />
<field name="product_variant_id" />
</tree>
<form>
<group>
<group>
<field name="name"/>
<field name="name" />
</group>
<group>
<field name="use_product_variant"/>
<field name="product_variant_id" context="{'default_is_serviceprofile': True, 'default_type': 'service'}" attrs="{'invisible': [('use_product_variant', '=', False)], 'required': [('use_product_variant','!=', False)]}"/>
<field name="product_id" context="{'default_is_serviceprofile': True, 'default_type': 'service'}" attrs="{'invisible': [('use_product_variant', '!=', False)], 'required': [('use_product_variant','=', False)]}"/>
<field name="use_product_variant" />
<field
name="product_variant_id"
context="{'default_is_serviceprofile': True, 'default_type': 'service'}"
attrs="{'invisible': [('use_product_variant', '=', False)], 'required': [('use_product_variant','!=', False)]}"
/>
<field
name="product_id"
context="{'default_is_serviceprofile': True, 'default_type': 'service'}"
attrs="{'invisible': [('use_product_variant', '!=', False)], 'required': [('use_product_variant','=', False)]}"
/>
</group>
</group>
<group string="Notes">
<field name="notes" nolabel="1"
placeholder="Add notes here..."/>
<field
name="notes"
nolabel="1"
placeholder="Add notes here..."
/>
</group>
</form>
</field>

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Agreement Service Profile List View-->
@@ -7,12 +6,12 @@
<field name="model">agreement.serviceprofile</field>
<field name="arch" type="xml">
<tree string="Service Profiles" default_order='agreement_id'>
<field name="name"/>
<field name="agreement_id"/>
<field name="partner_id"/>
<field name="product_id"/>
<field name="product_variant_id"/>
<field name="active" invisible="1"/>
<field name="name" />
<field name="agreement_id" />
<field name="partner_id" />
<field name="product_id" />
<field name="product_variant_id" />
<field name="active" invisible="1" />
</tree>
</field>
</record>
@@ -24,42 +23,54 @@
<field name="arch" type="xml">
<form string="Service Profile">
<header>
<field name="stage_id" widget="statusbar"
clickable="True"
options="{'fold_field': 'fold'}"
domain="[('stage_type', '=', 'serviceprofile')]"/>
<field
name="stage_id"
widget="statusbar"
clickable="True"
options="{'fold_field': 'fold'}"
domain="[('stage_type', '=', 'serviceprofile')]"
/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options="{'terminology': 'archive'}"/>
</button>
</div>
<div class="oe_button_box" name="button_box" />
<widget
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<field name="active" invisible="1" />
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<label for="name" class="oe_edit_only" />
<h1>
<field name="name"/>
<field name="name" />
</h1>
</div>
<group>
<group>
<field name="agreement_id"/>
<field name="agreement_id" />
</group>
<group>
<field name="product_id" context="{'default_is_serviceprofile': True, 'default_type': 'service'}" attrs="{'invisible': [('use_product_variant', '!=', False)], 'required': [('use_product_variant','=', False)]}"/>
<field name="product_variant_id" context="{'default_is_serviceprofile': True, 'default_type': 'service'}" attrs="{'invisible': [('use_product_variant', '=', False)], 'required': [('use_product_variant','!=', False)]}"/>
<field name="use_product_variant"/>
<field
name="product_id"
context="{'default_is_serviceprofile': True, 'default_type': 'service'}"
attrs="{'invisible': [('use_product_variant', '!=', False)], 'required': [('use_product_variant','=', False)]}"
/>
<field
name="product_variant_id"
context="{'default_is_serviceprofile': True, 'default_type': 'service'}"
attrs="{'invisible': [('use_product_variant', '=', False)], 'required': [('use_product_variant','!=', False)]}"
/>
<field name="use_product_variant" />
</group>
</group>
<group string="Notes">
<field name="notes" nolabel="1" widget="html"/>
<field name="notes" nolabel="1" widget="html" />
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
</form>
</field>
@@ -76,10 +87,10 @@
<div class="oe_kanban_content">
<div>
<strong class="o_kanban_record_title">
<field name="name"/>
<field name="name" />
</strong>
</div>
<div class="oe_clear"/>
<div class="oe_clear" />
</div>
</t>
</templates>
@@ -93,15 +104,25 @@
<field name="model">agreement.serviceprofile</field>
<field name="arch" type="xml">
<search>
<filter string="Agreement" name="group_agreement"
icon="terp-partner"
context="{'group_by': 'agreement_id'}"/>
<filter string="Product" name="group_product"
icon="terp-product"
context="{'group_by': 'product_id'}"/>
<filter string="Product Variant" name="group_product"
icon="terp-product"
context="{'group_by': 'product_variant_id'}"/>
<field name="name" />
<filter
string="Agreement"
name="group_agreement"
icon="terp-partner"
context="{'group_by': 'agreement_id'}"
/>
<filter
string="Product"
name="group_product"
icon="terp-product"
context="{'group_by': 'product_id'}"
/>
<filter
string="Product Variant"
name="group_product"
icon="terp-product"
context="{'group_by': 'product_variant_id'}"
/>
</search>
</field>
</record>
@@ -120,17 +141,19 @@
</record>
<menuitem
name="Service Profiles"
id="agreement_serviceprofiles"
parent="agreement_legal.agreement_masterdata"
sequence="50"
action="agreement_serviceprofile_action"/>
name="Service Profiles"
id="agreement_serviceprofiles"
parent="agreement_legal.agreement_masterdata"
sequence="50"
action="agreement_serviceprofile_action"
/>
<menuitem
name="Service Profiles"
id="dashboard_serviceprofiles"
parent="agreement_legal.agreement_dashboard"
sequence="20"
action="agreement_serviceprofile_dashboard"/>
name="Service Profiles"
id="dashboard_serviceprofiles"
parent="agreement_legal.agreement_dashboard"
sequence="20"
action="agreement_serviceprofile_dashboard"
/>
</odoo>

View File

@@ -6,15 +6,15 @@
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.form.view</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="inherit_id" ref="product.product_template_form_view" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page id="agreement" string="Service">
<group>
<group id="agreement_left">
<field name="is_serviceprofile"/>
<field name="is_serviceprofile" />
</group>
<group id="agreement_right"/>
<group id="agreement_right" />
</group>
</page>
</xpath>
@@ -25,15 +25,15 @@
<record id="product_product_form_view" model="ir.ui.view">
<field name="name">product.product.form.view</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page id="agreement" string="Service">
<group>
<group id="agreement_left">
<field name="is_serviceprofile"/>
<field name="is_serviceprofile" />
</group>
<group id="agreement_right"/>
<group id="agreement_right" />
</group>
</page>
</xpath>