[MERGE] generic: set some fields as optional to improve and ease tree views usage

PURPOSE

Purpose of this merge is to set the new attribute OPTIONAL = SHOW/Hide on
tree views so the user can easily hide/show the optional fields on the tree view.

SPECIFICATIONS

contacts (not used as main view but generic to all modules):
* phone: show
* email: show
* city: hide
* state: hide
* country: hide
* next partner review: hide
* level: hide
* activation: hide
* tags: hide
* current membership status: hide

leads
* created on: show
* company name: hide
* contact name: show
* email: show
* phone: show
* city: show
* state: hide
* country: show
* score: hide
* assigned partner: show
* sales team: show
* salesperson: show
* company: show
* tags: hide
* priority: hide

product template
* internal reference: show
* barcode: hide (to move after internal ref)
* website: show
* company: hide
* sales price: show
* cost: show:
* product category: hide
* product type: hide
* quantity on hand: show
* forecast quantity: show (rename to Forecasted Quantity)
* unit of measure: show
* ebay status: show

product product
* internal reference: show
* barcode: hide (to move after internal ref)
* website: show
* company: hide
* public price: show (to rename in Sales price, to be consistent with product template form)
* cost: show:
* product category: hide
* product type: hide
* quantity on hand: show
* forecast quantity: show
* unit of measure: show

quotation
* quotation date: show
* website: show
* sales team: hide (before sales person)
* sales person: show
* company: show
* warehouse: hide
* company: show
* total: show
* status: show
* invoice status: hide
* tags: hide

sales order
* confirmation date: show
* website: show
* sales team: hide
* salesperson: show
* company: show
* warehouse: hide
* total: show
* invoice status: show
* tags: hide

helpdesk tickets
* customer: show
* assigned to: show
* ticket type: hide
* priority: hide
* tags: hide
* stage: show
* company: show

RQP/purchase orders
* vendor reference: hide
* order date: show
* company: show
* scheduled date: show
* Purchase rep: show
* source document: show
* untaxed: hide
* total: show
* status: show

Purchase agreement
* purchase rep: show
* company: show
* ordering date: show
* delivery date: hide
* deadline: show
* source document: show
* status: show

Incoming products
* date: hide (to rename into Creation date)
* source document: show
* status: show

Invoices & bills:
* invoice date: show
* origin: show
* payment reference: hide
* company: show
* sales team: hide
* salesperson: show
* due date: show
* tax excluded: show
* tax: hide
* total: show
* amount due: show
* payment status: hide

Journal entries
* partner: show
* reference: show
* company: show (after journal)

Journal items
* reference: show
* partner: show
* analytic account: show
* matching number: show
* due date: hide

Analytic items
* ref: hide
* tags: hide (after analytic account)
* financial account: hide
* journal item: hide
* partner: hide (before company)
* company: show
* product: hide
* quantity: hide
* unit of measure: hide
* amount: show

Transfers (stock.picking)
* from: show
* to: show
* partner: show
* responsible: hide
* operation type: hide
* company: show
* scheduled date: show
* effective date: hide
* source document: show
* back order of: hide
* status: show
* batch picking: show
* carrier: hide
* tracking ref: hide
* weight: hide
* weight for shipping: hide
* priority: hide

Inventory adjustment
* location: hide (to add after inventory date)
* company: show
* accounting date: hide

Inventory report (stock.quant)
* reserved: hide
* company: show

Lot/serial
* best before: hide (after creation date)
* removal date: hide
* end of life date: hide
* alert date: hide
* created on: show
* internal ref: show

MO
* deadline start: show
* planning start date: hide (rename to planned start date)
* product: show
* bill of material: hide
* source: show
* responsible: hide
* company: show
* quantity: show
* uom: show
* routing: show
* state: show
* material availability: show

BoM
* Reference: show
* variant: show
* version: show
* quantity: show
* unit of measure: show
* bom type: hide
* company: show
* routing: show

Repair order:
* product to repair: show
* product quantity: hide
* uom: hide
* customer: show
* delivery address: show
* warranty expiration: show
* location: hide
* company: show
* status: show

Quality alerts
* product: show
* product variant: hide
* lot: hide
* work center: show
* team: show
* responsible: show
* check: show
* tags: hide
* root cause: hide
* priority: hide
* description: hide
* date assigned: show
* vendor: hide

Quality control points (and reorder tree view according to the list)
* reference
* title: show
* product: show
* product variant: hide
* operation type: show
* operation: hide
* work order operation: hide
* control type: hide
* device: hide
* type: show
* team: show
* responsible: hide
* company: show

Quality checks (add the fields in the following order in the list view)
* product: show
* lot: show
* picking: hide (rename to Transfer)
* checked date: show
* checked by: show
* control point: hide
* team: show
* status: show

Project tasks
* project: show
* assigned to: show
* customer: hide
* tags: hide
* planned hour: show
* remaining hour: show
* deadline: hide
* stage: show
* progress: show
* company: show

LINKS

See task 1997453

closes odoo/odoo#33888

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Robot Odoo
2019-07-30 12:51:36 +02:00
committed by GitHub
33 changed files with 310 additions and 153 deletions
@@ -30,8 +30,11 @@
<field name="inherit_id" ref="analytic.view_account_analytic_line_tree"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='date']" position="after">
<field name="ref" invisible="context.get('to_invoice', False)"/>
<xpath expr="//field[@name='account_id']" position="after">
<field name="ref" invisible="context.get('to_invoice', False)" optional="hide"/>
<field name="general_account_id" optional="hide"/>
<field name="move_id" optional="hide"/>
<field name="product_id" optional="hide"/>
</xpath>
</data>
</field>
+25 -24
View File
@@ -131,24 +131,24 @@
<field eval="100" name="priority"/>
<field name="arch" type="xml">
<tree string="Journal Items" create="false" editable="bottom">
<field name="date"/>
<field name="date" optional="show"/>
<field name="journal_id" options='{"no_open":True}'/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="name"/>
<field name="ref"/>
<field name="name" optional="show"/>
<field name="ref" optional="show"/>
<field name="statement_id" invisible="1"/>
<field name="partner_id"/>
<field name="partner_id" optional="show"/>
<field name="account_id" options="{'no_open': True, 'no_create': True}" domain="[('company_id', '=', company_id)]" groups="account.group_account_user" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="analytic_account_id" groups="account.group_account_user"/>
<field name="analytic_account_id" groups="account.group_account_user" optional="show"/>
<field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags"/>
<field name="reconciled" invisible="1"/>
<field name="full_reconcile_id"/>
<field name="full_reconcile_id" optional="show"/>
<field name="reconcile_model_id" invisible="1"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="amount_currency" readonly="True" groups="base.group_multi_currency"/>
<field name="currency_id" readonly="True" invisible="1" />
<field name="date_maturity"/>
<field name="date_maturity" optional="hide"/>
<field name="company_currency_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="parent_state" invisible="1"/></tree>
@@ -337,10 +337,10 @@
<tree decoration-info="state == 'draft'" string="Journal Entries" decoration-muted="state == 'cancel'">
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="ref"/>
<field name="partner_id" optional="show"/>
<field name="ref" optional="show"/>
<field name="journal_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
<field name="amount_total_signed" sum="Total Amount"/>
<field name="state"/>
<field name="currency_id" invisible="1"/>
@@ -352,25 +352,26 @@
<field name="name">account.invoice.tree</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" string="Invoices" decoration-muted="state == 'cancel'" js_class="account_tree" banner_route="/account/account_invoice_onboarding">
<tree decoration-info="state == 'draft'" string="Invoices" decoration-muted="state == 'cancel'" js_class="account_tree">
<field name="name"/>
<field name="partner_id" invisible="1"/>
<field name="invoice_source_email" invisible="1"/>
<field name="invoice_vendor_icon" string=" "/>
<field name="invoice_vendor_display_name" groups="base.group_user" string="Vendor"/>
<field name="invoice_date"/>
<field name="name"/>
<field name="invoice_payment_ref"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="invoice_date_due"/>
<field name="invoice_origin"/>
<field name="amount_untaxed_signed" string="Tax Excluded" sum="Total"/>
<field name="amount_tax_signed" string="Tax" sum="Total"/>
<field name="amount_total_signed" string="Total" sum="Total"/>
<field name="amount_residual_signed" string="Amount Due" sum="Amount Due"/>
<field name="invoice_vendor_display_name" invisible="context.get('default_type') not in ('in_invoice', 'in_refund','in_receipt')" groups="base.group_user" string="Vendor" />
<field name="invoice_date" optional="show"/>
<field name="invoice_payment_ref" optional="hide"/>
<field name="invoice_user_id" optional="show" invisible="context.get('default_type') not in ('out_invoice', 'out_refund','out_receipt')" string="Sales Person"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" optional="show"/>
<field name="invoice_date_due" optional="show"/>
<field name="invoice_origin" optional="show" string="Source Document"/>
<field name="amount_untaxed_signed" string="Tax Excluded" sum="Total" optional="show"/>
<field name="amount_tax_signed" string="Tax" sum="Total" optional="hide"/>
<field name="amount_total_signed" string="Total" sum="Total" optional="show"/>
<field name="amount_residual_signed" string="Amount Due" sum="Amount Due" optional="show"/>
<field name="currency_id" invisible="1"/>
<field name="company_currency_id" invisible="1"/>
<field name="state"/>
<field name="invoice_payment_state"/>
<field name="state" optional="show"/>
<field name="invoice_payment_state" optional="hide"/>
<field name="type" invisible="context.get('default_type', True)"/>
</tree>
</field>
@@ -97,13 +97,16 @@
<field name="model">account.analytic.line</field>
<field name="arch" type="xml">
<tree string="Analytic Entries">
<field name="date"/>
<field name="date" optional="show"/>
<field name="name"/>
<field name="account_id"/>
<field name="currency_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="unit_amount" sum="Quantity"/>
<field name="amount" sum="Total"/>
<field name="unit_amount" sum="Quantity" optional="hide"/>
<field name="product_uom_id" optional="hide"/>
<field name="partner_id" optional="hide"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
<field name="amount" sum="Total" optional="show"/>
<field name="tag_ids" optional="hide" widget="many2many_tags"/>
</tree>
</field>
</record>
+30 -20
View File
@@ -184,22 +184,27 @@
<field name="arch" type="xml">
<tree string="Leads" decoration-bf="message_needaction==True" decoration-muted="probability == 100">
<field name="date_deadline" invisible="1"/>
<field name="create_date"/>
<field name="create_date" optional="show"/>
<field name="name" string="Lead"/>
<field name="contact_name"/>
<field name="city"/>
<field name="country_id"/>
<field name="email_from"/>
<field name="phone"/>
<field name="user_id" invisible="1"/>
<field name="contact_name" optional="show"/>
<field name="partner_name" optional="hide"/>
<field name="email_from" optional="show"/>
<field name="phone" optional="show"/>
<field name="city" optional="show"/>
<field name="state_id" optional="hide"/>
<field name="country_id" optional="show"/>
<field name="partner_id" invisible="1"/>
<field name="team_id"/>
<field name="team_id" optional="show"/>
<field name="user_id" optional="show" string="Sales Person"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
<field name="active" invisible="1"/>
<field name="probability" invisible="1"/>
<field name="campaign_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="medium_id" invisible="1"/>
<field name="message_needaction" invisible="1"/>
<field name="tag_ids" optional="show" widget="many2many_tags"/>
<field name="priority" optional="hide"/>
</tree>
</field>
</record>
@@ -686,26 +691,31 @@
<field name="arch" type="xml">
<tree string="Opportunities" decoration-bf="message_needaction==True" decoration-muted="probability == 100" decoration-danger="activity_date_deadline and (activity_date_deadline &lt; current_date)">
<field name="date_deadline" invisible="1"/>
<field name="create_date"/>
<field name="create_date" optional="show"/>
<field name="name" string="Opportunity"/>
<field name="partner_id" string="Customer"/>
<field name="country_id"/>
<field name="activity_date_deadline"/>
<field name="activity_summary"/>
<field name="partner_id" string="Customer" optional="show"/>
<field name="email_from" optional="hide"/>
<field name="phone" optional="hide"/>
<field name="city" optional="hide"/>
<field name="state_id" optional="hide"/>
<field name="country_id" optional="show"/>
<field name="activity_date_deadline" optional="show"/>
<field name="activity_summary" optional="show"/>
<field name="medium_id" invisible="1"/>
<field name="campaign_id" invisible="1"/>
<field name="source_id" invisible="1"/>
<field name="stage_id"/>
<field name="planned_revenue" sum="Expected Revenues"/>
<field name="probability" avg="Avg. of Probability"/>
<field name="team_id"/>
<field name="user_id"/>
<field name="stage_id" optional="show"/>
<field name="planned_revenue" sum="Expected Revenues" optional="show"/>
<field name="probability" avg="Avg. of Probability" optional="show"/>
<field name="user_id" optional="hide"/>
<field name="team_id" optional="show"/>
<field name="referred" invisible="1"/>
<field name="priority" invisible="1"/>
<field name="message_needaction" invisible="1"/>
<field name="probability" invisible="1"/>
<field name="write_date" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_id" groups="base.group_multi_company" optional="show" />
<field name="tag_ids" optional="hide" widget="many2many_tags"/>
<field name="priority" optional="hide"/>
</tree>
</field>
</record>
+14
View File
@@ -385,4 +385,18 @@
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="vpicktree_view_tree" model="ir.ui.view">
<field name="name">stock.picking.delivery.tree.inherit.delivery</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.vpicktree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='backorder_id']" position="after">
<field name="carrier_tracking_ref" optional="hide"/>
<field name="carrier_id" optional="hide"/>
<field name="weight" optional="hide"/>
<field name="shipping_weight" optional="hide"/>
</xpath>
</field>
</record>
</odoo>
+3 -5
View File
@@ -148,13 +148,11 @@
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="planned_hours" widget="float_time" sum="Initially Planned Hours" />
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" readonly="1"/>
<field name="planned_hours" widget="float_time" sum="Initially Planned Hours" optional="show"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" readonly="1" optional="show"/>
<field name="progress" widget="progressbar" optional="show"/>
<field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/>
</field>
<field name="stage_id" position="after">
<field name="progress" widget="progressbar"/>
</field>
</field>
</record>
+2 -2
View File
@@ -91,8 +91,8 @@
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<tree string="Contacts">
<field name="category_id" position="after"/>
<field name="membership_state"/>
<field name="category_id" position="after" optional="hide"/>
<field name="membership_state" optional="hide"/>
</tree>
</field>
</record>
+1 -1
View File
@@ -106,7 +106,7 @@ class MrpProduction(models.Model):
date_start = fields.Datetime('Start Date', copy=False, index=True, readonly=True)
date_finished = fields.Datetime('End Date', copy=False, index=True, readonly=True)
date_start_wo = fields.Datetime(
'Planning Start Date', copy=False, readonly=True,
'Planned Start Date', copy=False, readonly=True,
states={'draft': [('readonly', False)], 'confirmed': [('readonly', False)]},
help="The work orders will be planned based on the availability of the work centers starting from "
"this date. If emtpy, the work orders are planned as soon as possible.")
+7 -6
View File
@@ -114,12 +114,13 @@
<field name="active" invisible="1"/>
<field name="sequence" invisible="1"/>
<field name="product_tmpl_id"/>
<field name="code"/>
<field name="product_id" groups="product.group_product_variant"/>
<field name="product_qty"/>
<field name="product_uom_id" groups="uom.group_uom"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="code" optional="show"/>
<field name="product_id" groups="product.group_product_variant" optional="show"/>
<field name="product_qty" optional="show"/>
<field name="product_uom_id" groups="uom.group_uom" optional="show" string="Unit of Measure"/>
<field name="type" optional="hide"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
<field name="routing_id" groups="mrp.group_mrp_routings" optional="show"/>
</tree>
</field>
</record>
+12 -9
View File
@@ -9,15 +9,18 @@
<tree decoration-bf="message_needaction==True" default_order="date_planned_start desc" decoration-info="state=='confirmed'" decoration-danger="date_planned_start&lt;current_date and state not in ('done','cancel')" decoration-muted="state in ('done','cancel')" string="Manufacturing Orders">
<field name="message_needaction" invisible="1"/>
<field name="name"/>
<field name="date_planned_start"/>
<field name="product_id"/>
<field name="origin"/>
<field name="product_qty" sum="Total Qty" string="Quantity"/>
<field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
<field name="state"/>
<field name="reservation_state"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="date_start_wo" optional="hide"/>
<field name="date_planned_start" optional="show"/>
<field name="product_id" optional="show"/>
<field name="product_qty" sum="Total Qty" string="Quantity" optional="show"/>
<field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}" groups="uom.group_uom" optional="show"/>
<field name="bom_id" optional="hide"/>
<field name="origin" optional="show"/>
<field name="user_id" optional="hide"/>
<field name="routing_id" groups="mrp.group_mrp_routings" optional="show"/>
<field name="state" optional="show"/>
<field name="reservation_state" optional="show"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
</tree>
</field>
</record>
@@ -6,13 +6,15 @@
<field name="arch" type="xml">
<tree string="Product">
<field name="sequence" widget="handle"/>
<field name="default_code"/>
<field name="default_code" optional="show"/>
<field name="barcode" optional="hide"/>
<field name="name"/>
<field name="list_price" string="Sales Price"/>
<field name="standard_price"/>
<field name="categ_id"/>
<field name="type"/>
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
<field name="list_price" string="Sales Price" optional="show"/>
<field name="standard_price" optional="show"/>
<field name="categ_id" optional="hide"/>
<field name="type" optional="hide"/>
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" optional="show"/>
<field name="active" invisible="1"/>
</tree>
</field>
+8 -6
View File
@@ -347,15 +347,17 @@
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<tree string="Product Variants">
<field name="default_code"/>
<field name="default_code" optional="show"/>
<field name="barcode" optional="hide"/>
<field name="name"/>
<field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
<field name="lst_price"/>
<field name="standard_price"/>
<field name="type" invisible="1"/>
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
<field name="lst_price" optional="show" string="Sales Price"/>
<field name="standard_price" optional="show"/>
<field name="categ_id" optional="hide"/>
<field name="type" optional="hide"/>
<field name="price" invisible="not context.get('pricelist',False)"/>
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
<field name="barcode"/>
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" optional="show"/>
<field name="product_tmpl_id" invisible="1"/>
<field name="active" invisible="1"/>
</tree>
@@ -35,4 +35,17 @@
</field>
</record>
<record id="view_production_lot_view_tree" model="ir.ui.view">
<field name="name">stock.production.lot.tree.inherit.product.expiry</field>
<field name="model">stock.production.lot</field>
<field name="inherit_id" ref="stock.view_production_lot_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='create_date']" position="after">
<field name="use_date" optional="hide"/>
<field name="removal_date" optional="hide"/>
<field name="life_date" optional="hide"/>
<field name="alert_date" optional="hide"/>
</xpath>
</field>
</record>
</odoo>
+7 -5
View File
@@ -631,11 +631,13 @@
<field name="message_needaction" invisible="1"/>
<field name="sequence" invisible="not context.get('seq_visible', False)"/>
<field name="name"/>
<field name="project_id" invisible="context.get('user_invisible', False)"/>
<field name="user_id" invisible="context.get('user_invisible', False)"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="date_deadline" invisible="context.get('deadline_visible',True)"/>
<field name="stage_id" invisible="context.get('set_visible',False)"/>
<field name="project_id" invisible="context.get('user_invisible', False)" optional="show"/>
<field name="user_id" invisible="context.get('user_invisible', False)" optional="show"/>
<field name="date_deadline" optional="hide"/>
<field name="partner_id" optional="hide"/>
<field name="tag_ids" optional="hide" widget="many2many_tags"/>
<field name="stage_id" invisible="context.get('set_visible',False)" optional="show"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
</tree>
</field>
</record>
+12 -10
View File
@@ -375,6 +375,7 @@
<field name="arch" type="xml">
<search string="Search Purchase Order">
<field name="name" string="Reference"/>
<field name="partner_ref" optional="hide"/>
<field name="partner_id" operator="child_of"/>
<field name="product_id"/>
<field name="create_uid"/>
@@ -454,19 +455,20 @@
<field name="arch" type="xml">
<tree decoration-bf="message_unread==True" decoration-muted="state=='cancel'" decoration-info="state in ('wait','confirmed')" string="Purchase Order">
<field name="message_unread" invisible="1"/>
<field name="partner_ref" optional="hide"/>
<field name="name" string="Reference"/>
<field name="date_order" invisible="not context.get('quotation_only', False)"/>
<field name="date_approve" invisible="context.get('quotation_only', False)"/>
<field name="date_order" invisible="not context.get('quotation_only', False)" optional="show"/>
<field name="date_approve" invisible="context.get('quotation_only', False)" optional="show"/>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="date_planned" invisible="context.get('quotation_only', False)"/>
<field name="user_id"/>
<field name="origin"/>
<field name="amount_untaxed" sum="Total Untaxed amount" string="Untaxed" widget="monetary"/>
<field name="amount_total" sum="Total amount" widget="monetary"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" optional="show"/>
<field name="date_planned" invisible="context.get('quotation_only', False)" optional="show"/>
<field name="user_id" optional="show"/>
<field name="origin" optional="show"/>
<field name="amount_untaxed" sum="Total Untaxed amount" string="Untaxed" widget="monetary" optional="hide"/>
<field name="amount_total" sum="Total amount" widget="monetary" optional="show"/>
<field name="currency_id" invisible="1"/>
<field name="state"/>
<field name="invoice_status" invisible="1"/>
<field name="state" optional="show"/>
<field name="invoice_status" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))]}"/>
</tree>
</field>
</record>
@@ -206,12 +206,13 @@
<tree decoration-bf="message_needaction==True" decoration-muted="state == 'cancel'" decoration-danger="date_end and date_end&lt;current_date" string="Purchase Agreements">
<field name="message_needaction" invisible="1"/>
<field name="name"/>
<field name="user_id"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="ordering_date"/>
<field name="date_end"/>
<field name="origin"/>
<field name="state"/>
<field name="user_id" optional="show"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" optional="show"/>
<field name="ordering_date" optional="show"/>
<field name="schedule_date" optional="hide"/>
<field name="date_end" optional="show"/>
<field name="origin" optional="show"/>
<field name="state" optional="show"/>
</tree>
</field>
</record>
+9 -6
View File
@@ -8,12 +8,15 @@
<field name="arch" type="xml">
<tree string="Repairs order" decoration-muted="state in ('done','cancel')" decoration-info="state=='draft'">
<field name="name" />
<field name="product_id" />
<field name="partner_id"/>
<field name="address_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="guarantee_limit"/>
<field name="state"/>
<field name="product_id" optional="show"/>
<field name="product_qty" optional="hide" string="Quantity"/>
<field name="product_uom" optional="hide" string="Unit of Measure"/>
<field name="partner_id" optional="show"/>
<field name="address_id" optional="show"/>
<field name="guarantee_limit" optional="show"/>
<field name="location_id" optional="hide"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
<field name="state" optional="show"/>
</tree>
</field>
</record>
+24 -8
View File
@@ -187,14 +187,16 @@
<tree string="Sales Orders" decoration-bf="message_needaction==True" decoration-muted="state=='cancel'">
<field name="message_needaction" invisible="1"/>
<field name="name" string="Order Number"/>
<field name="confirmation_date" string="Confirmation Date"/>
<field name="confirmation_date" string="Confirmation Date" optional="show"/>
<field name="commitment_date" groups="sale.group_sale_order_dates"/>
<field name="expected_date" groups="sale.group_sale_order_dates"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="amount_total" sum="Total Tax Included" widget="monetary"/>
<field name="user_id" optional="show"/>
<field name="team_id" optional="hide"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
<field name="amount_total" sum="Total Tax Included" widget="monetary" optional="show"/>
<field name="currency_id" invisible="1"/>
<field name="invoice_status" invisible="1"/>
<field name="invoice_status" optional="show"/>
<field name="state" invisible="1"/>
</tree>
</field>
@@ -208,14 +210,17 @@
<tree string="Quotation" class="o_sale_order" decoration-bf="message_needaction==True" decoration-muted="state=='cancel'">
<field name="message_needaction" invisible="1"/>
<field name="name" string="Quotation Number"/>
<field name="date_order" string="Quotation Date"/>
<field name="date_order" string="Quotation Date" optional="show"/>
<field name="commitment_date" groups="sale.group_sale_order_dates"/>
<field name="expected_date" groups="sale.group_sale_order_dates"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="amount_total" sum="Total Tax Included" widget="monetary"/>
<field name="user_id" optional="show"/>
<field name="team_id" optional="hide"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
<field name="amount_total" sum="Total Tax Included" widget="monetary" optional="show"/>
<field name="currency_id" invisible="1"/>
<field name="state"/>
<field name="state" optional="show"/>
<field name="invoice_status" optional="hide"/>
</tree>
</field>
</record>
@@ -1082,6 +1087,17 @@
</field>
</record>
<record id="account_invoice_view_tree" model="ir.ui.view">
<field name="name">account.move.tree.inherit.sale</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_invoice_tree"/>
<field name="arch" type="xml">
<field name="invoice_user_id" position="after">
<field name="team_id" invisible="context.get('default_type') not in ('out_invoice', 'out_refund','out_receipt')" optional="hide"/>
</field>
</field>
</record>
<!-- Update account invoice !-->
<record model="ir.ui.view" id="account_invoice_form">
<field name="name">Account Invoice</field>
@@ -51,6 +51,28 @@
</field>
</record>
<record id="view_quotation_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.sale.crm</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_status']" position="after">
<field name="tag_ids" optional="hide" widget="many2many_tags"/>
</xpath>
</field>
</record>
<record id="view_order_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.sale.crm</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_status']" position="after">
<field name="tag_ids" optional="hide" widget="many2many_tags"/>
</xpath>
</field>
</record>
<!-- This menu is display in CRM app when sale is installed-->
<menuitem
id="sale_order_menu_quotations_crm"
@@ -42,6 +42,28 @@
</field>
</record>
<record id="view_quotation_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='team_id']" position="after">
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" optional="hide" />
</xpath>
</field>
</record>
<record id="view_order_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='team_id']" position="after">
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" optional="hide"/>
</xpath>
</field>
</record>
<record id="view_order_line_tree_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.line.tree.sale.stock.location</field>
<field name="inherit_id" ref="sale.view_order_line_tree"/>
+4 -4
View File
@@ -41,8 +41,8 @@
<attribute name="decoration-info">type != 'product' or virtual_available&gt;=0</attribute>
</tree>
<field name="price" position="after">
<field name="qty_available" attrs="{'invisible':[('type', '!=', 'product')]}"/>
<field name="virtual_available" attrs="{'invisible':[('type', '!=', 'product')]}"/>
<field name="qty_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show"/>
<field name="virtual_available" attrs="{'invisible':[('type', '!=', 'product')]}" string="Forecasted Quantity" optional="show"/>
</field>
</field>
</record>
@@ -57,8 +57,8 @@
<attribute name="decoration-info">type != 'product' or virtual_available&gt;=0</attribute>
</tree>
<field name="uom_id" position="before">
<field name="qty_available" attrs="{'invisible':[('type', '!=', 'product')]}"/>
<field name="virtual_available" attrs="{'invisible':[('type', '!=', 'product')]}"/>
<field name="qty_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show"/>
<field name="virtual_available" attrs="{'invisible':[('type', '!=', 'product')]}" optional="show"/>
</field>
</field>
</record>
@@ -114,6 +114,8 @@
<tree string="Lot/Serial Number Inventory" decoration-muted="state == 'cancel'">
<field name="name"/>
<field name="date"/>
<field name="location_ids" optional="hide" groups="stock.group_stock_multi_locations"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
<field name="state"/>
</tree>
</field>
+3 -3
View File
@@ -409,17 +409,17 @@
<field name="arch" type="xml">
<tree decoration-muted="state == 'cancel'" default_order='date_expected, picking_id, sequence' string="Moves">
<field name="date_expected" widget='date'/>
<field name="date" widget="date"/>
<field name="date" string="Creation date" widget="date" optional="hide"/>
<field name="picking_id" string="Reference" invisible="1"/>
<field name="sequence" invisible="1"/>
<field name="origin"/>
<field name="origin" optional="show"/>
<field name="product_id"/>
<field name="product_uom_qty"/>
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="uom.group_uom"/>
<field name="location_id" options="{'no_create': True}" invisible="1"/>
<field name="location_dest_id" invisible="1"/>
<field name="create_date" invisible="1"/>
<field name="state"/>
<field name="state" optional="show"/>
</tree>
</field>
</record>
+11 -9
View File
@@ -179,17 +179,19 @@
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" decoration-muted="state == 'cancel'" decoration-danger="state not in ('cancel', 'done') and scheduled_date &lt; current_date" string="Picking list">
<field name="name"/>
<field name="location_id" options="{'no_create': True}" string="From" groups="stock.group_stock_multi_locations"/>
<field name="location_dest_id" options="{'no_create': True}" string="To" groups="stock.group_stock_multi_locations"/>
<field name="partner_id"/>
<field name="location_id" options="{'no_create': True}" string="From" groups="stock.group_stock_multi_locations" optional="show"/>
<field name="location_dest_id" options="{'no_create': True}" string="To" groups="stock.group_stock_multi_locations" optional="show"/>
<field name="partner_id" optional="show"/>
<field name="user_id" optional="hide"/>
<field name="date" invisible="1"/>
<field name="scheduled_date"/>
<field name="origin"/>
<field name="scheduled_date" optional="show"/>
<field name="origin" optional="show"/>
<field name="group_id" invisible="1"/>
<field name="backorder_id"/>
<field name="state"/>
<field name="priority" invisible="1"/>
<field name="picking_type_id" invisible="1"/>
<field name="backorder_id" optional="hide"/>
<field name="state" optional="show"/>
<field name="priority" optional="hide"/>
<field name="picking_type_id" optional="hide"/>
<field name="company_id" groups="base.group_multi_company" optional="show"/>
</tree>
</field>
</record>
@@ -53,9 +53,9 @@
<field name="arch" type="xml">
<tree string="Lots/Serial Numbers">
<field name="name"/>
<field name="ref"/>
<field name="ref" optional="show"/>
<field name="product_id"/>
<field name="create_date"/>
<field name="create_date" optional="show"/>
</tree>
</field>
</record>
+2 -2
View File
@@ -98,13 +98,13 @@
<field name="owner_id" groups="stock.group_tracking_owner"
attrs="{'readonly': [('id', '!=', False)]}"
options="{'no_create': True}"/>
<field name="reserved_quantity"/>
<field name="quantity" string="On Hand Quantity"
invisible="1"/>
<field name="inventory_quantity" string="On Hand Quantity"
readonly="0"/>
<field name="reserved_quantity" optional="hide"/>
<field name="product_uom_id" groups="uom.group_uom"/>
<field name='company_id' groups="base.group_multi_company"/>
<field name='company_id' groups="base.group_multi_company" optional="show"/>
</tree>
</field>
</record>
@@ -30,6 +30,17 @@
</field>
</record>
<record id="view_inventory_tree" model="ir.ui.view">
<field name="name">stock.inventory.tree.inherit.stock.account</field>
<field name="model">stock.inventory</field>
<field name="inherit_id" ref="stock.view_inventory_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='company_id']" position="after">
<field name="accounting_date" optional="hide"/>
</xpath>
</field>
</record>
<record id="view_location_form_inherit" model="ir.ui.view">
<field name="name">stock.location.form.inherit</field>
<field name="model">stock.location</field>
@@ -132,8 +132,8 @@
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.vpicktree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='picking_type_id']" position="after">
<field name="batch_id"/>
<xpath expr="//field[@name='state']" position="before">
<field name="batch_id" optional="show"/>
</xpath>
</field>
</record>
@@ -37,8 +37,8 @@
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_tree_view_oppor"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="partner_assigned_id"/>
<field name="user_id" position="before">
<field name="partner_assigned_id" optional="show"/>
<field name="date_assign" invisible="1"/>
</field>
</field>
@@ -99,7 +99,7 @@
<field name="inherit_id" ref="crm.crm_case_tree_view_leads"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="partner_assigned_id"/>
<field name="partner_assigned_id" optional="show"/>
</field>
</field>
</record>
@@ -93,9 +93,9 @@
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="date_review_next"/>
<field name="grade_id"/>
<field name="activation"/>
<field name="date_review_next" optional="hide"/>
<field name="grade_id" optional="hide"/>
<field name="activation" optional="hide"/>
</field>
</field>
</record>
+2 -2
View File
@@ -29,7 +29,7 @@
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="website_id" groups="website.group_multi_website"/>
<field name="website_id" groups="website.group_multi_website" optional="show"/>
</field>
</field>
</record>
@@ -41,7 +41,7 @@
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="website_id" groups="website.group_multi_website"/>
<field name="website_id" groups="website.group_multi_website" optional="show"/>
</field>
</field>
</record>
@@ -270,4 +270,26 @@
</field>
</field>
</record>
<record id="view_quotation_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.website.sale</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="before">
<field name="website_id" optional="show"/>
</xpath>
</field>
</record>
<record id="view_order_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.website.sale</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="before">
<field name="website_id" optional="show"/>
</xpath>
</field>
</record>
</odoo>
+5 -3
View File
@@ -46,12 +46,14 @@
<tree string="Contacts">
<field name="display_name" string="Name"/>
<field name="function" invisible="1"/>
<field name="phone"/>
<field name="email"/>
<field name="phone" optional="show"/>
<field name="email" optional="show"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="city" optional="hide"/>
<field name="state_id" optional="hide"/>
<field name="country_id" optional="hide"/>
<field name="user_id" invisible="1"/>
<field name="is_company" invisible="1"/>
<field name="country_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="active" invisible="1"/>
</tree>