Merge lp:~therp-nl/banking-addons/6.1-sepa_fixes into lp:banking-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 186
Proposed branch: lp:~therp-nl/banking-addons/6.1-sepa_fixes
Merge into: lp:banking-addons/6.1
Diff against target: 134 lines (+18/-17)
5 files modified
account_banking/security/ir.model.access.csv (+0/-1)
account_banking_sepa_credit_transfer/__openerp__.py (+1/-0)
account_banking_sepa_credit_transfer/account_banking_sepa_view.xml (+4/-4)
account_banking_sepa_credit_transfer/wizard/export_sepa.py (+4/-3)
account_direct_debit/model/account_payment.py (+9/-9)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/6.1-sepa_fixes
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Review via email: mp+186946@code.launchpad.net

Description of the change

To post a comment you must log in.
180. By Stefan Rijnhart (Opener)

[FIX] Undefined reference to orm.except_orm

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

#78ff this one should be resolved

review: Needs Fixing
181. By Stefan Rijnhart (Opener)

[MRG] Merged with target branch to resolve conflict

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks for the review! Conflict is now resolved.

Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_banking/security/ir.model.access.csv'
--- account_banking/security/ir.model.access.csv 2011-12-21 15:49:58 +0000
+++ account_banking/security/ir.model.access.csv 2013-10-14 14:44:31 +0000
@@ -4,4 +4,3 @@
4"access_account_banking_import","account.bankimport","model_account_banking_imported_file","account.group_account_user",1,1,1,14"access_account_banking_import","account.bankimport","model_account_banking_imported_file","account.group_account_user",1,1,1,1
5"access_payment_mode_type","payment.mode.type","model_payment_mode_type","account_payment.group_account_payment",1,1,1,15"access_payment_mode_type","payment.mode.type","model_payment_mode_type","account_payment.group_account_payment",1,1,1,1
6"access_banking_import_transaction","Banking addons - Bank import transaction","model_banking_import_transaction","account.group_account_user",1,1,1,16"access_banking_import_transaction","Banking addons - Bank import transaction","model_banking_import_transaction","account.group_account_user",1,1,1,1
7"access_banking_transaction_wizard","Banking addons - Transaction wizard","model_banking_transaction_wizard","account.group_account_user",1,1,1,1
87
=== modified file 'account_banking_sepa_credit_transfer/__openerp__.py'
--- account_banking_sepa_credit_transfer/__openerp__.py 2013-06-05 11:50:32 +0000
+++ account_banking_sepa_credit_transfer/__openerp__.py 2013-10-14 14:44:31 +0000
@@ -20,6 +20,7 @@
20##############################################################################20##############################################################################
21{21{
22 'name': 'Account Banking SEPA Credit Transfer',22 'name': 'Account Banking SEPA Credit Transfer',
23 'summary': 'Create SEPA XML files for Credit Transfers',
23 'version': '0.1',24 'version': '0.1',
24 'license': 'AGPL-3',25 'license': 'AGPL-3',
25 'author': 'Akretion',26 'author': 'Akretion',
2627
=== modified file 'account_banking_sepa_credit_transfer/account_banking_sepa_view.xml'
--- account_banking_sepa_credit_transfer/account_banking_sepa_view.xml 2013-05-22 21:07:52 +0000
+++ account_banking_sepa_credit_transfer/account_banking_sepa_view.xml 2013-10-14 14:44:31 +0000
@@ -14,7 +14,7 @@
14 <field name="arch" type="xml">14 <field name="arch" type="xml">
15 <form string="SEPA Credit Transfer">15 <form string="SEPA Credit Transfer">
16 <notebook>16 <notebook>
17 <page string="General information">17 <page string="General Information">
18 <field name="msg_identification" select="1" />18 <field name="msg_identification" select="1" />
19 <field name="total_amount" />19 <field name="total_amount" />
20 <field name="nb_transactions" />20 <field name="nb_transactions" />
@@ -26,7 +26,7 @@
26 <field name="file" filename="filename"/>26 <field name="file" filename="filename"/>
27 <field name="filename" invisible="True"/>27 <field name="filename" invisible="True"/>
28 </page>28 </page>
29 <page string="Payment orders">29 <page string="Payment Orders">
30 <field name="payment_order_ids" colspan="4" nolabel="1">30 <field name="payment_order_ids" colspan="4" nolabel="1">
31 <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment order">31 <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment order">
32 <field name="reference"/>32 <field name="reference"/>
@@ -59,7 +59,7 @@
5959
6060
61<record id="action_account_banking_sepa" model="ir.actions.act_window">61<record id="action_account_banking_sepa" model="ir.actions.act_window">
62 <field name="name">Generated SEPA XML files</field>62 <field name="name">Generated SEPA Credit Transfer XML files</field>
63 <field name="res_model">banking.export.sepa</field>63 <field name="res_model">banking.export.sepa</field>
64 <field name="view_type">form</field>64 <field name="view_type">form</field>
65 <field name="view_mode">tree,form</field>65 <field name="view_mode">tree,form</field>
@@ -73,7 +73,7 @@
73 />73 />
7474
75<act_window id="act_banking_export_sepa_payment_order"75<act_window id="act_banking_export_sepa_payment_order"
76 name="Generated SEPA files"76 name="Generated SEPA Credit Transfer files"
77 domain="[('payment_order_ids', '=', active_id)]"77 domain="[('payment_order_ids', '=', active_id)]"
78 res_model="banking.export.sepa"78 res_model="banking.export.sepa"
79 src_model="payment.order"79 src_model="payment.order"
8080
=== modified file 'account_banking_sepa_credit_transfer/wizard/export_sepa.py'
--- account_banking_sepa_credit_transfer/wizard/export_sepa.py 2013-09-23 16:42:03 +0000
+++ account_banking_sepa_credit_transfer/wizard/export_sepa.py 2013-10-14 14:44:31 +0000
@@ -107,7 +107,7 @@
107 sepa_export = self.browse(cr, uid, ids[0], context=context)107 sepa_export = self.browse(cr, uid, ids[0], context=context)
108108
109 my_company_name = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name109 my_company_name = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name
110 my_company_iban = self._validate_iban(cr, uid, sepa_export.payment_order_ids[0].mode.bank_id.iban, context=context)110 my_company_iban = self._validate_iban(cr, uid, sepa_export.payment_order_ids[0].mode.bank_id.acc_number, context=context)
111 my_company_bic = sepa_export.payment_order_ids[0].mode.bank_id.bank.bic111 my_company_bic = sepa_export.payment_order_ids[0].mode.bank_id.bank.bic
112 #my_company_country_code = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.address[0].country_id.code112 #my_company_country_code = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.address[0].country_id.code
113 #my_company_city = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.address[0].city113 #my_company_city = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.address[0].city
@@ -260,7 +260,7 @@
260 creditor_account = etree.SubElement(credit_transfer_transaction_info, 'CdtrAcct')260 creditor_account = etree.SubElement(credit_transfer_transaction_info, 'CdtrAcct')
261 creditor_account_id = etree.SubElement(creditor_account, 'Id')261 creditor_account_id = etree.SubElement(creditor_account, 'Id')
262 creditor_account_iban = etree.SubElement(creditor_account_id, 'IBAN')262 creditor_account_iban = etree.SubElement(creditor_account_id, 'IBAN')
263 creditor_account_iban.text = self._validate_iban(cr, uid, line.bank_id.iban, context=context)263 creditor_account_iban.text = self._validate_iban(cr, uid, line.bank_id.acc_number, context=context)
264 remittance_info = etree.SubElement(credit_transfer_transaction_info, 'RmtInf')264 remittance_info = etree.SubElement(credit_transfer_transaction_info, 'RmtInf')
265 # switch to Structured (Strdr) ? If we do it, beware that the format is not the same between pain 02 and pain 03265 # switch to Structured (Strdr) ? If we do it, beware that the format is not the same between pain 02 and pain 03
266 remittance_info_unstructured = etree.SubElement(remittance_info, 'Ustrd')266 remittance_info_unstructured = etree.SubElement(remittance_info, 'Ustrd')
@@ -280,7 +280,8 @@
280 official_pain_schema = etree.XMLSchema(etree.parse(tools.file_open('account_banking_sepa_credit_transfer/data/%s.xsd' % pain_flavor)))280 official_pain_schema = etree.XMLSchema(etree.parse(tools.file_open('account_banking_sepa_credit_transfer/data/%s.xsd' % pain_flavor)))
281281
282 try:282 try:
283 official_pain_schema.validate(root)283 root_to_validate = etree.fromstring(xml_string)
284 official_pain_schema.assertValid(root_to_validate)
284 except Exception, e:285 except Exception, e:
285 _logger.warning("The XML file is invalid against the XML Schema Definition")286 _logger.warning("The XML file is invalid against the XML Schema Definition")
286 _logger.warning(xml_string)287 _logger.warning(xml_string)
287288
=== modified file 'account_direct_debit/model/account_payment.py'
--- account_direct_debit/model/account_payment.py 2013-09-23 13:54:39 +0000
+++ account_direct_debit/model/account_payment.py 2013-10-14 14:44:31 +0000
@@ -336,20 +336,20 @@
336 payment_line_id = payment_line_id[0]336 payment_line_id = payment_line_id[0]
337 reconcile_obj = self.pool.get('account.move.reconcile')337 reconcile_obj = self.pool.get('account.move.reconcile')
338 move_line_obj = self.pool.get('account.move.line')338 move_line_obj = self.pool.get('account.move.line')
339 payment_line = self.browse(cr, uid, payment_line_id, context=context)339 payment_line_record = self.browse(cr, uid, payment_line_id, context=context)
340340
341 debit_move_line = payment_line.debit_move_line_id341 debit_move_line = payment_line_record.debit_move_line_id
342 torec_move_line = payment_line.move_line_id342 torec_move_line = payment_line_record.move_line_id
343343
344 if payment_line.storno:344 if payment_line_record.storno:
345 raise osv.except_osv(345 raise osv.except_osv(
346 _('Can not reconcile'),346 _('Can not reconcile'),
347 _('Cancelation of payment line \'%s\' has already been ' +347 _('Cancelation of payment line \'%s\' has already been ' +
348 'processed') % payment_line.name)348 'processed') % payment_line_record.name)
349 if (not debit_move_line or not torec_move_line):349 if (not debit_move_line or not torec_move_line):
350 raise osv.except_osv(350 raise osv.except_osv(
351 _('Can not reconcile'),351 _('Can not reconcile'),
352 _('No move line for line %s') % payment_line.name) 352 _('No move line for line %s') % payment_line_record.name)
353 if torec_move_line.reconcile_id: # torec_move_line.reconcile_partial_id:353 if torec_move_line.reconcile_id: # torec_move_line.reconcile_partial_id:
354 raise osv.except_osv(354 raise osv.except_osv(
355 _('Error'),355 _('Error'),
@@ -370,7 +370,7 @@
370 line_ids = [debit_move_line.id, torec_move_line.id]370 line_ids = [debit_move_line.id, torec_move_line.id]
371 if torec_move_line.reconcile_partial_id:371 if torec_move_line.reconcile_partial_id:
372 line_ids = [372 line_ids = [
373 x.id for x in debit_move_line.reconcile_partial_id.line_partial_ids] + [torec_move_line_id]373 x.id for x in torec_move_line.reconcile_partial_id.line_partial_ids] + [debit_move_line.id]
374374
375 total = move_line_obj.get_balance(cr, uid, line_ids)375 total = move_line_obj.get_balance(cr, uid, line_ids)
376 vals = {376 vals = {

Subscribers

People subscribed via source and target branches