2008-09-10 17:56:00 +00:00
|
|
|
<openerp>
|
2008-08-19 19:42:11 +00:00
|
|
|
<data>
|
|
|
|
|
|
|
|
<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"/>
|
2008-09-17 09:10:14 +00:00
|
|
|
<field name="priority">36</field>
|
[FIX] *: accesses of views concernings specific groups
If the whole view relates to a specific group,
apply the group on the view itself instead of
each view part (each fields, each page, each div,...),
so the view is loaded / added to the base view
only if the user is in the right group.
So the view is not loaded uselessly
and the fields are not read for nothing
(performances & security).
Indeed, when a group is applied on a field itself, the field content
is read, but hidden, therefore reading the content of the field
uselessly, and potentially leading to accesses issues
if the user hasn't the rights to read the field.
(e.g. reading a property when not having access to the model
of the proprty, pricelists on partners for instance)
opw-634402
2015-05-12 09:20:14 +00:00
|
|
|
<field name="groups_id" eval="[(4, ref('product.group_purchase_pricelist'))]"/>
|
2008-08-19 19:42:11 +00:00
|
|
|
<field name="arch" type="xml">
|
2012-06-18 16:00:57 +00:00
|
|
|
<field name="property_product_pricelist" position="after">
|
[FIX] *: accesses of views concernings specific groups
If the whole view relates to a specific group,
apply the group on the view itself instead of
each view part (each fields, each page, each div,...),
so the view is loaded / added to the base view
only if the user is in the right group.
So the view is not loaded uselessly
and the fields are not read for nothing
(performances & security).
Indeed, when a group is applied on a field itself, the field content
is read, but hidden, therefore reading the content of the field
uselessly, and potentially leading to accesses issues
if the user hasn't the rights to read the field.
(e.g. reading a property when not having access to the model
of the proprty, pricelists on partners for instance)
opw-634402
2015-05-12 09:20:14 +00:00
|
|
|
<field name="property_product_pricelist_purchase"/>
|
2012-06-18 16:00:57 +00:00
|
|
|
</field>
|
2008-08-19 19:42:11 +00:00
|
|
|
</field>
|
|
|
|
</record>
|
2012-07-25 06:58:25 +00:00
|
|
|
|
|
|
|
<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'))]"/>
|
2012-09-29 22:08:39 +00:00
|
|
|
<field name="help" type="html">
|
|
|
|
<p class="oe_view_nocontent_create">
|
|
|
|
This supplier has no purchase order. Click to create a new RfQ.
|
|
|
|
</p><p>
|
|
|
|
The request for quotation is the first step of the purchases flow. Once
|
2014-07-16 09:58:22 +00:00
|
|
|
converted into a purchase order, you will be able to control the receipt
|
2012-09-29 22:08:39 +00:00
|
|
|
of the products and the supplier invoice.
|
|
|
|
</p>
|
2012-07-25 06:58:25 +00:00
|
|
|
</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"/>
|
2014-08-13 14:14:56 +00:00
|
|
|
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
|
2012-07-25 06:58:25 +00:00
|
|
|
<field name="arch" type="xml">
|
|
|
|
<field name="mobile" position="after">
|
|
|
|
<field name="purchase_order_count"/>
|
|
|
|
</field>
|
2014-08-07 15:08:16 +00:00
|
|
|
|
2012-07-27 07:20:53 +00:00
|
|
|
<xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
|
|
|
|
<a name="%(purchase.act_res_partner_2_purchase_order)d" type="action" t-if="record.purchase_order_count.value>0">
|
2012-07-25 06:58:25 +00:00
|
|
|
<t t-esc="record.purchase_order_count.value"/> Purchases
|
|
|
|
</a>
|
|
|
|
</xpath>
|
|
|
|
</field>
|
|
|
|
</record>
|
2012-07-25 10:46:34 +00:00
|
|
|
|
|
|
|
<record id="act_res_partner_2_supplier_invoices" model="ir.actions.act_window">
|
|
|
|
<field name="name">Supplier Invoices</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>
|
2012-09-29 22:08:39 +00:00
|
|
|
<field name="help" type="html">
|
|
|
|
<p class="oe_view_nocontent_create">
|
|
|
|
Click here to record a supplier invoice.
|
|
|
|
</p><p>
|
|
|
|
Supplier invoices can be pre-generated based on purchase
|
2014-07-16 09:58:22 +00:00
|
|
|
orders or receipts. This allows you to control invoices
|
2012-09-29 22:08:39 +00:00
|
|
|
you receive from your supplier according to the draft
|
2014-07-09 11:39:38 +00:00
|
|
|
document in Odoo.
|
2012-09-29 22:08:39 +00:00
|
|
|
</p>
|
2012-07-25 10:46:34 +00:00
|
|
|
</field>
|
|
|
|
</record>
|
2012-07-25 06:58:25 +00:00
|
|
|
|
|
|
|
<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"/>
|
2014-08-19 08:29:35 +00:00
|
|
|
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
|
2012-07-25 06:58:25 +00:00
|
|
|
<field name="arch" type="xml">
|
|
|
|
<xpath expr="//div[@name='buttons']" position="inside">
|
2014-03-25 12:45:31 +00:00
|
|
|
<button class="oe_inline oe_stat_button" name="%(purchase.act_res_partner_2_purchase_order)d" type="action"
|
2014-08-19 08:29:35 +00:00
|
|
|
attrs="{'invisible': [('supplier', '=', False)]}" icon="fa-shopping-cart">
|
2014-04-04 11:29:26 +00:00
|
|
|
<field string="Purchases" name="purchase_order_count" widget="statinfo"/>
|
2014-03-25 12:45:31 +00:00
|
|
|
</button>
|
2014-08-19 08:29:35 +00:00
|
|
|
</xpath>
|
|
|
|
</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"/>
|
2015-08-06 08:02:35 +00:00
|
|
|
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
|
2014-08-19 08:29:35 +00:00
|
|
|
<field name="arch" type="xml">
|
|
|
|
<xpath expr="//div[@name='buttons']" position="inside">
|
2014-03-25 12:45:31 +00:00
|
|
|
<button class="oe_inline oe_stat_button" name="%(purchase.act_res_partner_2_supplier_invoices)d" type="action"
|
2014-08-19 08:29:35 +00:00
|
|
|
attrs="{'invisible': [('supplier', '=', False)]}" icon="fa-pencil-square-o" help="Supplier Invoices">
|
2014-04-15 13:18:18 +00:00
|
|
|
<field string="Supplier Inv." name="supplier_invoice_count" widget="statinfo"/>
|
2014-03-25 12:45:31 +00:00
|
|
|
</button>
|
2012-07-25 06:58:25 +00:00
|
|
|
</xpath>
|
|
|
|
</field>
|
|
|
|
</record>
|
2008-08-19 19:42:11 +00:00
|
|
|
</data>
|
2008-09-10 17:56:00 +00:00
|
|
|
</openerp>
|