[IMP] purchase: misc usability improvements

- RFQ wording imp
- products tree view in purchase form view: set account_analytic_id
for group_analytic_accounting only + add a context for the partner
- purchase: res_config: wording imp + config view imp
This commit is contained in:
cod-odoo
2014-08-12 10:02:55 +02:00
committed by Thibault Delavallée
parent 0107571f66
commit b3494fc042
5 changed files with 12 additions and 7 deletions
@@ -35,7 +35,7 @@
<p>Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}: </p>
<p style="border-left: 1px solid #8e0000; margin-left: 30px;">
&nbsp;&nbsp;<strong>REFERENCES</strong><br />
&nbsp;&nbsp;<strong>OUR REFERENCES</strong><br />
&nbsp;&nbsp;RFQ number: <strong>${object.name}</strong><br />
&nbsp;&nbsp;RFQ date: ${object.date_order}<br />
% if object.origin:
@@ -109,7 +109,7 @@
<p>Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}: </p>
<p style="border-left: 1px solid #8e0000; margin-left: 30px;">
&nbsp;&nbsp;<strong>REFERENCES</strong><br />
&nbsp;&nbsp;<strong>OUR REFERENCES</strong><br />
&nbsp;&nbsp;Order number: <strong>${object.name}</strong><br />
&nbsp;&nbsp;Order total: <strong>${object.amount_total} ${object.currency_id.name}</strong><br />
&nbsp;&nbsp;Order date: ${object.date_order}<br />
+1 -1
View File
@@ -252,7 +252,7 @@ class purchase_order(osv.osv):
help="It indicates that an invoice has been validated"),
'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'),
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Based on incoming shipments')], 'Invoicing Control', required=True,
readonly=True, states={'draft':[('readonly',False)], 'sent':[('readonly',False)]},
readonly=True, states={'draft':[('readonly',False)], 'sent':[('readonly',False)],'bid':[('readonly',False)]},
help="Based on Purchase Order lines: place individual lines in 'Invoice Control / On Purchase Order lines' from where you can selectively create an invoice.\n" \
"Based on generated invoice: create a draft invoice you can validate later.\n" \
"Based on incoming shipments: let you create an invoice when receipts are validated."
+2 -2
View File
@@ -47,7 +47,7 @@
<menuitem
action="purchase_pricelist_version_action" id="menu_purchase_pricelist_version_action"
parent="menu_purchase_config_pricelist" sequence="2" groups="product.group_purchase_pricelist"/>
<menuitem
action="product.product_price_type_action" id="menu_product_pricelist_action2_purchase_type"
parent="menu_purchase_config_pricelist" sequence="60" />
@@ -240,7 +240,7 @@
<field name="name"/>
<field name="date_planned"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="account_analytic_id" groups="purchase.group_analytic_accounting" domain="[('type','not in',('view','template'))]"/>
<field name="account_analytic_id" context="{'default_partner_id':parent.partner_id}" groups="purchase.group_analytic_accounting" domain="[('type','not in',('view','template'))]"/>
<field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,parent.state,context)"/>
<field name="product_uom" groups="product.group_uom" on_change="onchange_product_uom(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,parent.state,context)"/>
<field name="price_unit"/>
+2 -2
View File
@@ -62,7 +62,7 @@ class purchase_config_settings(osv.osv_memory):
'-This installs the module purchase_analytic_plans.'),
'group_analytic_account_for_purchases': fields.boolean('Analytic accounting for purchases',
implied_group='purchase.group_analytic_accounting',
help="Allows you to specify an analytic account on purchase orders."),
help="Allows you to specify an analytic account on purchase order lines."),
'module_stock_dropshipping': fields.boolean("Manage dropshipping",
help='\nCreates the dropship route and add more complex tests'
'-This installs the module stock_dropshipping.'),
@@ -88,7 +88,7 @@ class account_config_settings(osv.osv_memory):
'-This installs the module purchase_analytic_plans.'),
'group_analytic_account_for_purchases': fields.boolean('Analytic accounting for purchases',
implied_group='purchase.group_analytic_accounting',
help="Allows you to specify an analytic account on purchase orders."),
help="Allows you to specify an analytic account on purchase order lines."),
}
def onchange_purchase_analytic_plans(self, cr, uid, ids, module_purchase_analytic_plans, context=None):
+5
View File
@@ -44,6 +44,11 @@
<div>
<field name="module_warning" class="oe_inline"/>
<label for="module_warning"/>
<span class="oe_grey">
<p attrs="{'invisible': [('module_warning','=',False)]}">
The Sales Management module will also be installed.
</p>
</span>
</div>
</div>
</group>