BVR bugfix :\n before : the bvr adherent number where in the bank code field\n now : a new field is available for the adherent number

bzr revid: bch-785da6f9d20a3065cafa440fe19778d2f9ba0a57
This commit is contained in:
bch 2007-03-01 15:17:48 +00:00
parent cd0123b2cc
commit c4c46bdd5a
4 changed files with 7 additions and 5 deletions

View File

@ -54,8 +54,8 @@ class account_invoice_bvr(report_sxw.rml_parse):
def _get_ref(self, o, bid):
bank = self._bank_get(bid)
res = ''
if bank.bank_code:
res = bank.bank_code
if bank.bvr_adherent_num:
res = bank.bvr_adherent_num
return self._mod10r(res+o.number.rjust(26-len(res), '0'))
def _mod10r(self,nbr):

View File

@ -61,8 +61,8 @@ def _check(self, cr, uid, data, context):
raise wizard.except_wizard('UserError','No bank specified !')
if not re.compile('[0-9][0-9]-[0-9]{3,6}-[0-9]').match(bank.bvr_number or ''):
raise wizard.except_wizard('UserError','Your bank BVR number should be of the form 0X-XXX-X !\nPlease check your company information.')
if bank.bank_code and not re.compile('[0-9A-Z]{8,11}$').match(bank.bank_code):
raise wizard.except_wizard('UserError','Your bank code must be a number !\nPlease check your company information.')
if bank.bvr_adherent_num and not re.compile('[0-9]*$').match(bank.bvr_adherent_num):
raise wizard.except_wizard('UserError','Your bank bvr adherent number must contain exactly seven digit !\nPlease check your company information.')
return {}
class wizard_report(wizard.interface):

View File

@ -24,8 +24,9 @@
<field name="arch" type="xml">
<field name="bank_code" position="after">
<newline/>
<field name="bank_clearing" />
<field name="bank_clearing"/>
<field name="bvr_number"/>
<field name="bvr_adherent_num"/>
</field>
</field>
</record>

View File

@ -34,6 +34,7 @@ from osv import fields, osv
class res_partner_bank(osv.osv):
_inherit = "res.partner.bank"
_columns = {
'bvr_adherent_num': fields.char('BVR adherent number', size=11),
'bvr_number': fields.char('BVR Reference Number', size=11),
'bank_code': fields.char('Bank Code', size=64, help='Swift or BIC number'),
'bank_clearing': fields.char('Bank Clearing Number', size=64),