[IMP] account, refund invoice wizard: changed default value and order of filter_refund field in order to have something less error prone and less dangereous

bzr revid: qdp-launchpad@openerp.com-20110328112354-o3nxeho0k2ehwni1
This commit is contained in:
Quentin (OpenERP) 2011-03-28 13:23:54 +02:00
parent bfba874832
commit b815396f06
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ class account_invoice_refund(osv.osv_memory):
'period': fields.many2one('account.period', 'Force period'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the refund invoice that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'description': fields.char('Description', size=128, required=True),
'filter_refund': fields.selection([('modify', 'Modify'), ('refund', 'Refund'), ('cancel', 'Cancel')], "Refund Type", required=True, help='Refund invoice base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
'filter_refund': fields.selection([('refund', 'Refund'), ('cancel', 'Cancel'),('modify', 'Modify')], "Refund Type", required=True, help='Refund invoice base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
}
def _get_journal(self, cr, uid, context=None):
@ -52,7 +52,7 @@ class account_invoice_refund(osv.osv_memory):
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'journal_id': _get_journal,
'filter_refund': 'modify',
'filter_refund': 'refund',
}
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):