diff --git a/addons/account/account.py b/addons/account/account.py index 7ec3bcde2c8..57356f7d3ef 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1398,7 +1398,7 @@ class account_move(osv.osv): if not l[0]: l[2].update({ 'reconcile_id':False, - 'reconcil_partial_id':False, + 'reconcile_partial_id':False, 'analytic_lines':False, 'invoice':False, 'ref':False, diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 15027b7a8f6..42d42e7ec1b 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -214,7 +214,7 @@ class account_invoice(osv.osv): \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 @@ class account_invoice(osv.osv): '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 ? diff --git a/addons/sale_margin/sale_margin.py b/addons/sale_margin/sale_margin.py index 82a7150b6d1..64e07276c08 100644 --- a/addons/sale_margin/sale_margin.py +++ b/addons/sale_margin/sale_margin.py @@ -70,7 +70,7 @@ class sale_order(osv.osv): return result def _get_order(self, cr, uid, ids, context=None): - return super(self,sale_order)._get_order(cr, uid, ids, context=context) + return super(sale_order, self)._get_order(cr, uid, ids, context=context) _columns = { 'margin': fields.function(_product_margin, string='Margin', help="It gives profitability by calculating the difference between the Unit Price and Cost Price.", store={