From 8197f130f3f49c90bc6847e4ed339c16466cd961 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 1 Sep 2010 10:41:44 +0530 Subject: [PATCH] [IMP] account_payment: put attrs on schedule if fixed (readonly if not fixed) + rename that field (schedule date) bzr revid: mra@mra-laptop-20100901051144-jarlb1vncdi5j2u1 --- addons/account_payment/account_payment.py | 10 +++++----- addons/account_payment/account_payment_view.xml | 4 ++-- addons/account_payment/i18n/account_payment.pot | 4 ++-- addons/account_payment/i18n/ar.po | 4 ++-- addons/account_payment/i18n/bg.po | 4 ++-- addons/account_payment/i18n/bs.po | 4 ++-- addons/account_payment/i18n/ca.po | 4 ++-- addons/account_payment/i18n/cs.po | 4 ++-- addons/account_payment/i18n/de.po | 4 ++-- addons/account_payment/i18n/el.po | 4 ++-- addons/account_payment/i18n/es.po | 4 ++-- addons/account_payment/i18n/es_AR.po | 4 ++-- addons/account_payment/i18n/et.po | 4 ++-- addons/account_payment/i18n/fi.po | 4 ++-- addons/account_payment/i18n/fr.po | 4 ++-- addons/account_payment/i18n/hi.po | 4 ++-- addons/account_payment/i18n/hr.po | 4 ++-- addons/account_payment/i18n/hu.po | 4 ++-- addons/account_payment/i18n/id.po | 4 ++-- addons/account_payment/i18n/it.po | 4 ++-- addons/account_payment/i18n/ko.po | 4 ++-- addons/account_payment/i18n/lt.po | 4 ++-- addons/account_payment/i18n/mn.po | 4 ++-- addons/account_payment/i18n/nl.po | 4 ++-- addons/account_payment/i18n/nl_BE.po | 4 ++-- addons/account_payment/i18n/oc.po | 4 ++-- addons/account_payment/i18n/pl.po | 4 ++-- addons/account_payment/i18n/pt.po | 4 ++-- addons/account_payment/i18n/pt_BR.po | 4 ++-- addons/account_payment/i18n/ro.po | 4 ++-- addons/account_payment/i18n/ru.po | 4 ++-- addons/account_payment/i18n/sl.po | 4 ++-- addons/account_payment/i18n/sq.po | 4 ++-- addons/account_payment/i18n/sv.po | 4 ++-- addons/account_payment/i18n/tlh.po | 4 ++-- addons/account_payment/i18n/tr.po | 4 ++-- addons/account_payment/i18n/uk.po | 4 ++-- addons/account_payment/i18n/vi.po | 4 ++-- addons/account_payment/i18n/zh_CN.po | 4 ++-- addons/account_payment/i18n/zh_TW.po | 4 ++-- addons/account_payment/wizard/account_payment_order.py | 2 +- addons/l10n_ch/wizard/create_dta.py | 4 ++-- 42 files changed, 86 insertions(+), 86 deletions(-) diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py index a27a2d2e72d..149ec5eaad8 100644 --- a/addons/account_payment/account_payment.py +++ b/addons/account_payment/account_payment.py @@ -90,7 +90,7 @@ class payment_order(osv.osv): return res _columns = { - 'date_planned': fields.date('Scheduled date if fixed', states={'done':[('readonly',True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'), + 'date_scheduled': fields.date('Scheduled date if fixed', states={'done':[('readonly',True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'), 'reference': fields.char('Reference', size=128, required=1, states={'done':[('readonly',True)]}), 'mode': fields.many2one('payment.mode','Payment mode', select=True, required=1, states={'done':[('readonly',True)]}, help='Select the Payment Mode to be applied.'), 'state': fields.selection([ @@ -107,7 +107,7 @@ class payment_order(osv.osv): ('now', 'Directly'), ('due', 'Due date'), ('fixed', 'Fixed date') - ], "Preferred date", change_default=True, required=True, states={'done':[('readonly',True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."), + ], "Preferred date", change_default=True, required=True, states={'done':[('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."), 'date_created': fields.date('Creation date', readonly=True), 'date_done': fields.date('Execution date', readonly=True), } @@ -252,7 +252,7 @@ class payment_line(osv.osv): res = {} for line in self.browse(cursor, user, ids, context=context): if line.order_id.date_prefered == 'fixed': - res[line.id] = line.order_id.date_planned + res[line.id] = line.order_id.date_scheduled elif line.order_id.date_prefered == 'due': res[line.id] = line.due_date or time.strftime('%Y-%m-%d') else: @@ -330,7 +330,7 @@ class payment_line(osv.osv): ('name_uniq', 'UNIQUE(name)', 'The payment line name must be unique!'), ] - def onchange_move_line(self, cr, uid, ids, move_line_id, payment_type, date_prefered, date_planned, currency=False, company_currency=False, context=None): + def onchange_move_line(self, cr, uid, ids, move_line_id, payment_type, date_prefered, date_scheduled, currency=False, company_currency=False, context=None): data={} data['amount_currency']=data['communication']=data['partner_id']=data['reference']=data['date_created']=data['bank_id']=data['amount']=False @@ -365,7 +365,7 @@ class payment_line(osv.osv): elif date_prefered == 'due': data['date'] = line.date_maturity elif date_prefered == 'fixed': - data['date'] = date_planned + data['date'] = date_scheduled return {'value': data} diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml index 9f0daff6b8c..79bca265531 100644 --- a/addons/account_payment/account_payment_view.xml +++ b/addons/account_payment/account_payment_view.xml @@ -109,14 +109,14 @@ - +