Files
odoo_source/addons/purchase/views/res_partner_views.xml
T
Alexandre Kühn a87d761fdb [IMP] core: menu tip ux/ui improvement
We would like to make the "no item found" screens more appealing.

Before this commit, it shows a small help tip in the top-left
corner of the screen, just below the "Create" button.

With this commit, these help tips have been replaced by onboarding
screens, which consist of a picture and some text below, both of which
are horizontally centered.

The texts have been slightly changed, so that they are shorter and clearer.

Considered modules:

(A)
    account,
    account_asset,
    account_budget,
    account_test,
    account_voucher,
    analytic
(B)
    barcodes,
    base,
    base_automation,
    board
(C)
    calendar,
    contacts,
    crm
(D)
    delivery
(E)
    event
(F)
    fleet
(G)
    gamification,
    google_drive
(H)
    hr,
    hr_attendance,
    hr_contract,
    hr_expense,
    hr_gamification,
    hr_holidays,
    hr_payroll,
    hr_recruitment,
    hr_timesheet
(I)
    im_livechat
(L)
    l10n_fr_sale_closing,
    link_tracker,
    lunch
(M)
    mail,
    maintenance,
    mass_mailing,
    membership,
    mrp
(N)
    note
(P)
    payment,
    point_of_sale,
    post_mercury,
    pos_restaurant,
    product,
    project,
    purchase,
    purchase_requisition
(R)
    rating,
    repair,
    resource
(S)
    sale,
    sale_timesheet,
    sales_team,
    stock,
    stock_account,
    stock_landed_costs,
    stock_picking_batch,
    survey
(U)
    utm
(W)
    web,
    website,
    website_blog,
    website_customer,
    website_event_track,
    website_forum,
    website_quote,
    website_sale,
    website_sale_digital,
    website_slides
2018-01-18 21:43:29 +01:00

109 lines
6.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_property_form" model="ir.ui.view">
<field name="name">res.partner.purchase.property.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="priority">36</field>
<field name="groups_id" eval="[(4, ref('base.group_multi_currency'))]"/>
<field name="arch" type="xml">
<group name="purchase" position="inside">
<field name="property_purchase_currency_id" options="{'no_create': True, 'no_open': True}"/>
</group>
</field>
</record>
<record id="act_res_partner_2_purchase_order" model="ir.actions.act_window">
<field name="name">RFQs and Purchases</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_partner_id': active_id}</field>
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
This vendor has no purchase order. Create a new RfQ
</p><p>
The request for quotation is the first step of the purchases flow. Once
converted into a purchase order, you will be able to control the receipt
of the products and the vendor bill.
</p>
</field>
</record>
<!-- Partner kanban view inherited -->
<record model="ir.ui.view" id="purchase_partner_kanban_view">
<field name="name">res.partner.kanban.purchaseorder.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
<field name="arch" type="xml">
<field name="mobile" position="after">
<field name="purchase_order_count"/>
</field>
<xpath expr="//div[hasclass('oe_kanban_partner_links')]" position="inside">
<span t-if="record.purchase_order_count.value>0" class="badge"><i class="fa fa-fw fa-shopping-cart"/><t t-esc="record.purchase_order_count.value"/></span>
</xpath>
</field>
</record>
<record id="act_res_partner_2_supplier_invoices" model="ir.actions.act_window">
<field name="name">Vendor Bills</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="domain">[('type','=','in_invoice')]</field>
<field name="context">{'search_default_partner_id': active_id, 'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase'}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Record a new vendor bill
</p><p>
Vendors bills can be pre-generated based on purchase
orders or receipts. This allows you to control bills
you receive from your vendor according to the draft
document in Odoo.
</p>
</field>
</record>
<record id="res_partner_view_purchase_buttons" model="ir.ui.view">
<field name="name">res.partner.view.purchase.buttons</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="priority" eval="20"/>
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
<field name="arch" type="xml">
<button name="toggle_active" position="before">
<button class="oe_stat_button" name="%(purchase.act_res_partner_2_purchase_order)d" type="action"
attrs="{'invisible': [('supplier', '=', False)]}" icon="fa-shopping-cart">
<field string="Purchases" name="purchase_order_count" widget="statinfo"/>
</button>
</button>
<page name="internal_notes" position="inside">
<group colspan="2" col="2" groups="purchase.group_warning_purchase">
<separator string="Warning on the Purchase Order" colspan="4"/>
<field name="purchase_warn" nolabel="1" />
<field name="purchase_warn_msg" colspan="3" nolabel="1"
attrs="{'required':[('purchase_warn', '!=', False), ('purchase_warn','!=','no-message')],'readonly':[('purchase_warn','=','no-message')]}"/>
</group>
</page>
</field>
</record>
<record id="res_partner_view_purchase_account_buttons" model="ir.ui.view">
<field name="name">res.partner.view.purchase.account.buttons</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="priority" eval="20"/>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml">
<button name="toggle_active" position="before">
<button class="oe_stat_button" name="%(purchase.act_res_partner_2_supplier_invoices)d" type="action"
attrs="{'invisible': [('supplier', '=', False)]}" icon="fa-pencil-square-o" help="Vendor Bills">
<field string="Vendor Bills" name="supplier_invoice_count" widget="statinfo"/>
</button>
</button>
</field>
</record>
</odoo>