[FIX]: Fix issue in sale module
authorajay javiya (OpenERP) <aja@tinyerp.com>
Wed, 21 Nov 2012 04:31:26 +0000 (10:01 +0530)
committerajay javiya (OpenERP) <aja@tinyerp.com>
Wed, 21 Nov 2012 04:31:26 +0000 (10:01 +0530)
bzr revid: aja@tinyerp.com-20121121043126-0ej6ij6f0dr7ysn8

addons/account_analytic_analysis/account_analytic_analysis_view.xml
addons/analytic_contract_hr_expense/analytic_contract_hr_expense_view.xml
addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py

index fd32edb..a2431b7 100644 (file)
                                     or view
                                 </span>
 
-                                <span attrs="{'invisible': [('fix_price_to_invoice','&lt;&gt;',0.0)]}" class="oe_grey">
+                                <span attrs="{'invisible': ['|',('fix_price_to_invoice','&lt;&gt;',0.0 ),('partner_id','=',False)]}" class="oe_grey">
                                     No order to invoice, create
-                                </span>
-                                <button name="%(action_sales_order)d" string="Sale Orders"
+                                <button name="%(action_sales_order)d" string="Sale Orders" 
                                     type="action"
                                     class="oe_link"
                                     context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}"
-                                    />
+                                    /></span>
                             </td>
                         </tr><tr>
                             <td class="oe_timesheet_grey">
index 5628846..585aaa1 100644 (file)
@@ -36,6 +36,7 @@
                             <button
                                 name="open_hr_expense"
                                 class="oe_link"
+                                context="{'active_id': active_id}"
                                 string="expenses" type="object"/>
                         </td>
                     </tr>
index 695d589..5c75e27 100644 (file)
@@ -71,7 +71,7 @@ class account_analytic_line(osv.osv):
             partner = account.partner_id
             if (not partner) or not (account.pricelist_id):
                 raise osv.except_osv(_('Analytic Account incomplete !'),
-                        _('Please fill in the Partner or Customer and Sale Pricelist fields in the Analytic Account:\n%s.') % (account.name,))
+                        _('Contract form incomplete. Please fill in the Customer and Pricelist fields the contract form'))