[IMP] purchase: misc usability improvements
authorcod-odoo <cod@openerp.com>
Wed, 25 Jun 2014 10:23:54 +0000 (15:53 +0530)
committerThibault Delavallée <tde@openerp.com>
Tue, 12 Aug 2014 08:02:55 +0000 (10:02 +0200)
- 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

addons/purchase/edi/purchase_order_action_data.xml
addons/purchase/purchase.py
addons/purchase/purchase_view.xml
addons/purchase/res_config.py
addons/purchase/res_config_view.xml

index 391c61a..d232d36 100644 (file)
@@ -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:
     <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 />
index 99efd15..6358f65 100644 (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."
index 8402f99..ff4c7e8 100644 (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" />
                                     <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"/>
index 50525b1..4badaa5 100644 (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):
index 53e3fdb..d54adf5 100644 (file)
                             <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>