Jignesh Rathod(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1004283-jir into 
lp:openobject-addons.

Requested reviews:
  Amit Parik (OpenERP) (amp-openerp)
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1004283 in OpenERP Addons: "On account.invoice check_total field wrong 
declaration"
  https://bugs.launchpad.net/openobject-addons/+bug/1004283

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1004283-jir/+merge/107334

Hello,

Currently 'close' state is not define in account_invouce.py.
So replacing a 'close' state to 'cancel' in field 'date_due' and 'check_total'.
For 'check_total' it should also a read only when state 'paid' .

Thank you!

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1004283-jir/+merge/107334
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1004283-jir.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2012-08-22 08:55:13 +0000
+++ account/account_invoice.py	2012-08-24 11:08:54 +0000
@@ -214,7 +214,7 @@
             \n* The \'Cancelled\' state is used when user cancel invoice.'),
         'sent': fields.boolean('Sent', readonly=True, help="It indicates that the invoice has been sent."),
         'date_invoice': fields.date('Invoice Date', readonly=True, states={'draft':[('readonly',False)]}, select=True, help="Keep empty to use the current date"),
-        'date_due': fields.date('Due Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, select=True,
+        'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}, select=True,
             help="If you use payment terms, the due date will be computed automatically at the generation "\
                 "of accounting entries. If you keep the payment term and the due date empty, it means direct payment. The payment term may compute several due dates, for example 50% now, 50% in one month."),
         'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, readonly=True, required=True, states={'draft':[('readonly',False)]}),
@@ -253,7 +253,7 @@
         'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
         'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
         'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
-        'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Account'), states={'open':[('readonly',True)],'close':[('readonly',True)]}),
+        'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
         'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean',
             store={
                 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ?

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to