From aa54c740ca8f5f8e4747b89295a3a4f7e2d4e20a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 10 Sep 2014 12:48:09 +0200 Subject: [PATCH 01/21] [MIG] Migration and enhancement of all modules involved in SEPA --- .../__init__.py | 1 - __unported__/account_direct_debit/__init__.py | 1 - .../account_direct_debit/model/__init__.py | 5 - .../account_payment_shortcut/__init__.py | 2 - .../account_payment_shortcut/__openerp__.py | 34 -- .../account_payment_shortcut/payment_order.py | 54 --- account_banking_pain_base/__init__.py | 23 + .../__openerp__.py | 19 +- .../banking_export_pain.py | 0 .../company.py | 0 .../company_view.xml | 0 .../i18n/account_banking_pain_base.pot | 0 .../i18n/fr.po | 0 .../i18n/nl.po | 0 .../models}/__init__.py | 2 +- .../models/banking_export_pain.py | 440 ++++++++++++++++++ .../models}/payment_line.py | 0 .../models}/payment_mode.py | 0 .../models/res_company.py | 82 ++++ account_banking_pain_base/payment_line.py | 52 +++ .../payment_line_view.xml | 0 account_banking_pain_base/payment_mode.py | 39 ++ .../payment_mode_view.xml | 0 .../views/payment_line_view.xml | 41 ++ .../views/payment_mode_view.xml | 22 + .../views/res_company_view.xml | 24 + account_banking_payment_export/__init__.py | 3 + .../__openerp__.py | 56 ++- .../data/payment_mode_type.xml | 0 .../demo/banking_demo.xml | 4 + .../i18n/account_banking_payment_export.pot | 0 .../i18n/nl.po | 0 .../migrations/7.0.0.1.165/pre-migration.py | 0 .../model/__init__.py | 0 .../model/account_move_line.py | 0 .../model/account_payment.py | 0 .../model/bank_payment_manual.py | 0 .../model/payment_mode.py | 0 .../model/payment_mode_type.py | 0 .../model/payment_order_create.py | 0 .../models/__init__.py | 5 + .../models/account_move_line.py | 98 ++++ .../models/account_payment.py | 77 +++ .../models/payment_mode.py | 54 +++ .../models/payment_mode_type.py | 62 +++ .../security/ir.model.access.csv | 0 .../view/account_payment.xml | 0 .../view/bank_payment_manual.xml | 0 .../view/payment_mode.xml | 2 +- .../view/payment_mode_type.xml | 19 +- .../view/payment_order_create_view.xml | 0 .../wizard/__init__.py | 3 + .../wizard/bank_payment_manual.py | 54 +++ .../wizard/bank_payment_manual.xml | 18 + .../wizard/payment_order_create.py | 175 +++++++ .../wizard/payment_order_create_view.xml | 34 ++ .../__init__.py | 24 + .../__openerp__.py | 33 +- .../account_banking_sepa.py | 0 .../account_banking_sepa_view.xml | 0 .../data/pain.001.001.02.xsd | 0 .../data/pain.001.001.03.xsd | 0 .../data/pain.001.001.04.xsd | 0 .../data/pain.001.001.05.xsd | 0 .../data/payment_type_sepa_sct.xml | 4 + .../demo}/sepa_credit_transfer_demo.xml | 0 .../account_banking_sepa_credit_transfer.pot | 0 .../i18n/fr.po | 0 .../i18n/nl.po | 0 .../models}/__init__.py | 1 - .../models/account_banking_sepa.py | 76 +++ .../security/ir.model.access.csv | 0 .../sepa_credit_transfer_demo.xml | 15 + .../static/description/icon.svg | 92 ++++ .../static/src/img/icon.png | Bin .../views/account_banking_sepa_view.xml | 77 +++ .../wizard/__init__.py | 0 .../wizard/export_sepa.py | 40 +- .../wizard/export_sepa_view.xml | 0 .../__init__.py | 3 +- .../__openerp__.py | 41 +- .../account_banking_sdd.py | 0 .../account_banking_sdd_view.xml | 0 .../account_invoice_view.xml | 0 .../account_payment_view.xml | 0 .../company.py | 0 .../company_view.xml | 0 .../data}/mandate_expire_cron.xml | 0 .../data/mandate_reference_sequence.xml | 0 .../data/pain.008.001.02.xsd | 0 .../data/pain.008.001.03.xsd | 0 .../data/pain.008.001.04.xsd | 0 .../data/payment_type_sdd.xml | 0 .../demo}/sepa_direct_debit_demo.xml | 0 .../account_banking_sepa_direct_debit.pot | 0 .../i18n/fr.po | 0 .../i18n/nl.po | 0 .../mandate_expire_cron.xml | 26 ++ .../models/__init__.py | 28 ++ .../models/account_invoice.py | 32 ++ .../models/banking_export_sdd.py | 78 ++++ .../models/payment_line.py | 74 +++ .../models/res_company.py | 80 ++++ .../models/res_partner_bank.py | 30 ++ .../models/sdd_mandate.py | 291 ++++++++++++ .../res_partner_bank_view.xml | 0 .../sdd_mandate_view.xml | 0 .../security/ir.model.access.csv | 0 .../original_mandate_required_security.xml | 0 .../sepa_direct_debit_demo.xml | 27 ++ .../static/description/icon.svg | 92 ++++ .../static/src/img/icon.png | Bin .../views/account_banking_sdd_view.xml | 77 +++ .../views/account_invoice_view.xml | 22 + .../views/account_payment_view.xml | 26 ++ .../views/res_company_view.xml | 23 + .../views/res_partner_bank_view.xml | 48 ++ .../views/sdd_mandate_view.xml | 153 ++++++ .../wizard/__init__.py | 0 .../wizard/export_sdd.py | 8 +- .../wizard/export_sdd_view.xml | 0 account_direct_debit/__init__.py | 1 + .../__openerp__.py | 15 +- .../data/account_payment_term.xml | 0 .../i18n/account_direct_debit.pot | 0 .../i18n/nl.po | 0 .../migrations/7.0.2/post-migration.py | 0 .../migrations/7.0.2/pre-migration.py | 0 account_direct_debit/models/__init__.py | 4 + .../models}/account_invoice.py | 14 +- .../models}/account_move_line.py | 26 +- .../models}/account_payment.py | 7 +- .../models}/payment_line.py | 63 ++- .../views}/account_invoice.xml | 0 .../views}/account_payment.xml | 35 +- .../views}/payment_mode.xml | 0 .../views}/payment_mode_type.xml | 15 +- account_direct_debit/wizard/__init__.py | 1 + .../wizard}/payment_order_create.py | 12 +- .../workflow/account_invoice.xml | 0 account_payment_partner/__init__.py | 24 + .../__openerp__.py | 11 +- .../demo/partner_demo.xml | 0 .../i18n/account_payment_partner.pot | 0 .../i18n/nl.po | 0 .../models}/__init__.py | 3 +- .../models}/account_invoice.py | 29 +- .../models}/partner.py | 0 .../models}/payment_order_create.py | 0 account_payment_partner/models/res_partner.py | 42 ++ .../views}/account_invoice.xml | 0 .../views/account_invoice_view.xml | 40 ++ .../views}/partner.xml | 0 .../views/res_partner_view.xml | 27 ++ .../wizard}/__init__.py | 2 +- .../wizard/payment_order_create.py | 37 ++ .../__init__.py | 2 +- .../__openerp__.py | 19 +- .../i18n/account_payment_purchase.pot | 0 .../i18n/fr.po | 0 .../i18n/nl.po | 0 .../model/__init__.py | 0 .../model/purchase.py | 0 .../model/stock.py | 0 account_payment_purchase/models/__init__.py | 24 + .../models/purchase_order.py | 63 +++ .../models/stock_picking.py | 38 ++ .../view/purchase.xml | 0 .../views/purchase_order_view.xml | 25 + .../__init__.py | 2 +- .../__openerp__.py | 18 +- .../i18n/account_payment_sale.pot | 0 .../i18n/nl.po | 0 .../model/__init__.py | 0 .../model/sale.py | 0 account_payment_sale/models/__init__.py | 24 + account_payment_sale/models/sale_order.py | 50 ++ account_payment_sale/models/stock_picking.py | 40 ++ .../view/sale.xml | 0 .../views/sale_order_view.xml | 24 + 180 files changed, 3395 insertions(+), 368 deletions(-) delete mode 100644 __unported__/account_banking_payment_export/__init__.py delete mode 100644 __unported__/account_direct_debit/__init__.py delete mode 100644 __unported__/account_direct_debit/model/__init__.py delete mode 100644 __unported__/account_payment_shortcut/__init__.py delete mode 100644 __unported__/account_payment_shortcut/__openerp__.py delete mode 100644 __unported__/account_payment_shortcut/payment_order.py create mode 100644 account_banking_pain_base/__init__.py rename {__unported__/account_banking_pain_base => account_banking_pain_base}/__openerp__.py (85%) rename {__unported__/account_banking_pain_base => account_banking_pain_base}/banking_export_pain.py (100%) rename {__unported__/account_banking_pain_base => account_banking_pain_base}/company.py (100%) rename {__unported__/account_banking_pain_base => account_banking_pain_base}/company_view.xml (100%) rename {__unported__/account_banking_pain_base => account_banking_pain_base}/i18n/account_banking_pain_base.pot (100%) rename {__unported__/account_banking_pain_base => account_banking_pain_base}/i18n/fr.po (100%) rename {__unported__/account_banking_pain_base => account_banking_pain_base}/i18n/nl.po (100%) rename {__unported__/account_banking_pain_base => account_banking_pain_base/models}/__init__.py (97%) create mode 100644 account_banking_pain_base/models/banking_export_pain.py rename {__unported__/account_banking_pain_base => account_banking_pain_base/models}/payment_line.py (100%) rename {__unported__/account_banking_pain_base => account_banking_pain_base/models}/payment_mode.py (100%) create mode 100644 account_banking_pain_base/models/res_company.py create mode 100644 account_banking_pain_base/payment_line.py rename {__unported__/account_banking_pain_base => account_banking_pain_base}/payment_line_view.xml (100%) create mode 100644 account_banking_pain_base/payment_mode.py rename {__unported__/account_banking_pain_base => account_banking_pain_base}/payment_mode_view.xml (100%) create mode 100644 account_banking_pain_base/views/payment_line_view.xml create mode 100644 account_banking_pain_base/views/payment_mode_view.xml create mode 100644 account_banking_pain_base/views/res_company_view.xml create mode 100644 account_banking_payment_export/__init__.py rename {__unported__/account_banking_payment_export => account_banking_payment_export}/__openerp__.py (59%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/data/payment_mode_type.xml (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/demo/banking_demo.xml (94%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/i18n/account_banking_payment_export.pot (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/i18n/nl.po (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/migrations/7.0.0.1.165/pre-migration.py (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/model/__init__.py (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/model/account_move_line.py (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/model/account_payment.py (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/model/bank_payment_manual.py (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/model/payment_mode.py (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/model/payment_mode_type.py (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/model/payment_order_create.py (100%) create mode 100644 account_banking_payment_export/models/__init__.py create mode 100644 account_banking_payment_export/models/account_move_line.py create mode 100644 account_banking_payment_export/models/account_payment.py create mode 100644 account_banking_payment_export/models/payment_mode.py create mode 100644 account_banking_payment_export/models/payment_mode_type.py rename {__unported__/account_banking_payment_export => account_banking_payment_export}/security/ir.model.access.csv (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/view/account_payment.xml (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/view/bank_payment_manual.xml (100%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/view/payment_mode.xml (97%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/view/payment_mode_type.xml (77%) rename {__unported__/account_banking_payment_export => account_banking_payment_export}/view/payment_order_create_view.xml (100%) create mode 100644 account_banking_payment_export/wizard/__init__.py create mode 100644 account_banking_payment_export/wizard/bank_payment_manual.py create mode 100644 account_banking_payment_export/wizard/bank_payment_manual.xml create mode 100644 account_banking_payment_export/wizard/payment_order_create.py create mode 100644 account_banking_payment_export/wizard/payment_order_create_view.xml create mode 100644 account_banking_sepa_credit_transfer/__init__.py rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/__openerp__.py (71%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/account_banking_sepa.py (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/account_banking_sepa_view.xml (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/data/pain.001.001.02.xsd (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/data/pain.001.001.03.xsd (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/data/pain.001.001.04.xsd (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/data/pain.001.001.05.xsd (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/data/payment_type_sepa_sct.xml (88%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer/demo}/sepa_credit_transfer_demo.xml (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/i18n/account_banking_sepa_credit_transfer.pot (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/i18n/fr.po (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/i18n/nl.po (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer/models}/__init__.py (98%) create mode 100644 account_banking_sepa_credit_transfer/models/account_banking_sepa.py rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/security/ir.model.access.csv (100%) create mode 100644 account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml create mode 100644 account_banking_sepa_credit_transfer/static/description/icon.svg rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/static/src/img/icon.png (100%) create mode 100644 account_banking_sepa_credit_transfer/views/account_banking_sepa_view.xml rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/wizard/__init__.py (100%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/wizard/export_sepa.py (95%) rename {__unported__/account_banking_sepa_credit_transfer => account_banking_sepa_credit_transfer}/wizard/export_sepa_view.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/__init__.py (94%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/__openerp__.py (70%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/account_banking_sdd.py (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/account_banking_sdd_view.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/account_invoice_view.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/account_payment_view.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/company.py (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/company_view.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit/data}/mandate_expire_cron.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/data/mandate_reference_sequence.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/data/pain.008.001.02.xsd (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/data/pain.008.001.03.xsd (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/data/pain.008.001.04.xsd (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/data/payment_type_sdd.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit/demo}/sepa_direct_debit_demo.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/i18n/account_banking_sepa_direct_debit.pot (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/i18n/fr.po (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/i18n/nl.po (100%) create mode 100644 account_banking_sepa_direct_debit/mandate_expire_cron.xml create mode 100644 account_banking_sepa_direct_debit/models/__init__.py create mode 100644 account_banking_sepa_direct_debit/models/account_invoice.py create mode 100644 account_banking_sepa_direct_debit/models/banking_export_sdd.py create mode 100644 account_banking_sepa_direct_debit/models/payment_line.py create mode 100644 account_banking_sepa_direct_debit/models/res_company.py create mode 100644 account_banking_sepa_direct_debit/models/res_partner_bank.py create mode 100644 account_banking_sepa_direct_debit/models/sdd_mandate.py rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/res_partner_bank_view.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/sdd_mandate_view.xml (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/security/ir.model.access.csv (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/security/original_mandate_required_security.xml (100%) create mode 100644 account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml create mode 100644 account_banking_sepa_direct_debit/static/description/icon.svg rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/static/src/img/icon.png (100%) create mode 100644 account_banking_sepa_direct_debit/views/account_banking_sdd_view.xml create mode 100644 account_banking_sepa_direct_debit/views/account_invoice_view.xml create mode 100644 account_banking_sepa_direct_debit/views/account_payment_view.xml create mode 100644 account_banking_sepa_direct_debit/views/res_company_view.xml create mode 100644 account_banking_sepa_direct_debit/views/res_partner_bank_view.xml create mode 100644 account_banking_sepa_direct_debit/views/sdd_mandate_view.xml rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/wizard/__init__.py (100%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/wizard/export_sdd.py (98%) rename {__unported__/account_banking_sepa_direct_debit => account_banking_sepa_direct_debit}/wizard/export_sdd_view.xml (100%) create mode 100644 account_direct_debit/__init__.py rename {__unported__/account_direct_debit => account_direct_debit}/__openerp__.py (80%) rename {__unported__/account_direct_debit => account_direct_debit}/data/account_payment_term.xml (100%) rename {__unported__/account_direct_debit => account_direct_debit}/i18n/account_direct_debit.pot (100%) rename {__unported__/account_direct_debit => account_direct_debit}/i18n/nl.po (100%) rename {__unported__/account_direct_debit => account_direct_debit}/migrations/7.0.2/post-migration.py (100%) rename {__unported__/account_direct_debit => account_direct_debit}/migrations/7.0.2/pre-migration.py (100%) create mode 100644 account_direct_debit/models/__init__.py rename {__unported__/account_direct_debit/model => account_direct_debit/models}/account_invoice.py (95%) rename {__unported__/account_direct_debit/model => account_direct_debit/models}/account_move_line.py (86%) rename {__unported__/account_direct_debit/model => account_direct_debit/models}/account_payment.py (76%) rename {__unported__/account_direct_debit/model => account_direct_debit/models}/payment_line.py (76%) rename {__unported__/account_direct_debit/view => account_direct_debit/views}/account_invoice.xml (100%) rename {__unported__/account_direct_debit/view => account_direct_debit/views}/account_payment.xml (71%) rename {__unported__/account_direct_debit/view => account_direct_debit/views}/payment_mode.xml (100%) rename {__unported__/account_direct_debit/view => account_direct_debit/views}/payment_mode_type.xml (52%) create mode 100644 account_direct_debit/wizard/__init__.py rename {__unported__/account_direct_debit/model => account_direct_debit/wizard}/payment_order_create.py (80%) rename {__unported__/account_direct_debit => account_direct_debit}/workflow/account_invoice.xml (100%) create mode 100644 account_payment_partner/__init__.py rename {__unported__/account_payment_partner => account_payment_partner}/__openerp__.py (88%) rename {__unported__/account_payment_partner => account_payment_partner}/demo/partner_demo.xml (100%) rename {__unported__/account_payment_partner => account_payment_partner}/i18n/account_payment_partner.pot (100%) rename {__unported__/account_payment_partner => account_payment_partner}/i18n/nl.po (100%) rename {__unported__/account_payment_partner/model => account_payment_partner/models}/__init__.py (94%) rename {__unported__/account_payment_partner/model => account_payment_partner/models}/account_invoice.py (65%) rename {__unported__/account_payment_partner/model => account_payment_partner/models}/partner.py (100%) rename {__unported__/account_payment_partner/model => account_payment_partner/models}/payment_order_create.py (100%) create mode 100644 account_payment_partner/models/res_partner.py rename {__unported__/account_payment_partner/view => account_payment_partner/views}/account_invoice.xml (100%) create mode 100644 account_payment_partner/views/account_invoice_view.xml rename {__unported__/account_payment_partner/view => account_payment_partner/views}/partner.xml (100%) create mode 100644 account_payment_partner/views/res_partner_view.xml rename {__unported__/account_payment_partner => account_payment_partner/wizard}/__init__.py (96%) create mode 100644 account_payment_partner/wizard/payment_order_create.py rename {__unported__/account_payment_purchase => account_payment_purchase}/__init__.py (98%) rename {__unported__/account_payment_purchase => account_payment_purchase}/__openerp__.py (82%) rename {__unported__/account_payment_purchase => account_payment_purchase}/i18n/account_payment_purchase.pot (100%) rename {__unported__/account_payment_purchase => account_payment_purchase}/i18n/fr.po (100%) rename {__unported__/account_payment_purchase => account_payment_purchase}/i18n/nl.po (100%) rename {__unported__/account_payment_purchase => account_payment_purchase}/model/__init__.py (100%) rename {__unported__/account_payment_purchase => account_payment_purchase}/model/purchase.py (100%) rename {__unported__/account_payment_purchase => account_payment_purchase}/model/stock.py (100%) create mode 100644 account_payment_purchase/models/__init__.py create mode 100644 account_payment_purchase/models/purchase_order.py create mode 100644 account_payment_purchase/models/stock_picking.py rename {__unported__/account_payment_purchase => account_payment_purchase}/view/purchase.xml (100%) create mode 100644 account_payment_purchase/views/purchase_order_view.xml rename {__unported__/account_payment_sale => account_payment_sale}/__init__.py (98%) rename {__unported__/account_payment_sale => account_payment_sale}/__openerp__.py (85%) rename {__unported__/account_payment_sale => account_payment_sale}/i18n/account_payment_sale.pot (100%) rename {__unported__/account_payment_sale => account_payment_sale}/i18n/nl.po (100%) rename {__unported__/account_payment_sale => account_payment_sale}/model/__init__.py (100%) rename {__unported__/account_payment_sale => account_payment_sale}/model/sale.py (100%) create mode 100644 account_payment_sale/models/__init__.py create mode 100644 account_payment_sale/models/sale_order.py create mode 100644 account_payment_sale/models/stock_picking.py rename {__unported__/account_payment_sale => account_payment_sale}/view/sale.xml (100%) create mode 100644 account_payment_sale/views/sale_order_view.xml diff --git a/__unported__/account_banking_payment_export/__init__.py b/__unported__/account_banking_payment_export/__init__.py deleted file mode 100644 index 9186ee3ad..000000000 --- a/__unported__/account_banking_payment_export/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import model diff --git a/__unported__/account_direct_debit/__init__.py b/__unported__/account_direct_debit/__init__.py deleted file mode 100644 index 16e8b082f..000000000 --- a/__unported__/account_direct_debit/__init__.py +++ /dev/null @@ -1 +0,0 @@ -import model diff --git a/__unported__/account_direct_debit/model/__init__.py b/__unported__/account_direct_debit/model/__init__.py deleted file mode 100644 index b3558c40e..000000000 --- a/__unported__/account_direct_debit/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -import account_payment -import payment_line -import account_move_line -import account_invoice -import payment_order_create diff --git a/__unported__/account_payment_shortcut/__init__.py b/__unported__/account_payment_shortcut/__init__.py deleted file mode 100644 index c9dbb3cf6..000000000 --- a/__unported__/account_payment_shortcut/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -from . import payment_order diff --git a/__unported__/account_payment_shortcut/__openerp__.py b/__unported__/account_payment_shortcut/__openerp__.py deleted file mode 100644 index 7f35ab096..000000000 --- a/__unported__/account_payment_shortcut/__openerp__.py +++ /dev/null @@ -1,34 +0,0 @@ -############################################################################## -# -# Copyright (C) 2011 Therp BV (). -# 2011 Smile BV (). -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -{ - 'name': 'Account Payment Invoice Selection Shortcut', - 'version': '1.134', - 'license': 'AGPL-3', - 'author': 'Smile / Therp BV', - 'website': 'https://launchpad.net/banking-addons', - 'category': 'Banking addons', - 'depends': ['account_payment'], - 'description': ''' -When composing a payment order, select all candidates by default -(in the second step of the "Select invoices to pay" wizard). - ''', - 'installable': False, -} diff --git a/__unported__/account_payment_shortcut/payment_order.py b/__unported__/account_payment_shortcut/payment_order.py deleted file mode 100644 index b44c6b8da..000000000 --- a/__unported__/account_payment_shortcut/payment_order.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2011 - 2013 Therp BV (). -# -# All other contributions are (C) by their respective contributors -# -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm - - -class payment_order_create(orm.TransientModel): - _inherit = 'payment.order.create' - - def default_get(self, cr, uid, fields_list, context=None): - """ - Automatically add the candidate move lines to - the payment order, instead of only applying them - to the domain. - - We make use of the fact that the search_entries - method passes an action without a res_id so that a - new instance is created. Inject the line_ids, which have - been placed in the context at object - creation time. - """ - if context is None: - context = {} - res = super(payment_order_create, self).default_get( - cr, uid, fields_list, context=context) - - if (fields_list - and 'entries' in fields_list - and 'entries' not in res - and context.get('line_ids', False)): - res['entries'] = context['line_ids'] - - return res diff --git a/account_banking_pain_base/__init__.py b/account_banking_pain_base/__init__.py new file mode 100644 index 000000000..b69a01a1b --- /dev/null +++ b/account_banking_pain_base/__init__.py @@ -0,0 +1,23 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# PAIN Base module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import models diff --git a/__unported__/account_banking_pain_base/__openerp__.py b/account_banking_pain_base/__openerp__.py similarity index 85% rename from __unported__/account_banking_pain_base/__openerp__.py rename to account_banking_pain_base/__openerp__.py index 23e345e85..e7b199213 100644 --- a/__unported__/account_banking_pain_base/__openerp__.py +++ b/account_banking_pain_base/__openerp__.py @@ -26,15 +26,16 @@ 'license': 'AGPL-3', 'author': 'Akretion, Noviat', 'website': 'http://openerp-community-association.org/', + 'contributors': ['Pedro M. Baeza '], 'category': 'Hidden', 'depends': ['account_banking_payment_export'], 'external_dependencies': { 'python': ['unidecode', 'lxml'], }, 'data': [ - 'payment_line_view.xml', - 'payment_mode_view.xml', - 'company_view.xml', + 'views/payment_line_view.xml', + 'views/payment_mode_view.xml', + 'views/res_company_view.xml', ], 'description': ''' Base module for PAIN file generation @@ -43,14 +44,10 @@ Base module for PAIN file generation This module contains fields and functions that are used by the module for SEPA Credit Transfer (account_banking_sepa_credit_transfer) and SEPA Direct Debit (account_banking_sepa_direct_debit). This module doesn't provide any -functionnality by itself. +functionality by itself. -This module is part of the banking addons: - https://www.github.com/OCA/banking-addons - -This module was started during the Akretion-Noviat code sprint of -November 21st 2013 in Epiais les Louvres (France). +This module was started during the Akretion-Noviat code sprint of November +21st 2013 in Epiais les Louvres (France). ''', - 'active': False, - 'installable': False, + 'installable': True, } diff --git a/__unported__/account_banking_pain_base/banking_export_pain.py b/account_banking_pain_base/banking_export_pain.py similarity index 100% rename from __unported__/account_banking_pain_base/banking_export_pain.py rename to account_banking_pain_base/banking_export_pain.py diff --git a/__unported__/account_banking_pain_base/company.py b/account_banking_pain_base/company.py similarity index 100% rename from __unported__/account_banking_pain_base/company.py rename to account_banking_pain_base/company.py diff --git a/__unported__/account_banking_pain_base/company_view.xml b/account_banking_pain_base/company_view.xml similarity index 100% rename from __unported__/account_banking_pain_base/company_view.xml rename to account_banking_pain_base/company_view.xml diff --git a/__unported__/account_banking_pain_base/i18n/account_banking_pain_base.pot b/account_banking_pain_base/i18n/account_banking_pain_base.pot similarity index 100% rename from __unported__/account_banking_pain_base/i18n/account_banking_pain_base.pot rename to account_banking_pain_base/i18n/account_banking_pain_base.pot diff --git a/__unported__/account_banking_pain_base/i18n/fr.po b/account_banking_pain_base/i18n/fr.po similarity index 100% rename from __unported__/account_banking_pain_base/i18n/fr.po rename to account_banking_pain_base/i18n/fr.po diff --git a/__unported__/account_banking_pain_base/i18n/nl.po b/account_banking_pain_base/i18n/nl.po similarity index 100% rename from __unported__/account_banking_pain_base/i18n/nl.po rename to account_banking_pain_base/i18n/nl.po diff --git a/__unported__/account_banking_pain_base/__init__.py b/account_banking_pain_base/models/__init__.py similarity index 97% rename from __unported__/account_banking_pain_base/__init__.py rename to account_banking_pain_base/models/__init__.py index 6662843e6..f1e6551bf 100644 --- a/__unported__/account_banking_pain_base/__init__.py +++ b/account_banking_pain_base/models/__init__.py @@ -22,5 +22,5 @@ from . import payment_line from . import payment_mode -from . import company +from . import res_company from . import banking_export_pain diff --git a/account_banking_pain_base/models/banking_export_pain.py b/account_banking_pain_base/models/banking_export_pain.py new file mode 100644 index 000000000..17961a29a --- /dev/null +++ b/account_banking_pain_base/models/banking_export_pain.py @@ -0,0 +1,440 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# PAIN Base module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm +from openerp.tools.translate import _ +from openerp.tools.safe_eval import safe_eval +from datetime import datetime +from unidecode import unidecode +from lxml import etree +from openerp import tools +import logging +import base64 + +logger = logging.getLogger(__name__) + + +class BankingExportPain(orm.AbstractModel): + _name = 'banking.export.pain' + + def _validate_iban(self, cr, uid, iban, context=None): + '''if IBAN is valid, returns IBAN + if IBAN is NOT valid, raises an error message''' + partner_bank_obj = self.pool.get('res.partner.bank') + if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context): + return iban.replace(' ', '') + else: + raise orm.except_orm( + _('Error:'), _("This IBAN is not valid : %s") % iban) + + def _prepare_field(self, cr, uid, field_name, field_value, eval_ctx, + max_size=0, gen_args=None, context=None): + """This function is designed to be inherited !""" + if gen_args is None: + gen_args = {} + assert isinstance(eval_ctx, dict), 'eval_ctx must contain a dict' + try: + value = safe_eval(field_value, eval_ctx) + # SEPA uses XML ; XML = UTF-8 ; UTF-8 = support for all characters + # But we are dealing with banks... + # and many banks don't want non-ASCCI characters ! + # cf section 1.4 "Character set" of the SEPA Credit Transfer + # Scheme Customer-to-bank guidelines + if gen_args.get('convert_to_ascii'): + value = unidecode(value) + unallowed_ascii_chars = [ + '"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@', + '[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!'] + for unallowed_ascii_char in unallowed_ascii_chars: + value = value.replace(unallowed_ascii_char, '-') + except: + line = eval_ctx.get('line') + if line: + raise orm.except_orm( + _('Error:'), + _("Cannot compute the '%s' of the Payment Line with " + "reference '%s'.") + % (field_name, line.name)) + else: + raise orm.except_orm( + _('Error:'), + _("Cannot compute the '%s'.") % field_name) + if not isinstance(value, (str, unicode)): + raise orm.except_orm( + _('Field type error:'), + _("The type of the field '%s' is %s. It should be a string " + "or unicode.") + % (field_name, type(value))) + if not value: + raise orm.except_orm( + _('Error:'), + _("The '%s' is empty or 0. It should have a non-null value.") + % field_name) + if max_size and len(value) > max_size: + value = value[0:max_size] + return value + + def _prepare_export_sepa( + self, cr, uid, total_amount, transactions_count, xml_string, + gen_args, context=None): + return { + 'batch_booking': gen_args['sepa_export'].batch_booking, + 'charge_bearer': gen_args['sepa_export'].charge_bearer, + 'total_amount': total_amount, + 'nb_transactions': transactions_count, + 'file': base64.encodestring(xml_string), + 'payment_order_ids': [( + 6, 0, [x.id for x in gen_args['sepa_export'].payment_order_ids] + )], + } + + def _validate_xml(self, cr, uid, xml_string, gen_args, context=None): + xsd_etree_obj = etree.parse( + tools.file_open(gen_args['pain_xsd_file'])) + official_pain_schema = etree.XMLSchema(xsd_etree_obj) + + try: + root_to_validate = etree.fromstring(xml_string) + official_pain_schema.assertValid(root_to_validate) + except Exception, e: + logger.warning( + "The XML file is invalid against the XML Schema Definition") + logger.warning(xml_string) + logger.warning(e) + raise orm.except_orm( + _('Error:'), + _("The generated XML file is not valid against the official " + "XML Schema Definition. The generated XML file and the " + "full error have been written in the server logs. Here " + "is the error, which may give you an idea on the cause " + "of the problem : %s") + % str(e)) + return True + + def finalize_sepa_file_creation( + self, cr, uid, ids, xml_root, total_amount, transactions_count, + gen_args, context=None): + xml_string = etree.tostring( + xml_root, pretty_print=True, encoding='UTF-8', + xml_declaration=True) + logger.debug( + "Generated SEPA XML file in format %s below" + % gen_args['pain_flavor']) + logger.debug(xml_string) + self._validate_xml(cr, uid, xml_string, gen_args, context=context) + + file_id = gen_args['file_obj'].create( + cr, uid, self._prepare_export_sepa( + cr, uid, total_amount, transactions_count, + xml_string, gen_args, context=context), + context=context) + + self.write( + cr, uid, ids, { + 'file_id': file_id, + 'state': 'finish', + }, context=context) + + action = { + 'name': 'SEPA File', + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': self._name, + 'res_id': ids[0], + 'target': 'new', + } + return action + + def generate_group_header_block( + self, cr, uid, parent_node, gen_args, context=None): + group_header_1_0 = etree.SubElement(parent_node, 'GrpHdr') + message_identification_1_1 = etree.SubElement( + group_header_1_0, 'MsgId') + message_identification_1_1.text = self._prepare_field( + cr, uid, 'Message Identification', + 'sepa_export.payment_order_ids[0].reference', + {'sepa_export': gen_args['sepa_export']}, 35, + gen_args=gen_args, context=context) + creation_date_time_1_2 = etree.SubElement(group_header_1_0, 'CreDtTm') + creation_date_time_1_2.text = datetime.strftime( + datetime.today(), '%Y-%m-%dT%H:%M:%S') + if gen_args.get('pain_flavor') == 'pain.001.001.02': + # batch_booking is in "Group header" with pain.001.001.02 + # and in "Payment info" in pain.001.001.03/04 + batch_booking = etree.SubElement(group_header_1_0, 'BtchBookg') + batch_booking.text = \ + str(gen_args['sepa_export'].batch_booking).lower() + nb_of_transactions_1_6 = etree.SubElement( + group_header_1_0, 'NbOfTxs') + control_sum_1_7 = etree.SubElement(group_header_1_0, 'CtrlSum') + # Grpg removed in pain.001.001.03 + if gen_args.get('pain_flavor') == 'pain.001.001.02': + grouping = etree.SubElement(group_header_1_0, 'Grpg') + grouping.text = 'GRPD' + self.generate_initiating_party_block( + cr, uid, group_header_1_0, gen_args, + context=context) + return group_header_1_0, nb_of_transactions_1_6, control_sum_1_7 + + def generate_start_payment_info_block( + self, cr, uid, parent_node, payment_info_ident, + priority, local_instrument, sequence_type, requested_date, + eval_ctx, gen_args, context=None): + payment_info_2_0 = etree.SubElement(parent_node, 'PmtInf') + payment_info_identification_2_1 = etree.SubElement( + payment_info_2_0, 'PmtInfId') + payment_info_identification_2_1.text = self._prepare_field( + cr, uid, 'Payment Information Identification', + payment_info_ident, eval_ctx, 35, + gen_args=gen_args, context=context) + payment_method_2_2 = etree.SubElement(payment_info_2_0, 'PmtMtd') + payment_method_2_2.text = gen_args['payment_method'] + nb_of_transactions_2_4 = False + control_sum_2_5 = False + if gen_args.get('pain_flavor') != 'pain.001.001.02': + batch_booking_2_3 = etree.SubElement(payment_info_2_0, 'BtchBookg') + batch_booking_2_3.text = \ + str(gen_args['sepa_export'].batch_booking).lower() + # The "SEPA Customer-to-bank + # Implementation guidelines" for SCT and SDD says that control sum + # and nb_of_transactions should be present + # at both "group header" level and "payment info" level + nb_of_transactions_2_4 = etree.SubElement( + payment_info_2_0, 'NbOfTxs') + control_sum_2_5 = etree.SubElement(payment_info_2_0, 'CtrlSum') + payment_type_info_2_6 = etree.SubElement( + payment_info_2_0, 'PmtTpInf') + if priority: + instruction_priority_2_7 = etree.SubElement( + payment_type_info_2_6, 'InstrPrty') + instruction_priority_2_7.text = priority + service_level_2_8 = etree.SubElement( + payment_type_info_2_6, 'SvcLvl') + service_level_code_2_9 = etree.SubElement(service_level_2_8, 'Cd') + service_level_code_2_9.text = 'SEPA' + if local_instrument: + local_instrument_2_11 = etree.SubElement( + payment_type_info_2_6, 'LclInstrm') + local_instr_code_2_12 = etree.SubElement( + local_instrument_2_11, 'Cd') + local_instr_code_2_12.text = local_instrument + if sequence_type: + sequence_type_2_14 = etree.SubElement( + payment_type_info_2_6, 'SeqTp') + sequence_type_2_14.text = sequence_type + + if gen_args['payment_method'] == 'DD': + request_date_tag = 'ReqdColltnDt' + else: + request_date_tag = 'ReqdExctnDt' + requested_date_2_17 = etree.SubElement( + payment_info_2_0, request_date_tag) + requested_date_2_17.text = requested_date + return payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 + + def generate_initiating_party_block( + self, cr, uid, parent_node, gen_args, context=None): + my_company_name = self._prepare_field( + cr, uid, 'Company Name', + 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name', + {'sepa_export': gen_args['sepa_export']}, + gen_args.get('name_maxsize'), gen_args=gen_args, context=context) + initiating_party_1_8 = etree.SubElement(parent_node, 'InitgPty') + initiating_party_name = etree.SubElement(initiating_party_1_8, 'Nm') + initiating_party_name.text = my_company_name + initiating_party_identifier = self.pool['res.company'].\ + _get_initiating_party_identifier( + cr, uid, + gen_args['sepa_export'].payment_order_ids[0].company_id.id, + context=context) + initiating_party_issuer = gen_args['sepa_export'].\ + payment_order_ids[0].company_id.initiating_party_issuer + if initiating_party_identifier and initiating_party_issuer: + iniparty_id = etree.SubElement(initiating_party_1_8, 'Id') + iniparty_org_id = etree.SubElement(iniparty_id, 'OrgId') + iniparty_org_other = etree.SubElement(iniparty_org_id, 'Othr') + iniparty_org_other_id = etree.SubElement(iniparty_org_other, 'Id') + iniparty_org_other_id.text = initiating_party_identifier + iniparty_org_other_issuer = etree.SubElement( + iniparty_org_other, 'Issr') + iniparty_org_other_issuer.text = initiating_party_issuer + return True + + def generate_party_agent( + self, cr, uid, parent_node, party_type, party_type_label, + order, party_name, iban, bic, eval_ctx, gen_args, context=None): + '''Generate the piece of the XML file corresponding to BIC + This code is mutualized between TRF and DD''' + assert order in ('B', 'C'), "Order can be 'B' or 'C'" + try: + bic = self._prepare_field( + cr, uid, '%s BIC' % party_type_label, bic, eval_ctx, + gen_args=gen_args, context=context) + party_agent = etree.SubElement(parent_node, '%sAgt' % party_type) + party_agent_institution = etree.SubElement( + party_agent, 'FinInstnId') + party_agent_bic = etree.SubElement( + party_agent_institution, gen_args.get('bic_xml_tag')) + party_agent_bic.text = bic + except orm.except_orm: + if order == 'C': + if iban[0:2] != gen_args['initiating_party_country_code']: + raise orm.except_orm( + _('Error:'), + _("The bank account with IBAN '%s' of partner '%s' " + "must have an associated BIC because it is a " + "cross-border SEPA operation.") + % (iban, party_name)) + if order == 'B' or ( + order == 'C' and gen_args['payment_method'] == 'DD'): + party_agent = etree.SubElement( + parent_node, '%sAgt' % party_type) + party_agent_institution = etree.SubElement( + party_agent, 'FinInstnId') + party_agent_other = etree.SubElement( + party_agent_institution, 'Othr') + party_agent_other_identification = etree.SubElement( + party_agent_other, 'Id') + party_agent_other_identification.text = 'NOTPROVIDED' + # for Credit Transfers, in the 'C' block, if BIC is not provided, + # we should not put the 'Creditor Agent' block at all, + # as per the guidelines of the EPC + return True + + def generate_party_block( + self, cr, uid, parent_node, party_type, order, name, iban, bic, + eval_ctx, gen_args, context=None): + '''Generate the piece of the XML file corresponding to Name+IBAN+BIC + This code is mutualized between TRF and DD''' + assert order in ('B', 'C'), "Order can be 'B' or 'C'" + if party_type == 'Cdtr': + party_type_label = 'Creditor' + elif party_type == 'Dbtr': + party_type_label = 'Debtor' + party_name = self._prepare_field( + cr, uid, '%s Name' % party_type_label, name, eval_ctx, + gen_args.get('name_maxsize'), + gen_args=gen_args, context=context) + piban = self._prepare_field( + cr, uid, '%s IBAN' % party_type_label, iban, eval_ctx, + gen_args=gen_args, + context=context) + viban = self._validate_iban(cr, uid, piban, context=context) + # At C level, the order is : BIC, Name, IBAN + # At B level, the order is : Name, IBAN, BIC + if order == 'B': + gen_args['initiating_party_country_code'] = viban[0:2] + elif order == 'C': + self.generate_party_agent( + cr, uid, parent_node, party_type, party_type_label, + order, party_name, viban, bic, + eval_ctx, gen_args, context=context) + party = etree.SubElement(parent_node, party_type) + party_nm = etree.SubElement(party, 'Nm') + party_nm.text = party_name + party_account = etree.SubElement( + parent_node, '%sAcct' % party_type) + party_account_id = etree.SubElement(party_account, 'Id') + party_account_iban = etree.SubElement( + party_account_id, 'IBAN') + party_account_iban.text = viban + if order == 'B': + self.generate_party_agent( + cr, uid, parent_node, party_type, party_type_label, + order, party_name, viban, bic, + eval_ctx, gen_args, context=context) + return True + + def generate_remittance_info_block( + self, cr, uid, parent_node, line, gen_args, context=None): + + remittance_info_2_91 = etree.SubElement( + parent_node, 'RmtInf') + if line.state == 'normal': + remittance_info_unstructured_2_99 = etree.SubElement( + remittance_info_2_91, 'Ustrd') + remittance_info_unstructured_2_99.text = \ + self._prepare_field( + cr, uid, 'Remittance Unstructured Information', + 'line.communication', {'line': line}, 140, + gen_args=gen_args, + context=context) + else: + if not line.struct_communication_type: + raise orm.except_orm( + _('Error:'), + _("Missing 'Structured Communication Type' on payment " + "line with reference '%s'.") + % (line.name)) + remittance_info_structured_2_100 = etree.SubElement( + remittance_info_2_91, 'Strd') + creditor_ref_information_2_120 = etree.SubElement( + remittance_info_structured_2_100, 'CdtrRefInf') + if gen_args.get('pain_flavor') == 'pain.001.001.02': + creditor_ref_info_type_2_121 = etree.SubElement( + creditor_ref_information_2_120, 'CdtrRefTp') + creditor_ref_info_type_code_2_123 = etree.SubElement( + creditor_ref_info_type_2_121, 'Cd') + creditor_ref_info_type_issuer_2_125 = etree.SubElement( + creditor_ref_info_type_2_121, 'Issr') + creditor_reference_2_126 = etree.SubElement( + creditor_ref_information_2_120, 'CdtrRef') + else: + creditor_ref_info_type_2_121 = etree.SubElement( + creditor_ref_information_2_120, 'Tp') + creditor_ref_info_type_or_2_122 = etree.SubElement( + creditor_ref_info_type_2_121, 'CdOrPrtry') + creditor_ref_info_type_code_2_123 = etree.SubElement( + creditor_ref_info_type_or_2_122, 'Cd') + creditor_ref_info_type_issuer_2_125 = etree.SubElement( + creditor_ref_info_type_2_121, 'Issr') + creditor_reference_2_126 = etree.SubElement( + creditor_ref_information_2_120, 'Ref') + + creditor_ref_info_type_code_2_123.text = 'SCOR' + creditor_ref_info_type_issuer_2_125.text = \ + line.struct_communication_type + creditor_reference_2_126.text = \ + self._prepare_field( + cr, uid, 'Creditor Structured Reference', + 'line.communication', {'line': line}, 35, + gen_args=gen_args, + context=context) + return True + + def generate_creditor_scheme_identification( + self, cr, uid, parent_node, identification, identification_label, + eval_ctx, scheme_name_proprietary, gen_args, context=None): + csi_id = etree.SubElement( + parent_node, 'Id') + csi_privateid = csi_id = etree.SubElement(csi_id, 'PrvtId') + csi_other = etree.SubElement(csi_privateid, 'Othr') + csi_other_id = etree.SubElement(csi_other, 'Id') + csi_other_id.text = self._prepare_field( + cr, uid, identification_label, identification, eval_ctx, + gen_args=gen_args, context=context) + csi_scheme_name = etree.SubElement(csi_other, 'SchmeNm') + csi_scheme_name_proprietary = etree.SubElement( + csi_scheme_name, 'Prtry') + csi_scheme_name_proprietary.text = scheme_name_proprietary + return True diff --git a/__unported__/account_banking_pain_base/payment_line.py b/account_banking_pain_base/models/payment_line.py similarity index 100% rename from __unported__/account_banking_pain_base/payment_line.py rename to account_banking_pain_base/models/payment_line.py diff --git a/__unported__/account_banking_pain_base/payment_mode.py b/account_banking_pain_base/models/payment_mode.py similarity index 100% rename from __unported__/account_banking_pain_base/payment_mode.py rename to account_banking_pain_base/models/payment_mode.py diff --git a/account_banking_pain_base/models/res_company.py b/account_banking_pain_base/models/res_company.py new file mode 100644 index 000000000..f63efc29e --- /dev/null +++ b/account_banking_pain_base/models/res_company.py @@ -0,0 +1,82 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# PAIN Base module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# Copyright (C) 2013 Noviat (http://www.noviat.com) +# @author: Alexis de Lattre +# @author: Luc de Meyer (Noviat) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm, fields + + +class ResCompany(orm.Model): + _inherit = 'res.company' + + _columns = { + 'initiating_party_issuer': fields.char( + 'Initiating Party Issuer', size=35, + help="This will be used as the 'Initiating Party Issuer' in the " + "PAIN files generated by OpenERP."), + } + + def _get_initiating_party_identifier( + self, cr, uid, company_id, context=None): + """The code here may be different from one country to another. + If you need to add support for an additionnal country, you can + contribute your code here or inherit this function in the + localization modules for your country""" + assert isinstance(company_id, int), 'Only one company ID' + company = self.browse(cr, uid, company_id, context=context) + company_vat = company.vat + party_identifier = False + if company_vat: + country_code = company_vat[0:2].upper() + if country_code == 'BE': + party_identifier = company_vat[2:].replace(' ', '') + elif country_code == 'ES': + party_identifier = company.sepa_creditor_identifier + return party_identifier + + def _initiating_party_issuer_default(self, cr, uid, context=None): + """If you need to add support for an additionnal country, you can + add an entry in the dict "party_issuer_per_country" here + or inherit this function in the localization modules for + your country""" + initiating_party_issuer = '' + # If your country require the 'Initiating Party Issuer', you should + # contribute the entry for your country in the dict below + party_issuer_per_country = { + 'BE': 'KBO-BCE', # KBO-BCE = the registry of companies in Belgium + } + company_id = self._company_default_get( + cr, uid, 'res.company', context=context) + if company_id: + company = self.browse(cr, uid, company_id, context=context) + country_code = company.country_id.code + initiating_party_issuer = party_issuer_per_country.get( + country_code, '') + return initiating_party_issuer + + def _initiating_party_issuer_def(self, cr, uid, context=None): + return self._initiating_party_issuer_default( + cr, uid, context=context) + + _defaults = { + 'initiating_party_issuer': _initiating_party_issuer_def, + } diff --git a/account_banking_pain_base/payment_line.py b/account_banking_pain_base/payment_line.py new file mode 100644 index 000000000..0dffbcf42 --- /dev/null +++ b/account_banking_pain_base/payment_line.py @@ -0,0 +1,52 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# PAIN Base module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm, fields + + +class payment_line(orm.Model): + _inherit = 'payment.line' + + def _get_struct_communication_types(self, cr, uid, context=None): + return [('ISO', 'ISO')] + + _columns = { + 'priority': fields.selection([ + ('NORM', 'Normal'), + ('HIGH', 'High'), + ], 'Priority', + help="This field will be used as the 'Instruction Priority' in " + "the generated PAIN file."), + # Update size from 64 to 140, because PAIN allows 140 caracters + 'communication': fields.char( + 'Communication', size=140, required=True, + help="Used as the message between ordering customer and current " + "company. Depicts 'What do you want to say to the recipient " + "about this order ?'"), + 'struct_communication_type': fields.selection( + _get_struct_communication_types, 'Structured Communication Type'), + } + + _defaults = { + 'priority': 'NORM', + 'struct_communication_type': 'ISO', + } diff --git a/__unported__/account_banking_pain_base/payment_line_view.xml b/account_banking_pain_base/payment_line_view.xml similarity index 100% rename from __unported__/account_banking_pain_base/payment_line_view.xml rename to account_banking_pain_base/payment_line_view.xml diff --git a/account_banking_pain_base/payment_mode.py b/account_banking_pain_base/payment_mode.py new file mode 100644 index 000000000..540d01b67 --- /dev/null +++ b/account_banking_pain_base/payment_mode.py @@ -0,0 +1,39 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# PAIN Base module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm, fields + + +class payment_mode(orm.Model): + _inherit = 'payment.mode' + + _columns = { + 'convert_to_ascii': fields.boolean( + 'Convert to ASCII', + help="If active, OpenERP will convert each accented caracter to " + "the corresponding unaccented caracter, so that only ASCII " + "caracters are used in the generated PAIN file."), + } + + _defaults = { + 'convert_to_ascii': True, + } diff --git a/__unported__/account_banking_pain_base/payment_mode_view.xml b/account_banking_pain_base/payment_mode_view.xml similarity index 100% rename from __unported__/account_banking_pain_base/payment_mode_view.xml rename to account_banking_pain_base/payment_mode_view.xml diff --git a/account_banking_pain_base/views/payment_line_view.xml b/account_banking_pain_base/views/payment_line_view.xml new file mode 100644 index 000000000..f92b1bbf5 --- /dev/null +++ b/account_banking_pain_base/views/payment_line_view.xml @@ -0,0 +1,41 @@ + + + + + + + pain.base.payment.line.form + payment.line + + + + + + + + + + + + + + pain.base.payment.line.inside.order.form + payment.order + + + + + + + + + + + + + + diff --git a/account_banking_pain_base/views/payment_mode_view.xml b/account_banking_pain_base/views/payment_mode_view.xml new file mode 100644 index 000000000..2deb24999 --- /dev/null +++ b/account_banking_pain_base/views/payment_mode_view.xml @@ -0,0 +1,22 @@ + + + + + + + add.convert_to_ascii.in.payment.mode.form + payment.mode + + + + + + + + + + diff --git a/account_banking_pain_base/views/res_company_view.xml b/account_banking_pain_base/views/res_company_view.xml new file mode 100644 index 000000000..a98d9b641 --- /dev/null +++ b/account_banking_pain_base/views/res_company_view.xml @@ -0,0 +1,24 @@ + + + + + + + pain.group.on.res.company.form + res.company + + + + + + + + + + + + diff --git a/account_banking_payment_export/__init__.py b/account_banking_payment_export/__init__.py new file mode 100644 index 000000000..408a6001b --- /dev/null +++ b/account_banking_payment_export/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +from . import models +from . import wizard diff --git a/__unported__/account_banking_payment_export/__openerp__.py b/account_banking_payment_export/__openerp__.py similarity index 59% rename from __unported__/account_banking_payment_export/__openerp__.py rename to account_banking_payment_export/__openerp__.py index 9a4317b59..bde925e2c 100644 --- a/__unported__/account_banking_payment_export/__openerp__.py +++ b/account_banking_payment_export/__openerp__.py @@ -47,43 +47,41 @@ ], 'data': [ 'view/account_payment.xml', - 'view/bank_payment_manual.xml', 'view/payment_mode.xml', 'view/payment_mode_type.xml', - 'view/payment_order_create_view.xml', + 'wizard/bank_payment_manual.xml', + 'wizard/payment_order_create_view.xml', 'data/payment_mode_type.xml', 'security/ir.model.access.csv', ], 'demo': ['demo/banking_demo.xml'], 'description': ''' - Infrastructure to export payment orders - plus some bug fixes and obvious enhancements to payment orders - that will hopefully land in offical addons one day. +Infrastructure to export payment orders plus some bug fixes and obvious +enhancements to payment orders that will hopefully land in offical addons one +day. - This technical module provides the base infrastructure to export - payment orders for electronic banking. It provides the following - technical features: - * a new payment.mode.type model - * payment.mode now has a mandatory type - * a better implementation of payment_mode.suitable_bank_types() based - on payment.mode.type - * the "make payment" button launches a wizard depending on the - payment.mode.type - * a manual payment mode type is provided as an example, with a default - "do nothing" wizard +This technical module provides the base infrastructure to export payment orders +for electronic banking. It provides the following technical features: - To enable the use of payment order to collect money for customers, - it adds a payment_order_type (payment|debit) as a basis of direct debit - support (this field becomes visible when account_direct_debit is - installed). - Refactoring note: this field should ideally go in account_direct_debit, - but account_banking_payment currently depends on it. +* a new payment.mode.type model +* payment.mode now has a mandatory type +* a better implementation of payment_mode.suitable_bank_types() based on + payment.mode.type +* the "make payment" button launches a wizard depending on the + payment.mode.type +* a manual payment mode type is provided as an example, with a default "do + nothing" wizard - Bug fixes and enhancement that should land in official addons: - * make the search function of the payment export wizard extensible - * fix lp:1275478: allow payment of customer refunds - * display the maturity date of the move lines when you are in - the wizard to select the lines to pay -''', - 'installable': False, +To enable the use of payment order to collect money for customers, +it adds a payment_order_type (payment|debit) as a basis of direct debit support +(this field becomes visible when account_direct_debit is installed). +Refactoring note: this field should ideally go in account_direct_debit, +but account_banking_payment currently depends on it. + +Bug fixes and enhancement that should land in official addons: + +* make the search function of the payment export wizard extensible +* fix lp:1275478: allow payment of customer refunds + ''', + 'installable': True, } diff --git a/__unported__/account_banking_payment_export/data/payment_mode_type.xml b/account_banking_payment_export/data/payment_mode_type.xml similarity index 100% rename from __unported__/account_banking_payment_export/data/payment_mode_type.xml rename to account_banking_payment_export/data/payment_mode_type.xml diff --git a/__unported__/account_banking_payment_export/demo/banking_demo.xml b/account_banking_payment_export/demo/banking_demo.xml similarity index 94% rename from __unported__/account_banking_payment_export/demo/banking_demo.xml rename to account_banking_payment_export/demo/banking_demo.xml index fd29e4c51..b11367bb8 100644 --- a/__unported__/account_banking_payment_export/demo/banking_demo.xml +++ b/account_banking_payment_export/demo/banking_demo.xml @@ -57,6 +57,10 @@ FTNOFRP1XXX + + + + Credit Trf Banque Postale diff --git a/__unported__/account_banking_payment_export/i18n/account_banking_payment_export.pot b/account_banking_payment_export/i18n/account_banking_payment_export.pot similarity index 100% rename from __unported__/account_banking_payment_export/i18n/account_banking_payment_export.pot rename to account_banking_payment_export/i18n/account_banking_payment_export.pot diff --git a/__unported__/account_banking_payment_export/i18n/nl.po b/account_banking_payment_export/i18n/nl.po similarity index 100% rename from __unported__/account_banking_payment_export/i18n/nl.po rename to account_banking_payment_export/i18n/nl.po diff --git a/__unported__/account_banking_payment_export/migrations/7.0.0.1.165/pre-migration.py b/account_banking_payment_export/migrations/7.0.0.1.165/pre-migration.py similarity index 100% rename from __unported__/account_banking_payment_export/migrations/7.0.0.1.165/pre-migration.py rename to account_banking_payment_export/migrations/7.0.0.1.165/pre-migration.py diff --git a/__unported__/account_banking_payment_export/model/__init__.py b/account_banking_payment_export/model/__init__.py similarity index 100% rename from __unported__/account_banking_payment_export/model/__init__.py rename to account_banking_payment_export/model/__init__.py diff --git a/__unported__/account_banking_payment_export/model/account_move_line.py b/account_banking_payment_export/model/account_move_line.py similarity index 100% rename from __unported__/account_banking_payment_export/model/account_move_line.py rename to account_banking_payment_export/model/account_move_line.py diff --git a/__unported__/account_banking_payment_export/model/account_payment.py b/account_banking_payment_export/model/account_payment.py similarity index 100% rename from __unported__/account_banking_payment_export/model/account_payment.py rename to account_banking_payment_export/model/account_payment.py diff --git a/__unported__/account_banking_payment_export/model/bank_payment_manual.py b/account_banking_payment_export/model/bank_payment_manual.py similarity index 100% rename from __unported__/account_banking_payment_export/model/bank_payment_manual.py rename to account_banking_payment_export/model/bank_payment_manual.py diff --git a/__unported__/account_banking_payment_export/model/payment_mode.py b/account_banking_payment_export/model/payment_mode.py similarity index 100% rename from __unported__/account_banking_payment_export/model/payment_mode.py rename to account_banking_payment_export/model/payment_mode.py diff --git a/__unported__/account_banking_payment_export/model/payment_mode_type.py b/account_banking_payment_export/model/payment_mode_type.py similarity index 100% rename from __unported__/account_banking_payment_export/model/payment_mode_type.py rename to account_banking_payment_export/model/payment_mode_type.py diff --git a/__unported__/account_banking_payment_export/model/payment_order_create.py b/account_banking_payment_export/model/payment_order_create.py similarity index 100% rename from __unported__/account_banking_payment_export/model/payment_order_create.py rename to account_banking_payment_export/model/payment_order_create.py diff --git a/account_banking_payment_export/models/__init__.py b/account_banking_payment_export/models/__init__.py new file mode 100644 index 000000000..2f044680a --- /dev/null +++ b/account_banking_payment_export/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +from . import account_payment +from . import payment_mode +from . import payment_mode_type +from . import account_move_line diff --git a/account_banking_payment_export/models/account_move_line.py b/account_banking_payment_export/models/account_move_line.py new file mode 100644 index 000000000..74bb47f81 --- /dev/null +++ b/account_banking_payment_export/models/account_move_line.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2004-2014 OpenERP S.A. (http://www.openerp.com/) +# (C) 2014 Akretion (http://www.akretion.com/) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm, fields +from operator import itemgetter + + +# All the code below aims at fixing one small issue in _to_pay_search() +# But _to_pay_search() is the search function of the field 'amount_to_pay' +# which is a field.function and these functions are not inheritable in OpenERP. +# So we have to inherit the field 'amount_to_pay' and duplicate the related +# functions +# If the patch that I proposed in this bug report +# https://bugs.launchpad.net/openobject-addons/+bug/1275478 +# is integrated in addons/account_payment, then we will be able to remove this +# file. -- Alexis de Lattre +class AccountMoveLine(orm.Model): + _inherit = 'account.move.line' + + def _amount_to_pay(self, cr, uid, ids, name, arg=None, context=None): + """ Return the amount still to pay regarding all the payemnt orders + (excepting cancelled orders)""" + if not ids: + return {} + cr.execute("""SELECT ml.id, + CASE WHEN ml.amount_currency < 0 + THEN - ml.amount_currency + ELSE ml.credit + END - + (SELECT coalesce(sum(amount_currency),0) + FROM payment_line pl + INNER JOIN payment_order po + ON (pl.order_id = po.id) + WHERE move_line_id = ml.id + AND po.state != 'cancel') AS amount + FROM account_move_line ml + WHERE id IN %s""", (tuple(ids),)) + r = dict(cr.fetchall()) + return r + + def _to_pay_search(self, cr, uid, obj, name, args, context=None): + if not args: + return [] + line_obj = self.pool.get('account.move.line') + query = line_obj._query_get(cr, uid, context={}) + where = ' and '.join(map(lambda x: '''(SELECT + CASE WHEN l.amount_currency < 0 + THEN - l.amount_currency + ELSE l.credit + END - coalesce(sum(pl.amount_currency), 0) + FROM payment_line pl + INNER JOIN payment_order po ON (pl.order_id = po.id) + WHERE move_line_id = l.id + AND po.state != 'cancel' + ) %(operator)s %%s ''' % {'operator': x[1]}, args)) + sql_args = tuple(map(itemgetter(2), args)) + cr.execute( + '''SELECT id + FROM account_move_line l + WHERE account_id IN (select id + FROM account_account + WHERE type in %s AND active) + AND reconcile_id IS null + AND credit > 0 + AND ''' + where + ' and ' + query, + (('payable', 'receivable'),) + sql_args) + # The patch we have compared to the original function in + # addons/account_payment is just above : + # original code : type = 'payable' + # fixed code : type in ('payable', 'receivable') + res = cr.fetchall() + if not res: + return [('id', '=', '0')] + return [('id', 'in', map(lambda x:x[0], res))] + + _columns = { + 'amount_to_pay': fields.function( + _amount_to_pay, type='float', string='Amount to pay', + fnct_search=_to_pay_search), + } diff --git a/account_banking_payment_export/models/account_payment.py b/account_banking_payment_export/models/account_payment.py new file mode 100644 index 000000000..069d9b427 --- /dev/null +++ b/account_banking_payment_export/models/account_payment.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2009 EduSense BV (). +# (C) 2011 - 2013 Therp BV (). +# +# All other contributions are (C) by their respective contributors +# +# All Rights Reserved +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api, exceptions, _ +from openerp import netsvc + + +class PaymentOrder(models.Model): + _inherit = 'payment.order' + + payment_order_type = fields.Selection( + [('payment', 'Payment'), ('debit', 'Direct debit')], + 'Payment order type', required=True, default='payment', + readonly=True, states={'draft': [('readonly', False)]}) + mode_type = fields.Many2one('payment.mode.type', related='mode.type', + string='Payment Type') + + @api.multi + def launch_wizard(self): + """Search for a wizard to launch according to the type. + If type is manual. just confirm the order. + Previously (pre-v6) in account_payment/wizard/wizard_pay.py + """ + context = self.env.context.copy() + order = self[0] + # check if a wizard is defined for the first order + if order.mode.type and order.mode.type.ir_model_id: + context['active_ids'] = self.ids + wizard_model = order.mode.type.ir_model_id.model + wizard_obj = self.env[wizard_model] + return { + 'name': wizard_obj._description or _('Payment Order Export'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': wizard_model, + 'domain': [], + 'context': context, + 'type': 'ir.actions.act_window', + 'target': 'new', + 'nodestroy': True, + } + else: + # should all be manual orders without type or wizard model + for order in self[1:]: + if order.mode.type and order.mode.type.ir_model_id: + raise exceptions.Warning( + _('Error'), + _('You can only combine payment orders of the same ' + 'type')) + # process manual payments + wf_service = netsvc.LocalService('workflow') + for order_id in self.ids: + wf_service.trg_validate(self.env.uid, 'payment.order', + order_id, 'done', self.env.cr) + return {} diff --git a/account_banking_payment_export/models/payment_mode.py b/account_banking_payment_export/models/payment_mode.py new file mode 100644 index 000000000..b35a150ba --- /dev/null +++ b/account_banking_payment_export/models/payment_mode.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2009 EduSense BV (). +# (C) 2011 - 2013 Therp BV (). +# +# All other contributions are (C) by their respective contributors +# +# All Rights Reserved +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields + + +class PaymentMode(models.Model): + """Restoring the payment type from version 5, + used to select the export wizard (if any) + """ + _inherit = "payment.mode" + + def suitable_bank_types(self, cr, uid, payment_mode_id=None, context=None): + """ Reinstates functional code for suitable bank type filtering. + Current code in account_payment is disfunctional. + """ + res = [] + payment_mode = self.browse(cr, uid, payment_mode_id, context=context) + if (payment_mode and payment_mode.type and + payment_mode.type.suitable_bank_types): + res = [t.code for t in payment_mode.type.suitable_bank_types] + return res + + type = fields.Many2one( + 'payment.mode.type', string='Export type', required=True, + help='Select the Export Payment Type for the Payment Mode.') + payment_order_type = fields.Selection( + related='type.payment_order_type', readonly=True, string="Order Type", + selection=[('payment', 'Payment'), ('debit', 'Debit')], + help="This field, that comes from export type, determines if this " + "mode can be selected for customers or suppliers.") + active = fields.Boolean(string='Active', default=True) diff --git a/account_banking_payment_export/models/payment_mode_type.py b/account_banking_payment_export/models/payment_mode_type.py new file mode 100644 index 000000000..4093da765 --- /dev/null +++ b/account_banking_payment_export/models/payment_mode_type.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2009 EduSense BV (). +# (C) 2011 - 2013 Therp BV (). +# +# All other contributions are (C) by their respective contributors +# +# All Rights Reserved +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields + + +class PaymentModeType(models.Model): + _name = 'payment.mode.type' + _description = 'Payment Mode Type' + + name = fields.Char('Name', size=64, required=True, help='Payment Type') + code = fields.Char('Code', size=64, required=True, + help='Specify the Code for Payment Type') + suitable_bank_types = fields.Many2many( + comodel_name='res.partner.bank.type', + relation='bank_type_payment_type_rel', column1='pay_type_id', + column2='bank_type_id', string='Suitable bank types', required=True) + ir_model_id = fields.Many2one( + 'ir.model', string='Payment wizard', + help='Select the Payment Wizard for payments of this type. Leave ' + 'empty for manual processing', + domain=[('osv_memory', '=', True)]) + payment_order_type = fields.Selection( + [('payment', 'Payment'), ('debit', 'Debit')], + string='Order type', required=True, default='payment', + help="This field determines if this type applies to customers " + "(Debit) or suppliers (Payment)") + active = fields.Boolean(string='Active', default=True) + + def _auto_init(self, cr, context=None): + res = super(PaymentModeType, self)._auto_init(cr, context=context) + # migrate xmlid from manual_bank_transfer to avoid dependency on + # account_banking + cr.execute( + """UPDATE ir_model_data + SET module='account_banking_payment_export' + WHERE module='account_banking' AND + name='manual_bank_tranfer' AND + model='payment.mode.type'""") + return res diff --git a/__unported__/account_banking_payment_export/security/ir.model.access.csv b/account_banking_payment_export/security/ir.model.access.csv similarity index 100% rename from __unported__/account_banking_payment_export/security/ir.model.access.csv rename to account_banking_payment_export/security/ir.model.access.csv diff --git a/__unported__/account_banking_payment_export/view/account_payment.xml b/account_banking_payment_export/view/account_payment.xml similarity index 100% rename from __unported__/account_banking_payment_export/view/account_payment.xml rename to account_banking_payment_export/view/account_payment.xml diff --git a/__unported__/account_banking_payment_export/view/bank_payment_manual.xml b/account_banking_payment_export/view/bank_payment_manual.xml similarity index 100% rename from __unported__/account_banking_payment_export/view/bank_payment_manual.xml rename to account_banking_payment_export/view/bank_payment_manual.xml diff --git a/__unported__/account_banking_payment_export/view/payment_mode.xml b/account_banking_payment_export/view/payment_mode.xml similarity index 97% rename from __unported__/account_banking_payment_export/view/payment_mode.xml rename to account_banking_payment_export/view/payment_mode.xml index 611b233e8..42b19ca2d 100644 --- a/__unported__/account_banking_payment_export/view/payment_mode.xml +++ b/account_banking_payment_export/view/payment_mode.xml @@ -2,7 +2,7 @@ - diff --git a/__unported__/account_banking_payment_export/view/payment_mode_type.xml b/account_banking_payment_export/view/payment_mode_type.xml similarity index 77% rename from __unported__/account_banking_payment_export/view/payment_mode_type.xml rename to account_banking_payment_export/view/payment_mode_type.xml index a3bd21c25..4ca3acac7 100644 --- a/__unported__/account_banking_payment_export/view/payment_mode_type.xml +++ b/account_banking_payment_export/view/payment_mode_type.xml @@ -20,11 +20,18 @@
- - - - - + + + + + + + + + + +
@@ -44,7 +51,7 @@
- Payment Type + Payment Export Types payment.mode.type form tree,form diff --git a/__unported__/account_banking_payment_export/view/payment_order_create_view.xml b/account_banking_payment_export/view/payment_order_create_view.xml similarity index 100% rename from __unported__/account_banking_payment_export/view/payment_order_create_view.xml rename to account_banking_payment_export/view/payment_order_create_view.xml diff --git a/account_banking_payment_export/wizard/__init__.py b/account_banking_payment_export/wizard/__init__.py new file mode 100644 index 000000000..f30ac09dd --- /dev/null +++ b/account_banking_payment_export/wizard/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +from . import payment_order_create +from . import bank_payment_manual diff --git a/account_banking_payment_export/wizard/bank_payment_manual.py b/account_banking_payment_export/wizard/bank_payment_manual.py new file mode 100644 index 000000000..dd7beee10 --- /dev/null +++ b/account_banking_payment_export/wizard/bank_payment_manual.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2009 EduSense BV (). +# (C) 2011 - 2013 Therp BV (). +# +# All other contributions are (C) by their respective contributors +# +# All Rights Reserved +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +"""This module contains a single "wizard" for confirming manual +bank transfers. +""" + +from openerp import models, fields, api +from openerp import netsvc + + +class PaymentManual(models.TransientModel): + _name = 'payment.manual' + _description = 'Send payment order(s) manually' + + payment_order_ids = fields.Many2many( + comodel_name='payment.order', relation='wiz_manual_payorders_rel', + column1='wizard_id', column2='payment_order_id', + string='Payment orders', readonly=True), + + def create(self, vals): + payment_order_ids = self.env.context.get('active_ids', []) + vals['payment_order_ids'] = [[6, 0, payment_order_ids]] + return super(PaymentManual, self).create(vals) + + @api.one + def button_ok(self): + wf_service = netsvc.LocalService('workflow') + for order_id in self.payment_order_ids: + wf_service.trg_validate(self.env.uid, 'payment.order', order_id.id, + 'done', self.env.cr) + return {'type': 'ir.actions.act_window_close'} diff --git a/account_banking_payment_export/wizard/bank_payment_manual.xml b/account_banking_payment_export/wizard/bank_payment_manual.xml new file mode 100644 index 000000000..e350c9b6f --- /dev/null +++ b/account_banking_payment_export/wizard/bank_payment_manual.xml @@ -0,0 +1,18 @@ + + + + + Form for manual payment wizard + payment.manual + +
+
+
+
+
diff --git a/account_banking_payment_export/wizard/payment_order_create.py b/account_banking_payment_export/wizard/payment_order_create.py new file mode 100644 index 000000000..0a34c021f --- /dev/null +++ b/account_banking_payment_export/wizard/payment_order_create.py @@ -0,0 +1,175 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2009 EduSense BV (). +# (C) 2011 - 2013 Therp BV (). +# +# All other contributions are (C) by their respective contributors +# +# All Rights Reserved +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api, _ + + +class PaymentOrderCreate(models.TransientModel): + _inherit = 'payment.order.create' + + populate_results = fields.Boolean(string="Populate results directly", + default=True) + + @api.model + def default_get(self, fields): + res = super(PaymentOrderCreate, self).default_get(fields) + context = self.env.context + if ('entries' in fields and context.get('line_ids') and + context.get('populate_results')): + res.update({'entries': context['line_ids']}) + return res + + @api.model + def extend_payment_order_domain(self, payment_order, domain): + if payment_order.payment_order_type == 'payment': + domain += [('account_id.type', 'in', ('payable', 'receivable')), + ('amount_to_pay', '>', 0)] + return True + + @api.multi + def search_entries(self): + """This method taken from account_payment module. + We adapt the domain based on the payment_order_type + """ + line_obj = self.env['account.move.line'] + model_data_obj = self.env['ir.model.data'] + # -- start account_banking_payment -- + payment = self.env['payment.order'].browse( + self.env.context['active_id']) + # Search for move line to pay: + domain = [('move_id.state', '=', 'posted'), + ('reconcile_id', '=', False), + ('company_id', '=', payment.mode.company_id.id)] + self.extend_payment_order_domain(payment, domain) + # -- end account_direct_debit -- + domain += ['|', + ('date_maturity', '<=', self.duedate), + ('date_maturity', '=', False)] + lines = line_obj.search(domain) + context = self.env.context.copy() + context['line_ids'] = lines.ids + context['populate_results'] = self.populate_results + model_datas = model_data_obj.search( + [('model', '=', 'ir.ui.view'), + ('name', '=', 'view_create_payment_order_lines')]) + return {'name': _('Entry Lines'), + 'context': context, + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'payment.order.create', + 'views': [(model_datas[0].res_id, 'form')], + 'type': 'ir.actions.act_window', + 'target': 'new', + } + + @api.model + def _prepare_payment_line(self, payment, line): + """This function is designed to be inherited + The resulting dict is passed to the create method of payment.line""" + _today = fields.Date.context_today(self) + date_to_pay = False # no payment date => immediate payment + if payment.date_prefered == 'due': + # -- account_banking + # date_to_pay = line.date_maturity + date_to_pay = ( + line.date_maturity + if line.date_maturity and line.date_maturity > _today + else False) + # -- end account banking + elif payment.date_prefered == 'fixed': + # -- account_banking + # date_to_pay = payment.date_scheduled + date_to_pay = ( + payment.date_scheduled + if payment.date_scheduled and payment.date_scheduled > _today + else False) + # -- end account banking + # -- account_banking + state = 'normal' + communication = line.ref or '-' + if line.invoice: + if line.invoice.type in ('in_invoice', 'in_refund'): + if line.invoice.reference_type == 'structured': + state = 'structured' + communication = line.invoice.reference + else: + if line.invoice.reference: + communication = line.invoice.reference + elif line.invoice.supplier_invoice_number: + communication = line.invoice.supplier_invoice_number + else: + # Make sure that the communication includes the + # customer invoice number (in the case of debit order) + communication = line.invoice.number.replace('/', '') + state = 'structured' + # support debit orders when enabled + if (payment.payment_order_type == 'debit' and + 'amount_to_receive' in line): + amount_currency = line.amount_to_receive + else: + amount_currency = line.amount_to_pay + line2bank = line.line2bank(payment.mode.id) + # -- end account banking + res = {'move_line_id': line.id, + 'amount_currency': amount_currency, + 'bank_id': line2bank.get(line.id), + 'order_id': payment.id, + 'partner_id': line.partner_id and line.partner_id.id or False, + # account banking + 'communication': communication, + 'state': state, + # end account banking + 'date': date_to_pay, + 'currency': (line.invoice and line.invoice.currency_id.id + or line.journal_id.currency.id + or line.journal_id.company_id.currency_id.id)} + return res + + @api.multi + def create_payment(self): + """This method is a slightly modified version of the existing method on + this model in account_payment. + - pass the payment mode to line2bank() + - allow invoices to create influence on the payment process: not only + 'Free' references are allowed, but others as well + - check date_to_pay is not in the past. + """ + if not self.entries: + return {'type': 'ir.actions.act_window_close'} + context = self.env.context + payment_line_obj = self.env['payment.line'] + payment = self.env['payment.order'].browse(context['active_id']) + # Populate the current payment with new lines: + for line in self.entries: + vals = self._prepare_payment_line(payment, line) + payment_line_obj.create(vals) + # Force reload of payment order view as a workaround for lp:1155525 + return {'name': _('Payment Orders'), + 'context': context, + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'payment.order', + 'res_id': context['active_id'], + 'type': 'ir.actions.act_window'} diff --git a/account_banking_payment_export/wizard/payment_order_create_view.xml b/account_banking_payment_export/wizard/payment_order_create_view.xml new file mode 100644 index 000000000..d70135343 --- /dev/null +++ b/account_banking_payment_export/wizard/payment_order_create_view.xml @@ -0,0 +1,34 @@ + + + + + + + payment.order.create.form.export + payment.order.create + + + + + + + + + + add.context.to.display.maturity.date + payment.order.create + + + + {'journal_type': 'sale'} + 1 + + + + + + diff --git a/account_banking_sepa_credit_transfer/__init__.py b/account_banking_sepa_credit_transfer/__init__.py new file mode 100644 index 000000000..c30bd487e --- /dev/null +++ b/account_banking_sepa_credit_transfer/__init__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Credit Transfer module for OpenERP +# Copyright (C) 2010-2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import wizard +from . import models diff --git a/__unported__/account_banking_sepa_credit_transfer/__openerp__.py b/account_banking_sepa_credit_transfer/__openerp__.py similarity index 71% rename from __unported__/account_banking_sepa_credit_transfer/__openerp__.py rename to account_banking_sepa_credit_transfer/__openerp__.py index 230e10e2d..89b56c189 100644 --- a/__unported__/account_banking_sepa_credit_transfer/__openerp__.py +++ b/account_banking_sepa_credit_transfer/__openerp__.py @@ -26,39 +26,34 @@ 'license': 'AGPL-3', 'author': 'Akretion', 'website': 'http://www.akretion.com', + 'contributors': ['Pedro M. Baeza '], 'category': 'Banking addons', 'depends': ['account_banking_pain_base'], 'external_dependencies': { 'python': ['unidecode', 'lxml'], - }, + }, 'data': [ - 'account_banking_sepa_view.xml', + 'views/account_banking_sepa_view.xml', 'wizard/export_sepa_view.xml', 'data/payment_type_sepa_sct.xml', 'security/ir.model.access.csv', ], - 'demo': ['sepa_credit_transfer_demo.xml'], + 'demo': [ + 'demo/sepa_credit_transfer_demo.xml' + ], 'description': ''' Module to export payment orders in SEPA XML file format. SEPA PAIN (PAyment INitiation) is the new european standard for -Customer-to-Bank payment instructions. - -This module implements SEPA Credit Transfer (SCT), more specifically PAIN -versions 001.001.02, 001.001.03, 001.001.04 and 001.001.05. -It is part of the ISO 20022 standard, available on http://www.iso20022.org. +Customer-to-Bank payment instructions. This module implements SEPA Credit +Transfer (SCT), more specifically PAIN versions 001.001.02, 001.001.03, +001.001.04 and 001.001.05. It is part of the ISO 20022 standard, available on +http://www.iso20022.org. The Implementation Guidelines for SEPA Credit Transfer published by the -European Payments Council (http://http://www.europeanpaymentscouncil.eu) -use PAIN version 001.001.03, so it's probably the version of PAIN that you -should try first. - -This module uses the framework provided by the banking addons, -cf https://www.github.com/OCA/banking-addons - -Please contact Alexis de Lattre from Akretion -for any help or question about this module. +European Payments Council (http://http://www.europeanpaymentscouncil.eu) use +PAIN version 001.001.03, so it's probably the version of PAIN that you should +try first. ''', - 'active': False, - 'installable': False, + 'installable': True, } diff --git a/__unported__/account_banking_sepa_credit_transfer/account_banking_sepa.py b/account_banking_sepa_credit_transfer/account_banking_sepa.py similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/account_banking_sepa.py rename to account_banking_sepa_credit_transfer/account_banking_sepa.py diff --git a/__unported__/account_banking_sepa_credit_transfer/account_banking_sepa_view.xml b/account_banking_sepa_credit_transfer/account_banking_sepa_view.xml similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/account_banking_sepa_view.xml rename to account_banking_sepa_credit_transfer/account_banking_sepa_view.xml diff --git a/__unported__/account_banking_sepa_credit_transfer/data/pain.001.001.02.xsd b/account_banking_sepa_credit_transfer/data/pain.001.001.02.xsd similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/data/pain.001.001.02.xsd rename to account_banking_sepa_credit_transfer/data/pain.001.001.02.xsd diff --git a/__unported__/account_banking_sepa_credit_transfer/data/pain.001.001.03.xsd b/account_banking_sepa_credit_transfer/data/pain.001.001.03.xsd similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/data/pain.001.001.03.xsd rename to account_banking_sepa_credit_transfer/data/pain.001.001.03.xsd diff --git a/__unported__/account_banking_sepa_credit_transfer/data/pain.001.001.04.xsd b/account_banking_sepa_credit_transfer/data/pain.001.001.04.xsd similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/data/pain.001.001.04.xsd rename to account_banking_sepa_credit_transfer/data/pain.001.001.04.xsd diff --git a/__unported__/account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd b/account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd rename to account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd diff --git a/__unported__/account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml b/account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml similarity index 88% rename from __unported__/account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml rename to account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml index f07ece146..31d851edb 100644 --- a/__unported__/account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml +++ b/account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml @@ -7,6 +7,7 @@ SEPA Credit Transfer v05 pain.001.001.05 + payment @@ -15,6 +16,7 @@ SEPA Credit Transfer v04 pain.001.001.04 + payment @@ -23,6 +25,7 @@ SEPA Credit Transfer v03 (recommended) pain.001.001.03 + payment @@ -31,6 +34,7 @@ SEPA Credit Transfer v02 pain.001.001.02 + payment diff --git a/__unported__/account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml b/account_banking_sepa_credit_transfer/demo/sepa_credit_transfer_demo.xml similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml rename to account_banking_sepa_credit_transfer/demo/sepa_credit_transfer_demo.xml diff --git a/__unported__/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot b/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot rename to account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot diff --git a/__unported__/account_banking_sepa_credit_transfer/i18n/fr.po b/account_banking_sepa_credit_transfer/i18n/fr.po similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/i18n/fr.po rename to account_banking_sepa_credit_transfer/i18n/fr.po diff --git a/__unported__/account_banking_sepa_credit_transfer/i18n/nl.po b/account_banking_sepa_credit_transfer/i18n/nl.po similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/i18n/nl.po rename to account_banking_sepa_credit_transfer/i18n/nl.po diff --git a/__unported__/account_banking_sepa_credit_transfer/__init__.py b/account_banking_sepa_credit_transfer/models/__init__.py similarity index 98% rename from __unported__/account_banking_sepa_credit_transfer/__init__.py rename to account_banking_sepa_credit_transfer/models/__init__.py index 207f87a21..90e481210 100644 --- a/__unported__/account_banking_sepa_credit_transfer/__init__.py +++ b/account_banking_sepa_credit_transfer/models/__init__.py @@ -20,5 +20,4 @@ # ############################################################################## -from . import wizard from . import account_banking_sepa diff --git a/account_banking_sepa_credit_transfer/models/account_banking_sepa.py b/account_banking_sepa_credit_transfer/models/account_banking_sepa.py new file mode 100644 index 000000000..69b7d20ae --- /dev/null +++ b/account_banking_sepa_credit_transfer/models/account_banking_sepa.py @@ -0,0 +1,76 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Credit Transfer module for OpenERP +# Copyright (C) 2010-2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api +from openerp.addons.decimal_precision import decimal_precision as dp +from unidecode import unidecode + + +class BankingExportSepa(models.Model): + """SEPA export""" + _name = 'banking.export.sepa' + _description = __doc__ + _rec_name = 'filename' + + @api.one + def _generate_filename(self): + ref = self.payment_order_ids[0].reference + if ref: + label = unidecode(ref.replace('/', '-')) + else: + label = 'error' + self.filename = 'sct_%s.xml' % label + + payment_order_ids = fields.Many2many( + comodel_name='payment.order', column1='banking_export_sepa_id', + column2='account_order_id', relation='account_payment_order_sepa_rel', + string='Payment Orders', readonly=True) + nb_transactions = fields.Integer(string='Number of Transactions', + readonly=True) + total_amount = fields.Float(string='Total Amount', + digits_compute=dp.get_precision('Account'), + readonly=True) + batch_booking = fields.Boolean( + 'Batch Booking', readonly=True, + help="If true, the bank statement will display only one debit line " + "for all the wire transfers of the SEPA XML file ; if false, " + "the bank statement will display one debit line per wire " + "transfer of the SEPA XML file.") + charge_bearer = fields.Selection( + [('SLEV', 'Following Service Level'), + ('SHAR', 'Shared'), + ('CRED', 'Borne by Creditor'), + ('DEBT', 'Borne by Debtor')], string='Charge Bearer', readonly=True, + help="Following service level : transaction charges are to be applied " + "following the rules agreed in the service level and/or scheme " + "(SEPA Core messages must use this). Shared : transaction " + "charges on the creditor side are to be borne by the creditor, " + "transaction charges on the debtor side are to be borne by the " + "debtor. Borne by creditor : all transaction charges are to be " + "borne by the creditor. Borne by debtor : all transaction " + "charges are to be borne by the debtor.") + create_date = fields.Datetime('Generation Date', readonly=True) + file = fields.Binary('SEPA XML File', readonly=True) + filename = fields.Char(string='Filename', size=256, readonly=True, + compute=_generate_filename) + state = fields.Selection([('draft', 'Draft'), ('sent', 'Sent')], + string='State', readonly=True, default='draft') diff --git a/__unported__/account_banking_sepa_credit_transfer/security/ir.model.access.csv b/account_banking_sepa_credit_transfer/security/ir.model.access.csv similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/security/ir.model.access.csv rename to account_banking_sepa_credit_transfer/security/ir.model.access.csv diff --git a/account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml b/account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml new file mode 100644 index 000000000..77abf1b34 --- /dev/null +++ b/account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml @@ -0,0 +1,15 @@ + + + + + + + SEPA Credit Transfer La Banque Postale + + + + + + + + diff --git a/account_banking_sepa_credit_transfer/static/description/icon.svg b/account_banking_sepa_credit_transfer/static/description/icon.svg new file mode 100644 index 000000000..266ef8442 --- /dev/null +++ b/account_banking_sepa_credit_transfer/static/description/icon.svg @@ -0,0 +1,92 @@ + + + +image/svg+xmlCREDITTRANSFER + \ No newline at end of file diff --git a/__unported__/account_banking_sepa_credit_transfer/static/src/img/icon.png b/account_banking_sepa_credit_transfer/static/src/img/icon.png similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/static/src/img/icon.png rename to account_banking_sepa_credit_transfer/static/src/img/icon.png diff --git a/account_banking_sepa_credit_transfer/views/account_banking_sepa_view.xml b/account_banking_sepa_credit_transfer/views/account_banking_sepa_view.xml new file mode 100644 index 000000000..a5896c757 --- /dev/null +++ b/account_banking_sepa_credit_transfer/views/account_banking_sepa_view.xml @@ -0,0 +1,77 @@ + + + + + + + account.banking.export.sepa.form + banking.export.sepa + +
+
+ +
+ + + + + + + + + + + + + + + + +
+
+
+ + + + account.banking.export.sepa.tree + banking.export.sepa + + + + + + + + + + + + + SEPA Credit Transfer Files + banking.export.sepa + form + tree,form + + + + + + + +
+
diff --git a/__unported__/account_banking_sepa_credit_transfer/wizard/__init__.py b/account_banking_sepa_credit_transfer/wizard/__init__.py similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/wizard/__init__.py rename to account_banking_sepa_credit_transfer/wizard/__init__.py diff --git a/__unported__/account_banking_sepa_credit_transfer/wizard/export_sepa.py b/account_banking_sepa_credit_transfer/wizard/export_sepa.py similarity index 95% rename from __unported__/account_banking_sepa_credit_transfer/wizard/export_sepa.py rename to account_banking_sepa_credit_transfer/wizard/export_sepa.py index eb2461ad8..7b2c94ef9 100644 --- a/__unported__/account_banking_sepa_credit_transfer/wizard/export_sepa.py +++ b/account_banking_sepa_credit_transfer/wizard/export_sepa.py @@ -89,9 +89,7 @@ class banking_export_sepa_wizard(orm.TransientModel): cr, uid, vals, context=context) def create_sepa(self, cr, uid, ids, context=None): - ''' - Creates the SEPA Credit Transfer file. That's the important code ! - ''' + """Creates the SEPA Credit Transfer file. That's the important code!""" if context is None: context = {} sepa_export = self.browse(cr, uid, ids[0], context=context) @@ -122,16 +120,14 @@ class banking_export_sepa_wizard(orm.TransientModel): bic_xml_tag = 'BICFI' name_maxsize = 140 root_xml_tag = 'CstmrCdtTrfInitn' - else: raise orm.except_orm( _('Error:'), _("Payment Type Code '%s' is not supported. The only " - "Payment Type Codes supported for SEPA Credit Transfers " - "are 'pain.001.001.02', 'pain.001.001.03', " - "'pain.001.001.04' and 'pain.001.001.05'.") - % pain_flavor) - + "Payment Type Codes supported for SEPA Credit Transfers " + "are 'pain.001.001.02', 'pain.001.001.03', " + "'pain.001.001.04' and 'pain.001.001.05'.") % + pain_flavor) gen_args = { 'bic_xml_tag': bic_xml_tag, 'name_maxsize': name_maxsize, @@ -144,22 +140,18 @@ class banking_export_sepa_wizard(orm.TransientModel): 'account_banking_sepa_credit_transfer/data/%s.xsd' % pain_flavor, } - pain_ns = { 'xsi': 'http://www.w3.org/2001/XMLSchema-instance', None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor, } - xml_root = etree.Element('Document', nsmap=pain_ns) pain_root = etree.SubElement(xml_root, root_xml_tag) pain_03_to_05 = \ ['pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05'] - # A. Group header group_header_1_0, nb_of_transactions_1_6, control_sum_1_7 = \ self.generate_group_header_block( cr, uid, pain_root, gen_args, context=context) - transactions_count_1_6 = 0 total_amount = 0.0 amount_control_sum_1_7 = 0.0 @@ -187,7 +179,6 @@ class banking_export_sepa_wizard(orm.TransientModel): self.pool['payment.line'].write( cr, uid, line.id, {'date': requested_date}, context=context) - for (requested_date, priority), lines in lines_per_group.items(): # B. Payment info payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 = \ @@ -200,7 +191,6 @@ class banking_export_sepa_wizard(orm.TransientModel): 'priority': priority, 'requested_date': requested_date, }, gen_args, context=context) - self.generate_party_block( cr, uid, payment_info_2_0, 'Dbtr', 'B', 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.' @@ -209,10 +199,8 @@ class banking_export_sepa_wizard(orm.TransientModel): 'sepa_export.payment_order_ids[0].mode.bank_id.bank.bic', {'sepa_export': sepa_export}, gen_args, context=context) - charge_bearer_2_24 = etree.SubElement(payment_info_2_0, 'ChrgBr') charge_bearer_2_24.text = sepa_export.charge_bearer - transactions_count_2_4 = 0 amount_control_sum_2_5 = 0.0 for line in lines: @@ -240,7 +228,6 @@ class banking_export_sepa_wizard(orm.TransientModel): instructed_amount_2_43.text = '%.2f' % line.amount_currency amount_control_sum_1_7 += line.amount_currency amount_control_sum_2_5 += line.amount_currency - if not line.bank_id: raise orm.except_orm( _('Error:'), @@ -252,45 +239,38 @@ class banking_export_sepa_wizard(orm.TransientModel): 'C', 'line.partner_id.name', 'line.bank_id.acc_number', 'line.bank_id.bank.bic', {'line': line}, gen_args, context=context) - self.generate_remittance_info_block( cr, uid, credit_transfer_transaction_info_2_27, line, gen_args, context=context) - if pain_flavor in pain_03_to_05: nb_of_transactions_2_4.text = str(transactions_count_2_4) control_sum_2_5.text = '%.2f' % amount_control_sum_2_5 - if pain_flavor in pain_03_to_05: nb_of_transactions_1_6.text = str(transactions_count_1_6) control_sum_1_7.text = '%.2f' % amount_control_sum_1_7 else: nb_of_transactions_1_6.text = str(transactions_count_1_6) control_sum_1_7.text = '%.2f' % amount_control_sum_1_7 - return self.finalize_sepa_file_creation( cr, uid, ids, xml_root, total_amount, transactions_count_1_6, gen_args, context=context) def cancel_sepa(self, cr, uid, ids, context=None): - ''' - Cancel the SEPA file: just drop the file - ''' + """Cancel the SEPA file: just drop the file""" sepa_export = self.browse(cr, uid, ids[0], context=context) - self.pool.get('banking.export.sepa').unlink( + self.pool['banking.export.sepa'].unlink( cr, uid, sepa_export.file_id.id, context=context) return {'type': 'ir.actions.act_window_close'} def save_sepa(self, cr, uid, ids, context=None): - ''' - Save the SEPA file: send the done signal to all payment + """Save the SEPA file: send the done signal to all payment orders in the file. With the default workflow, they will transition to 'done', while with the advanced workflow in account_banking_payment they will transition to 'sent' waiting reconciliation. - ''' + """ sepa_export = self.browse(cr, uid, ids[0], context=context) - self.pool.get('banking.export.sepa').write( + self.pool['banking.export.sepa'].write( cr, uid, sepa_export.file_id.id, {'state': 'sent'}, context=context) wf_service = netsvc.LocalService('workflow') diff --git a/__unported__/account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml b/account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml similarity index 100% rename from __unported__/account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml rename to account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml diff --git a/__unported__/account_banking_sepa_direct_debit/__init__.py b/account_banking_sepa_direct_debit/__init__.py similarity index 94% rename from __unported__/account_banking_sepa_direct_debit/__init__.py rename to account_banking_sepa_direct_debit/__init__.py index f852fb7bd..096fe8ad3 100644 --- a/__unported__/account_banking_sepa_direct_debit/__init__.py +++ b/account_banking_sepa_direct_debit/__init__.py @@ -20,6 +20,5 @@ # ############################################################################## -from . import company +from . import models from . import wizard -from . import account_banking_sdd diff --git a/__unported__/account_banking_sepa_direct_debit/__openerp__.py b/account_banking_sepa_direct_debit/__openerp__.py similarity index 70% rename from __unported__/account_banking_sepa_direct_debit/__openerp__.py rename to account_banking_sepa_direct_debit/__openerp__.py index 2e109be26..5f222df80 100644 --- a/__unported__/account_banking_sepa_direct_debit/__openerp__.py +++ b/account_banking_sepa_direct_debit/__openerp__.py @@ -26,47 +26,40 @@ 'license': 'AGPL-3', 'author': 'Akretion', 'website': 'http://www.akretion.com', + 'contributors': ['Pedro M. Baeza '], 'category': 'Banking addons', 'depends': ['account_direct_debit', 'account_banking_pain_base'], 'external_dependencies': { 'python': ['unidecode', 'lxml'], }, 'data': [ - 'security/original_mandate_required_security.xml', - 'account_banking_sdd_view.xml', - 'sdd_mandate_view.xml', - 'res_partner_bank_view.xml', - 'account_payment_view.xml', - 'company_view.xml', - 'mandate_expire_cron.xml', - 'account_invoice_view.xml', + 'views/account_banking_sdd_view.xml', + 'views/sdd_mandate_view.xml', + 'views/res_partner_bank_view.xml', + 'views/account_payment_view.xml', + 'views/res_company_view.xml', + 'views/account_invoice_view.xml', 'wizard/export_sdd_view.xml', + 'data/mandate_expire_cron.xml', 'data/payment_type_sdd.xml', 'data/mandate_reference_sequence.xml', + 'security/original_mandate_required_security.xml', 'security/ir.model.access.csv', ], - 'demo': ['sepa_direct_debit_demo.xml'], + 'demo': ['demo/sepa_direct_debit_demo.xml'], 'description': ''' Module to export direct debit payment orders in SEPA XML file format. SEPA PAIN (PAyment INitiation) is the new european standard for -Customer-to-Bank payment instructions. - -This module implements SEPA Direct Debit (SDD), more specifically PAIN -versions 008.001.02, 008.001.03 and 008.001.04. -It is part of the ISO 20022 standard, available on http://www.iso20022.org. +Customer-to-Bank payment instructions. This module implements SEPA Direct +Debit (SDD), more specifically PAIN versions 008.001.02, 008.001.03 and +008.001.04. It is part of the ISO 20022 standard, available on +http://www.iso20022.org. The Implementation Guidelines for SEPA Direct Debit published by the European Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN -version 008.001.02. So if you don't know which version your bank supports, -you should try version 008.001.02 first. - -This module uses the framework provided by the banking addons, -cf https://www.github.com/OCA/banking-addons - -Please contact Alexis de Lattre from Akretion -for any help or question about this module. +version 008.001.02. So if you don't know which version your bank supports, you +should try version 008.001.02 first. ''', - 'active': False, - 'installable': False, + 'installable': True, } diff --git a/__unported__/account_banking_sepa_direct_debit/account_banking_sdd.py b/account_banking_sepa_direct_debit/account_banking_sdd.py similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/account_banking_sdd.py rename to account_banking_sepa_direct_debit/account_banking_sdd.py diff --git a/__unported__/account_banking_sepa_direct_debit/account_banking_sdd_view.xml b/account_banking_sepa_direct_debit/account_banking_sdd_view.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/account_banking_sdd_view.xml rename to account_banking_sepa_direct_debit/account_banking_sdd_view.xml diff --git a/__unported__/account_banking_sepa_direct_debit/account_invoice_view.xml b/account_banking_sepa_direct_debit/account_invoice_view.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/account_invoice_view.xml rename to account_banking_sepa_direct_debit/account_invoice_view.xml diff --git a/__unported__/account_banking_sepa_direct_debit/account_payment_view.xml b/account_banking_sepa_direct_debit/account_payment_view.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/account_payment_view.xml rename to account_banking_sepa_direct_debit/account_payment_view.xml diff --git a/__unported__/account_banking_sepa_direct_debit/company.py b/account_banking_sepa_direct_debit/company.py similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/company.py rename to account_banking_sepa_direct_debit/company.py diff --git a/__unported__/account_banking_sepa_direct_debit/company_view.xml b/account_banking_sepa_direct_debit/company_view.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/company_view.xml rename to account_banking_sepa_direct_debit/company_view.xml diff --git a/__unported__/account_banking_sepa_direct_debit/mandate_expire_cron.xml b/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/mandate_expire_cron.xml rename to account_banking_sepa_direct_debit/data/mandate_expire_cron.xml diff --git a/__unported__/account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml b/account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml rename to account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml diff --git a/__unported__/account_banking_sepa_direct_debit/data/pain.008.001.02.xsd b/account_banking_sepa_direct_debit/data/pain.008.001.02.xsd similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/data/pain.008.001.02.xsd rename to account_banking_sepa_direct_debit/data/pain.008.001.02.xsd diff --git a/__unported__/account_banking_sepa_direct_debit/data/pain.008.001.03.xsd b/account_banking_sepa_direct_debit/data/pain.008.001.03.xsd similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/data/pain.008.001.03.xsd rename to account_banking_sepa_direct_debit/data/pain.008.001.03.xsd diff --git a/__unported__/account_banking_sepa_direct_debit/data/pain.008.001.04.xsd b/account_banking_sepa_direct_debit/data/pain.008.001.04.xsd similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/data/pain.008.001.04.xsd rename to account_banking_sepa_direct_debit/data/pain.008.001.04.xsd diff --git a/__unported__/account_banking_sepa_direct_debit/data/payment_type_sdd.xml b/account_banking_sepa_direct_debit/data/payment_type_sdd.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/data/payment_type_sdd.xml rename to account_banking_sepa_direct_debit/data/payment_type_sdd.xml diff --git a/__unported__/account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml b/account_banking_sepa_direct_debit/demo/sepa_direct_debit_demo.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml rename to account_banking_sepa_direct_debit/demo/sepa_direct_debit_demo.xml diff --git a/__unported__/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot b/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot rename to account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot diff --git a/__unported__/account_banking_sepa_direct_debit/i18n/fr.po b/account_banking_sepa_direct_debit/i18n/fr.po similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/i18n/fr.po rename to account_banking_sepa_direct_debit/i18n/fr.po diff --git a/__unported__/account_banking_sepa_direct_debit/i18n/nl.po b/account_banking_sepa_direct_debit/i18n/nl.po similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/i18n/nl.po rename to account_banking_sepa_direct_debit/i18n/nl.po diff --git a/account_banking_sepa_direct_debit/mandate_expire_cron.xml b/account_banking_sepa_direct_debit/mandate_expire_cron.xml new file mode 100644 index 000000000..4cb0693d2 --- /dev/null +++ b/account_banking_sepa_direct_debit/mandate_expire_cron.xml @@ -0,0 +1,26 @@ + + + + + + + + + Set SEPA Direct Debit Mandates to Expired + + + 1 + days + -1 + + + + + + + + diff --git a/account_banking_sepa_direct_debit/models/__init__.py b/account_banking_sepa_direct_debit/models/__init__.py new file mode 100644 index 000000000..36b8b4b56 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/__init__.py @@ -0,0 +1,28 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import account_invoice +from . import banking_export_sdd +from . import payment_line +from . import res_company +from . import res_partner_bank +from . import sdd_mandate diff --git a/account_banking_sepa_direct_debit/models/account_invoice.py b/account_banking_sepa_direct_debit/models/account_invoice.py new file mode 100644 index 000000000..eee2b7757 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/account_invoice.py @@ -0,0 +1,32 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields + + +class AccountInvoice(models.Model): + _inherit = 'account.invoice' + + sdd_mandate_id = fields.Many2one( + 'sdd.mandate', string='SEPA Direct Debit Mandate', + domain=[('state', '=', 'valid')], readonly=True, + states={'draft': [('readonly', False)]}) diff --git a/account_banking_sepa_direct_debit/models/banking_export_sdd.py b/account_banking_sepa_direct_debit/models/banking_export_sdd.py new file mode 100644 index 000000000..80f5f4a13 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/banking_export_sdd.py @@ -0,0 +1,78 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api +from openerp.addons.decimal_precision import decimal_precision as dp +from unidecode import unidecode + + +class BankingExportSdd(models.Model): + """SEPA Direct Debit export""" + _name = 'banking.export.sdd' + _description = __doc__ + _rec_name = 'filename' + + @api.one + def _generate_filename(self): + filename = '' + if self.payment_order_ids: + ref = self.payment_order_ids[0].reference + label = unidecode(ref.replace('/', '-')) if ref else 'error' + filename = 'sdd_%s.xml' % label + self.filename = filename + + payment_order_ids = fields.Many2many( + comodel_name='payment.order', + relation='account_payment_order_sdd_rel', + column1='banking_export_sepa_id', column2='account_order_id', + string='Payment Orders', + readonly=True) + nb_transactions = fields.Integer( + string='Number of Transactions', readonly=True) + total_amount = fields.Float( + string='Total Amount', digits_compute=dp.get_precision('Account'), + readonly=True) + batch_booking = fields.Boolean( + 'Batch Booking', readonly=True, + help="If true, the bank statement will display only one credit line " + "for all the direct debits of the SEPA file ; if false, the bank " + "statement will display one credit line per direct debit of the " + "SEPA file.") + charge_bearer = fields.Selection( + [('SLEV', 'Following Service Level'), + ('SHAR', 'Shared'), + ('CRED', 'Borne by Creditor'), + ('DEBT', 'Borne by Debtor')], 'Charge Bearer', readonly=True, + help="Following service level : transaction charges are to be applied " + "following the rules agreed in the service level and/or scheme " + "(SEPA Core messages must use this). Shared : transaction " + "charges on the creditor side are to be borne by the creditor, " + "transaction charges on the debtor side are to be borne by the " + "debtor. Borne by creditor : all transaction charges are to be " + "borne by the creditor. Borne by debtor : all transaction " + "charges are to be borne by the debtor.") + create_date = fields.Datetime(string='Generation Date', readonly=True) + file = fields.Binary(string='SEPA File', readonly=True) + filename = fields.Char(compute=_generate_filename, size=256, + string='Filename', readonly=True, store=True) + state = fields.Selection([('draft', 'Draft'), ('sent', 'Sent')], + string='State', readonly=True, default='draft') diff --git a/account_banking_sepa_direct_debit/models/payment_line.py b/account_banking_sepa_direct_debit/models/payment_line.py new file mode 100644 index 000000000..31c47bd89 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/payment_line.py @@ -0,0 +1,74 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api, exceptions, _ + + +class PaymentLine(models.Model): + _inherit = 'payment.line' + + sdd_mandate_id = fields.Many2one( + 'sdd.mandate', string='SEPA Direct Debit Mandate', + domain=[('state', '=', 'valid')]) + + def create(self, vals=None): + """If the customer invoice has a mandate, take it. Otherwise, take the + first valid mandate of the bank account. + """ + if not vals: + vals = {} + partner_bank_id = vals.get('bank_id') + if (self.env.context.get('search_payment_order_type') == 'debit' + and 'sdd_mandate_id' not in vals): + if vals.get('move_line_id'): + line = self.env['account.move.line'].browse( + vals['move_line_id']) + if (line.invoice and line.invoice.type == 'out_invoice' + and line.invoice.sdd_mandate_id): + vals.update( + {'sdd_mandate_id': line.invoice.sdd_mandate_id.id, + 'bank_id': + line.invoice.sdd_mandate_id.partner_bank_id.id}) + if partner_bank_id and 'sdd_mandate_id' not in vals: + mandates = self.env['sdd.mandate'].search( + [('partner_bank_id', '=', partner_bank_id), + ('state', '=', 'valid')]) + if mandates: + vals['sdd_mandate_id'] = mandates.ids[0] + return super(PaymentLine, self).create(vals) + + @api.one + @api.constrains('sdd_mandate_id', 'bank_id') + def _check_mandate_bank_link(self): + if (self.sdd_mandate_id and self.bank_id + and self.sdd_mandate_id.partner_bank_id.id != + self.bank_id.id): + raise exceptions.Warning( + _('Error:'), + _("The payment line with reference '%s' has the bank " + "account '%s' which is not attached to the mandate " + "'%s' (this mandate is attached to the bank account " + "'%s').") % + (self.name, + self.bank_id.name_get()[0][1], + self.sdd_mandate_id.unique_mandate_reference, + self.sdd_mandate_id.partner_bank_id.name_get()[0][1])) diff --git a/account_banking_sepa_direct_debit/models/res_company.py b/account_banking_sepa_direct_debit/models/res_company.py new file mode 100644 index 000000000..327edc401 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/res_company.py @@ -0,0 +1,80 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api, exceptions, _ +import logging + +logger = logging.getLogger(__name__) + + +class ResCompany(models.Model): + _inherit = 'res.company' + + sepa_creditor_identifier = fields.Char( + string='SEPA Creditor Identifier', size=35, + help="Enter the Creditor Identifier that has been attributed to your " + "company to make SEPA Direct Debits. This identifier is composed " + "of :\n- your country ISO code (2 letters)\n- a 2-digits " + "checkum\n- a 3-letters business code\n- a country-specific " + "identifier") + original_creditor_identifier = fields.Char( + string='Original Creditor Identifier', size=70) + + def is_sepa_creditor_identifier_valid( + self, sepa_creditor_identifier): + """Check if SEPA Creditor Identifier is valid + @param sepa_creditor_identifier: SEPA Creditor Identifier as str + or unicode + @return: True if valid, False otherwise + """ + if not isinstance(sepa_creditor_identifier, (str, unicode)): + return False + try: + sci = str(sepa_creditor_identifier).lower() + except: + logger.warning( + "SEPA Creditor ID should contain only ASCII caracters.") + return False + if len(sci) < 9: + return False + before_replacement = sci[7:] + sci[0:2] + '00' + logger.debug( + "SEPA ID check before_replacement = %s" % before_replacement) + after_replacement = '' + for char in before_replacement: + if char.isalpha(): + after_replacement += str(ord(char)-87) + else: + after_replacement += char + logger.debug( + "SEPA ID check after_replacement = %s" % after_replacement) + return int(sci[2:4]) == (98 - (int(after_replacement) % 97)) + + @api.one + @api.constrains('sepa_creditor_identifier') + def _check_sepa_creditor_identifier(self): + if self.sepa_creditor_identifier: + if not self.is_sepa_creditor_identifier_valid( + self.sepa_creditor_identifier): + raise exceptions.Warning( + _('Error'), + _("Invalid SEPA Creditor Identifier.")) diff --git a/account_banking_sepa_direct_debit/models/res_partner_bank.py b/account_banking_sepa_direct_debit/models/res_partner_bank.py new file mode 100644 index 000000000..132a4fa42 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/res_partner_bank.py @@ -0,0 +1,30 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields + + +class ResPartnerBank(models.Model): + _inherit = 'res.partner.bank' + + sdd_mandate_ids = fields.One2many( + 'sdd.mandate', 'partner_bank_id', string='SEPA Direct Debit Mandates') diff --git a/account_banking_sepa_direct_debit/models/sdd_mandate.py b/account_banking_sepa_direct_debit/models/sdd_mandate.py new file mode 100644 index 000000000..ebee316d2 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/sdd_mandate.py @@ -0,0 +1,291 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm, fields +from openerp.tools.translate import _ +from datetime import datetime +from dateutil.relativedelta import relativedelta +import logging + +NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY = 36 + +logger = logging.getLogger(__name__) + + +class SddMandate(orm.Model): + """SEPA Direct Debit Mandate""" + _name = 'sdd.mandate' + _description = __doc__ + _rec_name = 'unique_mandate_reference' + _inherit = ['mail.thread'] + _order = 'signature_date desc' + _track = { + 'state': { + 'account_banking_sepa_direct_debit.mandate_valid': + lambda self, cr, uid, obj, ctx=None: + obj['state'] == 'valid', + 'account_banking_sepa_direct_debit.mandate_expired': + lambda self, cr, uid, obj, ctx=None: + obj['state'] == 'expired', + 'account_banking_sepa_direct_debit.mandate_cancel': + lambda self, cr, uid, obj, ctx=None: + obj['state'] == 'cancel', + }, + 'recurrent_sequence_type': { + 'account_banking_sepa_direct_debit.recurrent_sequence_type_first': + lambda self, cr, uid, obj, ctx=None: + obj['recurrent_sequence_type'] == 'first', + 'account_banking_sepa_direct_debit.' + 'recurrent_sequence_type_recurring': + lambda self, cr, uid, obj, ctx=None: + obj['recurrent_sequence_type'] == 'recurring', + 'account_banking_sepa_direct_debit.recurrent_sequence_type_final': + lambda self, cr, uid, obj, ctx=None: + obj['recurrent_sequence_type'] == 'final', + } + } + + _columns = { + 'partner_bank_id': fields.many2one( + 'res.partner.bank', 'Bank Account', track_visibility='onchange'), + 'partner_id': fields.related( + 'partner_bank_id', 'partner_id', type='many2one', + relation='res.partner', string='Partner', readonly=True), + 'company_id': fields.many2one('res.company', 'Company', required=True), + 'unique_mandate_reference': fields.char( + 'Unique Mandate Reference', size=35, readonly=True, + track_visibility='always'), + 'type': fields.selection([ + ('recurrent', 'Recurrent'), + ('oneoff', 'One-Off'), + ], 'Type of Mandate', required=True, track_visibility='always'), + 'recurrent_sequence_type': fields.selection([ + ('first', 'First'), + ('recurring', 'Recurring'), + ('final', 'Final'), + ], 'Sequence Type for Next Debit', track_visibility='onchange', + help="This field is only used for Recurrent mandates, not for " + "One-Off mandates."), + 'signature_date': fields.date( + 'Date of Signature of the Mandate', track_visibility='onchange'), + 'scan': fields.binary('Scan of the Mandate'), + 'last_debit_date': fields.date( + 'Date of the Last Debit', readonly=True), + 'state': fields.selection([ + ('draft', 'Draft'), + ('valid', 'Valid'), + ('expired', 'Expired'), + ('cancel', 'Cancelled'), + ], 'Status', + help="Only valid mandates can be used in a payment line. A " + "cancelled mandate is a mandate that has been cancelled by " + "the customer. A one-off mandate expires after its first use. " + "A recurrent mandate expires after it's final use or if it " + "hasn't been used for 36 months."), + 'payment_line_ids': fields.one2many( + 'payment.line', 'sdd_mandate_id', "Related Payment Lines"), + 'sepa_migrated': fields.boolean( + 'Migrated to SEPA', track_visibility='onchange', + help="If this field is not active, the mandate section of the " + "next direct debit file that include this mandate will contain " + "the 'Original Mandate Identification' and the 'Original " + "Creditor Scheme Identification'. This is required in a few " + "countries (Belgium for instance), but not in all countries. " + "If this is not required in your country, you should keep this " + "field always active."), + 'original_mandate_identification': fields.char( + 'Original Mandate Identification', size=35, + track_visibility='onchange', + help="When the field 'Migrated to SEPA' is not active, this " + "field will be used as the Original Mandate Identification in " + "the Direct Debit file."), + 'scheme': fields.selection([('CORE', 'Basic (CORE)'), + ('B2B', 'Enterprise (B2B)')], + 'Scheme', required=True), + } + + _defaults = { + 'company_id': lambda self, cr, uid, context: + self.pool['res.company']._company_default_get( + cr, uid, 'sdd.mandate', context=context), + 'unique_mandate_reference': '/', + 'state': 'draft', + 'sepa_migrated': True, + 'scheme': 'CORE', + } + + _sql_constraints = [( + 'mandate_ref_company_uniq', + 'unique(unique_mandate_reference, company_id)', + 'A Mandate with the same reference already exists for this company !' + )] + + def create(self, cr, uid, vals, context=None): + if vals.get('unique_mandate_reference', '/') == '/': + vals['unique_mandate_reference'] = \ + self.pool['ir.sequence'].next_by_code( + cr, uid, 'sdd.mandate.reference', context=context) + return super(SddMandate, self).create(cr, uid, vals, context=context) + + def _check_sdd_mandate(self, cr, uid, ids): + for mandate in self.browse(cr, uid, ids): + if (mandate.signature_date and + mandate.signature_date > + datetime.today().strftime('%Y-%m-%d')): + raise orm.except_orm( + _('Error:'), + _("The date of signature of mandate '%s' is in the " + "future !") + % mandate.unique_mandate_reference) + if mandate.state == 'valid' and not mandate.signature_date: + raise orm.except_orm( + _('Error:'), + _("Cannot validate the mandate '%s' without a date of " + "signature.") + % mandate.unique_mandate_reference) + if mandate.state == 'valid' and not mandate.partner_bank_id: + raise orm.except_orm( + _('Error:'), + _("Cannot validate the mandate '%s' because it is not " + "attached to a bank account.") + % mandate.unique_mandate_reference) + + if (mandate.signature_date and mandate.last_debit_date and + mandate.signature_date > mandate.last_debit_date): + raise orm.except_orm( + _('Error:'), + _("The mandate '%s' can't have a date of last debit " + "before the date of signature.") + % mandate.unique_mandate_reference) + if (mandate.type == 'recurrent' + and not mandate.recurrent_sequence_type): + raise orm.except_orm( + _('Error:'), + _("The recurrent mandate '%s' must have a sequence type.") + % mandate.unique_mandate_reference) + if (mandate.type == 'recurrent' and not mandate.sepa_migrated + and mandate.recurrent_sequence_type != 'first'): + raise orm.except_orm( + _('Error:'), + _("The recurrent mandate '%s' which is not marked as " + "'Migrated to SEPA' must have its recurrent sequence " + "type set to 'First'.") + % mandate.unique_mandate_reference) + if (mandate.type == 'recurrent' and not mandate.sepa_migrated + and not mandate.original_mandate_identification): + raise orm.except_orm( + _('Error:'), + _("You must set the 'Original Mandate Identification' " + "on the recurrent mandate '%s' which is not marked " + "as 'Migrated to SEPA'.") + % mandate.unique_mandate_reference) + return True + + _constraints = [ + (_check_sdd_mandate, "Error msg in raise", [ + 'last_debit_date', 'signature_date', 'state', 'partner_bank_id', + 'type', 'recurrent_sequence_type', 'sepa_migrated', + 'original_mandate_identification', + ]), + ] + + def mandate_type_change(self, cr, uid, ids, type): + if type == 'recurrent': + recurrent_sequence_type = 'first' + else: + recurrent_sequence_type = False + res = {'value': {'recurrent_sequence_type': recurrent_sequence_type}} + return res + + def mandate_partner_bank_change( + self, cr, uid, ids, partner_bank_id, type, recurrent_sequence_type, + last_debit_date, state): + res = {'value': {}} + if partner_bank_id: + partner_bank_read = self.pool['res.partner.bank'].read( + cr, uid, partner_bank_id, ['partner_id'])['partner_id'] + if partner_bank_read: + res['value']['partner_id'] = partner_bank_read[0] + if (state == 'valid' and partner_bank_id + and type == 'recurrent' + and recurrent_sequence_type != 'first'): + res['value']['recurrent_sequence_type'] = 'first' + res['warning'] = { + 'title': _('Mandate update'), + 'message': _( + "As you changed the bank account attached to this " + "mandate, the 'Sequence Type' has been set back to " + "'First'."), + } + return res + + def validate(self, cr, uid, ids, context=None): + to_validate_ids = [] + for mandate in self.browse(cr, uid, ids, context=context): + assert mandate.state == 'draft', 'Mandate should be in draft state' + to_validate_ids.append(mandate.id) + self.write( + cr, uid, to_validate_ids, {'state': 'valid'}, context=context) + return True + + def cancel(self, cr, uid, ids, context=None): + to_cancel_ids = [] + for mandate in self.browse(cr, uid, ids, context=context): + assert mandate.state in ('draft', 'valid'),\ + 'Mandate should be in draft or valid state' + to_cancel_ids.append(mandate.id) + self.write( + cr, uid, to_cancel_ids, {'state': 'cancel'}, context=context) + return True + + def back2draft(self, cr, uid, ids, context=None): + to_draft_ids = [] + for mandate in self.browse(cr, uid, ids, context=context): + assert mandate.state == 'cancel',\ + 'Mandate should be in cancel state' + to_draft_ids.append(mandate.id) + self.write( + cr, uid, to_draft_ids, {'state': 'draft'}, context=context) + return True + + def _sdd_mandate_set_state_to_expired(self, cr, uid, context=None): + logger.info('Searching for SDD Mandates that must be set to Expired') + expire_limit_date = datetime.today() + \ + relativedelta(months=-NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY) + expire_limit_date_str = expire_limit_date.strftime('%Y-%m-%d') + expired_mandate_ids = self.search(cr, uid, [ + '|', + ('last_debit_date', '=', False), + ('last_debit_date', '<=', expire_limit_date_str), + ('state', '=', 'valid'), + ('signature_date', '<=', expire_limit_date_str), + ], context=context) + if expired_mandate_ids: + self.write( + cr, uid, expired_mandate_ids, {'state': 'expired'}, + context=context) + logger.info( + 'The following SDD Mandate IDs has been set to expired: %s' + % expired_mandate_ids) + else: + logger.info('0 SDD Mandates must be set to Expired') + return True diff --git a/__unported__/account_banking_sepa_direct_debit/res_partner_bank_view.xml b/account_banking_sepa_direct_debit/res_partner_bank_view.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/res_partner_bank_view.xml rename to account_banking_sepa_direct_debit/res_partner_bank_view.xml diff --git a/__unported__/account_banking_sepa_direct_debit/sdd_mandate_view.xml b/account_banking_sepa_direct_debit/sdd_mandate_view.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/sdd_mandate_view.xml rename to account_banking_sepa_direct_debit/sdd_mandate_view.xml diff --git a/__unported__/account_banking_sepa_direct_debit/security/ir.model.access.csv b/account_banking_sepa_direct_debit/security/ir.model.access.csv similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/security/ir.model.access.csv rename to account_banking_sepa_direct_debit/security/ir.model.access.csv diff --git a/__unported__/account_banking_sepa_direct_debit/security/original_mandate_required_security.xml b/account_banking_sepa_direct_debit/security/original_mandate_required_security.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/security/original_mandate_required_security.xml rename to account_banking_sepa_direct_debit/security/original_mandate_required_security.xml diff --git a/account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml b/account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml new file mode 100644 index 000000000..220261088 --- /dev/null +++ b/account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml @@ -0,0 +1,27 @@ + + + + + + + SEPA Direct Debit La Banque Postale + + + + + + + + FR78ZZZ424242 + + + + + recurrent + first + 2014-02-01 + valid + + + + diff --git a/account_banking_sepa_direct_debit/static/description/icon.svg b/account_banking_sepa_direct_debit/static/description/icon.svg new file mode 100644 index 000000000..c3bc242a4 --- /dev/null +++ b/account_banking_sepa_direct_debit/static/description/icon.svg @@ -0,0 +1,92 @@ + + + +image/svg+xmlDIRECTDEBIT + \ No newline at end of file diff --git a/__unported__/account_banking_sepa_direct_debit/static/src/img/icon.png b/account_banking_sepa_direct_debit/static/src/img/icon.png similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/static/src/img/icon.png rename to account_banking_sepa_direct_debit/static/src/img/icon.png diff --git a/account_banking_sepa_direct_debit/views/account_banking_sdd_view.xml b/account_banking_sepa_direct_debit/views/account_banking_sdd_view.xml new file mode 100644 index 000000000..f74b60353 --- /dev/null +++ b/account_banking_sepa_direct_debit/views/account_banking_sdd_view.xml @@ -0,0 +1,77 @@ + + + + + + + account.banking.export.sdd.form + banking.export.sdd + +
+
+ +
+ + + + + + + + + + + + + + + + +
+
+
+ + + + account.banking.export.sdd.tree + banking.export.sdd + + + + + + + + + + + + + SEPA Direct Debit Files + banking.export.sdd + form + tree,form + + + + + + + +
+
diff --git a/account_banking_sepa_direct_debit/views/account_invoice_view.xml b/account_banking_sepa_direct_debit/views/account_invoice_view.xml new file mode 100644 index 000000000..2ca480e54 --- /dev/null +++ b/account_banking_sepa_direct_debit/views/account_invoice_view.xml @@ -0,0 +1,22 @@ + + + + + + + add.sdd.mandate.on.customer.invoice.form + account.invoice + + + + + + + + + + diff --git a/account_banking_sepa_direct_debit/views/account_payment_view.xml b/account_banking_sepa_direct_debit/views/account_payment_view.xml new file mode 100644 index 000000000..74098c44e --- /dev/null +++ b/account_banking_sepa_direct_debit/views/account_payment_view.xml @@ -0,0 +1,26 @@ + + + + + + + sdd.payment.order.form + payment.order + + + + + + + + + + + + + + diff --git a/account_banking_sepa_direct_debit/views/res_company_view.xml b/account_banking_sepa_direct_debit/views/res_company_view.xml new file mode 100644 index 000000000..e4c9e0b93 --- /dev/null +++ b/account_banking_sepa_direct_debit/views/res_company_view.xml @@ -0,0 +1,23 @@ + + + + + + + sepa_direct_debit.res.company.form + res.company + + + + + + + + + + + diff --git a/account_banking_sepa_direct_debit/views/res_partner_bank_view.xml b/account_banking_sepa_direct_debit/views/res_partner_bank_view.xml new file mode 100644 index 000000000..0b32e9f1c --- /dev/null +++ b/account_banking_sepa_direct_debit/views/res_partner_bank_view.xml @@ -0,0 +1,48 @@ + + + + + + + sdd.mandate.res.partner.bank.form + res.partner.bank + + + + + + + + + + + + sdd.mandate.res.partner.bank.tree + res.partner.bank + + + + + + + + + + + sdd.mandate.partner.form + res.partner + + + + + + + + + + diff --git a/account_banking_sepa_direct_debit/views/sdd_mandate_view.xml b/account_banking_sepa_direct_debit/views/sdd_mandate_view.xml new file mode 100644 index 000000000..4388bd314 --- /dev/null +++ b/account_banking_sepa_direct_debit/views/sdd_mandate_view.xml @@ -0,0 +1,153 @@ + + + + + + + sdd.mandate.form + sdd.mandate + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+ + + sdd.mandate.tree + sdd.mandate + + + + + + + + + + + + + + + sdd.mandate.search + sdd.mandate + + + + + + + + + + + + + + + SEPA Direct Debit Mandates + sdd.mandate + form + tree,form + +

+ Click to create a new SEPA Direct Debit Mandate. +

+ A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account. +

+
+
+ + + + + + Mandate Validated + sdd.mandate + + SEPA Direct Debit Mandate Validated + + + + Mandate Expired + sdd.mandate + + SEPA Direct Debit Mandate has Expired + + + + Mandate Cancelled + sdd.mandate + + SEPA Direct Debit Mandate Cancelled + + + + Sequence Type set to First + sdd.mandate + + Sequence Type set to First + + + + Sequence Type set to Recurring + sdd.mandate + + Sequence Type set to Recurring + + + + Sequence Type set to Final + sdd.mandate + + Sequence Type set to Final + + +
+
diff --git a/__unported__/account_banking_sepa_direct_debit/wizard/__init__.py b/account_banking_sepa_direct_debit/wizard/__init__.py similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/wizard/__init__.py rename to account_banking_sepa_direct_debit/wizard/__init__.py diff --git a/__unported__/account_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py similarity index 98% rename from __unported__/account_banking_sepa_direct_debit/wizard/export_sdd.py rename to account_banking_sepa_direct_debit/wizard/export_sdd.py index 19520d318..34e37fc59 100644 --- a/__unported__/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -195,6 +195,7 @@ class banking_export_sdd_wizard(orm.TransientModel): "line with partner '%s' and Invoice ref '%s'.") % (line.partner_id.name, line.ml_inv_ref.number)) + scheme = line.sdd_mandate_id.scheme if line.sdd_mandate_id.state != 'valid': raise orm.except_orm( _('Error:'), @@ -225,8 +226,7 @@ class banking_export_sdd_wizard(orm.TransientModel): line.sdd_mandate_id.recurrent_sequence_type assert seq_type_label is not False seq_type = seq_type_map[seq_type_label] - - key = (requested_date, priority, seq_type) + key = (requested_date, priority, seq_type, scheme) if key in lines_per_group: lines_per_group[key].append(line) else: @@ -237,7 +237,7 @@ class banking_export_sdd_wizard(orm.TransientModel): cr, uid, line.id, {'date': requested_date}, context=context) - for (requested_date, priority, sequence_type), lines in \ + for (requested_date, priority, sequence_type, scheme), lines in \ lines_per_group.items(): # B. Payment info payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 = \ @@ -246,7 +246,7 @@ class banking_export_sdd_wizard(orm.TransientModel): "sepa_export.payment_order_ids[0].reference + '-' + " "sequence_type + '-' + requested_date.replace('-', '') " "+ '-' + priority", - priority, 'CORE', sequence_type, requested_date, { + priority, scheme, sequence_type, requested_date, { 'sepa_export': sepa_export, 'sequence_type': sequence_type, 'priority': priority, diff --git a/__unported__/account_banking_sepa_direct_debit/wizard/export_sdd_view.xml b/account_banking_sepa_direct_debit/wizard/export_sdd_view.xml similarity index 100% rename from __unported__/account_banking_sepa_direct_debit/wizard/export_sdd_view.xml rename to account_banking_sepa_direct_debit/wizard/export_sdd_view.xml diff --git a/account_direct_debit/__init__.py b/account_direct_debit/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/account_direct_debit/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/__unported__/account_direct_debit/__openerp__.py b/account_direct_debit/__openerp__.py similarity index 80% rename from __unported__/account_direct_debit/__openerp__.py rename to account_direct_debit/__openerp__.py index 26f6beba7..b7f1660e3 100644 --- a/__unported__/account_direct_debit/__openerp__.py +++ b/account_direct_debit/__openerp__.py @@ -27,10 +27,10 @@ 'category': 'Banking addons', 'depends': ['account_banking_payment_export'], 'data': [ - 'view/account_payment.xml', - 'view/account_invoice.xml', - 'view/payment_mode.xml', - 'view/payment_mode_type.xml', + 'views/account_payment.xml', + 'views/account_invoice.xml', + 'views/payment_mode.xml', + 'views/payment_mode_type.xml', 'workflow/account_invoice.xml', 'data/account_payment_term.xml', ], @@ -44,11 +44,6 @@ in the Netherlands. Debit orders are advanced in total by the bank. Amounts that cannot be debited or are canceled by account owners are credited afterwards. Such a creditation is called a storno. This style of direct debit order may not apply to your country. - -This module depends on and is part of the banking addons for OpenERP. This set -of modules helps you to provide support for communications with your local -banking institutions. The banking addons are a continuation of Account Banking -Framework by Edusense BV. See https://launchpad.net/banking-addons. ''', - 'installable': False, + 'installable': True, } diff --git a/__unported__/account_direct_debit/data/account_payment_term.xml b/account_direct_debit/data/account_payment_term.xml similarity index 100% rename from __unported__/account_direct_debit/data/account_payment_term.xml rename to account_direct_debit/data/account_payment_term.xml diff --git a/__unported__/account_direct_debit/i18n/account_direct_debit.pot b/account_direct_debit/i18n/account_direct_debit.pot similarity index 100% rename from __unported__/account_direct_debit/i18n/account_direct_debit.pot rename to account_direct_debit/i18n/account_direct_debit.pot diff --git a/__unported__/account_direct_debit/i18n/nl.po b/account_direct_debit/i18n/nl.po similarity index 100% rename from __unported__/account_direct_debit/i18n/nl.po rename to account_direct_debit/i18n/nl.po diff --git a/__unported__/account_direct_debit/migrations/7.0.2/post-migration.py b/account_direct_debit/migrations/7.0.2/post-migration.py similarity index 100% rename from __unported__/account_direct_debit/migrations/7.0.2/post-migration.py rename to account_direct_debit/migrations/7.0.2/post-migration.py diff --git a/__unported__/account_direct_debit/migrations/7.0.2/pre-migration.py b/account_direct_debit/migrations/7.0.2/pre-migration.py similarity index 100% rename from __unported__/account_direct_debit/migrations/7.0.2/pre-migration.py rename to account_direct_debit/migrations/7.0.2/pre-migration.py diff --git a/account_direct_debit/models/__init__.py b/account_direct_debit/models/__init__.py new file mode 100644 index 000000000..ffb948151 --- /dev/null +++ b/account_direct_debit/models/__init__.py @@ -0,0 +1,4 @@ +from . import account_payment +from . import payment_line +from . import account_move_line +from . import account_invoice diff --git a/__unported__/account_direct_debit/model/account_invoice.py b/account_direct_debit/models/account_invoice.py similarity index 95% rename from __unported__/account_direct_debit/model/account_invoice.py rename to account_direct_debit/models/account_invoice.py index fe2e92337..246b7f413 100644 --- a/__unported__/account_direct_debit/model/account_invoice.py +++ b/account_direct_debit/models/account_invoice.py @@ -39,7 +39,7 @@ Invoice workflow: Balance: Debtors 2000 | - Sales | 2000 + Sales | 2000 2 an external booking takes place 1100 Bank 100 @@ -105,8 +105,8 @@ Two cases need to be distinguisted: uid, 'account.invoice', ids, 'debit_denied', cr) 2) If the storno is an error generated by the bank (assumingly non-fatal), - the invoice is reopened for the next debit run. - This is a call to existing + the invoice is reopened for the next debit run. This is a call to + existing netsvc.LocalService("workflow").trg_validate( uid, 'account.invoice', ids, 'open_test', cr) @@ -123,7 +123,7 @@ Two cases need to be distinguisted: """ -class account_invoice(orm.Model): +class AccountInvoice(orm.Model): _inherit = "account.invoice" def __init__(self, pool, cr): @@ -135,7 +135,7 @@ class account_invoice(orm.Model): Maybe apply a similar trick when overriding the buttons' 'states' attributes in the form view, manipulating the xml in fields_view_get(). """ - super(account_invoice, self).__init__(pool, cr) + super(AccountInvoice, self).__init__(pool, cr) invoice_obj = pool.get('account.invoice') invoice_obj._columns['state'].selection.append( ('debit_denied', 'Debit denied')) @@ -147,8 +147,8 @@ class account_invoice(orm.Model): cr, uid, invoice_id, ['number'], context=context)['number'] raise orm.except_orm( _('Error !'), - _("You cannot set invoice '%s' to state 'debit denied', " - 'as it is still reconciled.') % number) + _("You cannot set invoice '%s' to state 'debit " + "denied', as it is still reconciled.") % number) self.write(cr, uid, ids, {'state': 'debit_denied'}, context=context) for inv_id, name in self.name_get(cr, uid, ids, context=context): message = _("Invoice '%s': direct debit is denied.") % name diff --git a/__unported__/account_direct_debit/model/account_move_line.py b/account_direct_debit/models/account_move_line.py similarity index 86% rename from __unported__/account_direct_debit/model/account_move_line.py rename to account_direct_debit/models/account_move_line.py index 12842e45f..3e48e1f8a 100644 --- a/__unported__/account_direct_debit/model/account_move_line.py +++ b/account_direct_debit/models/account_move_line.py @@ -24,12 +24,11 @@ from operator import itemgetter from openerp.osv import fields, orm -class account_move_line(orm.Model): +class AccountMoveLine(orm.Model): _inherit = "account.move.line" - def amount_to_receive(self, cr, uid, ids, name, arg={}, context=None): - """ - Return the amount still to receive regarding all the debit orders + def _amount_to_receive(self, cr, uid, ids, name, arg={}, context=None): + """Return the amount still to receive regarding all the debit orders (excepting canceled orders). This is the reverse from amount_to_pay() in account_payment/account_move_line.py @@ -49,13 +48,12 @@ class account_move_line(orm.Model): AND pl.storno is false AND po.state != 'cancel') AS amount FROM account_move_line ml - WHERE id IN %s""", (tuple(ids), )) + WHERE id IN %s""", (tuple(ids),)) r = dict(cr.fetchall()) return r def _to_receive_search(self, cr, uid, obj, name, args, context=None): - """ - Reverse of account_payment/account_move_line.py:_to_pay_search() + """Reverse of account_payment/account_move_line.py:_to_pay_search(). """ if not args: return [] @@ -81,23 +79,21 @@ class account_move_line(orm.Model): WHERE type=%s AND active) AND reconcile_id IS null AND debit > 0 - AND ''' + where + ' and ' + query), ('receivable', ) + sql_args) + AND ''' + where + ' and ' + query), ('receivable',) + sql_args) res = cr.fetchall() if not res: return [('id', '=', '0')] - return [('id', 'in', map(lambda x: x[0], res))] + return [('id', 'in', map(lambda x:x[0], res))] def line2bank(self, cr, uid, ids, payment_mode_id, context=None): - '''I have to inherit this function for direct debits to fix the + """I have to inherit this function for direct debits to fix the following issue : if the customer invoice has a value for 'partner_bank_id', then it will take this partner_bank_id in the payment line... but, on a customer invoice, the partner_bank_id is the bank account of the company, not the bank account of the customer ! - ''' - if context is None: - context = {} + """ pay_mode_obj = self.pool['payment.mode'] if payment_mode_id: pay_mode = pay_mode_obj.browse( @@ -114,12 +110,12 @@ class account_move_line(orm.Model): line2bank[line.id] = bank.id break return line2bank - return super(account_move_line, self).line2bank( + return super(AccountMoveLine, self).line2bank( cr, uid, ids, payment_mode_id, context=context) _columns = { 'amount_to_receive': fields.function( - amount_to_receive, method=True, + _amount_to_receive, method=True, type='float', string='Amount to receive', fnct_search=_to_receive_search), } diff --git a/__unported__/account_direct_debit/model/account_payment.py b/account_direct_debit/models/account_payment.py similarity index 76% rename from __unported__/account_direct_debit/model/account_payment.py rename to account_direct_debit/models/account_payment.py index b346efec3..702477107 100644 --- a/__unported__/account_direct_debit/model/account_payment.py +++ b/account_direct_debit/models/account_payment.py @@ -2,12 +2,11 @@ from openerp.osv import orm -class payment_order(orm.Model): +class PaymentOrder(orm.Model): _inherit = 'payment.order' def test_undo_done(self, cr, uid, ids, context=None): - """ - Called from the workflow. Used to unset done state on + """Called from the workflow. Used to unset done state on payment orders that were reconciled with bank transfers which are being cancelled """ @@ -16,5 +15,5 @@ class payment_order(orm.Model): for line in order.line_ids: if line.storno: return False - return super(payment_order, self).test_undo_done( + return super(PaymentOrder, self).test_undo_done( cr, uid, ids, context=context) diff --git a/__unported__/account_direct_debit/model/payment_line.py b/account_direct_debit/models/payment_line.py similarity index 76% rename from __unported__/account_direct_debit/model/payment_line.py rename to account_direct_debit/models/payment_line.py index 2be0993db..da0a839cf 100644 --- a/__unported__/account_direct_debit/model/payment_line.py +++ b/account_direct_debit/models/payment_line.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- from openerp.osv import orm, fields -import netsvc -from tools.translate import _ +from openerp import netsvc +from openerp.tools.translate import _ -class payment_line(orm.Model): +class PaymentLine(orm.Model): _inherit = 'payment.line' def debit_storno(self, cr, uid, payment_line_id, amount, currency, storno_retry=True, context=None): - """ - The processing of a storno is triggered by a debit + """The processing of a storno is triggered by a debit transfer on one of the company's bank accounts. This method offers to re-reconcile the original debit payment. For this purpose, we have registered that @@ -23,15 +22,13 @@ class payment_line(orm.Model): :param payment_line_id: the single payment line id :param amount: the (signed) amount debited from the bank account :param currency: the bank account's currency *browse object* - :param boolean storno_retry: when True, attempt to reopen the \ - invoice, set the invoice to 'Debit denied' otherwise. + :param boolean storno_retry: when True, attempt to reopen the invoice, + set the invoice to 'Debit denied' otherwise. :return: an incomplete reconcile for the caller to fill :rtype: database id of an account.move.reconcile resource. """ - reconcile_obj = self.pool.get('account.move.reconcile') line = self.browse(cr, uid, payment_line_id) - transit_move_line = line.transit_move_line_id reconcile_id = False if (line.transit_move_line_id and not line.storno and self.pool.get('res.currency').is_zero( @@ -44,41 +41,45 @@ class payment_line(orm.Model): # Actually, given the nature of a direct debit order and storno, # we should not need to take partial into account on the side of # the transit_move_line. - if transit_move_line.reconcile_partial_id: - reconcile_id = transit_move_line.reconcile_partial_id.id - if len(transit_move_line.reconcile_id.line_partial_ids) == 2: + if line.transit_move_line_id.reconcile_partial_id: + reconcile_id = \ + line.transit_move_line_id.reconcile_partial_id.id + reconcile = line.transit_move_line_id.reconcile_id + if len(reconcile.line_partial_ids) == 2: # reuse the simple reconcile for the storno transfer reconcile_obj.write( cr, uid, reconcile_id, { - 'line_id': [(6, 0, transit_move_line.id)], + 'line_id': [(6, 0, line.transit_move_line_id.id)], 'line_partial_ids': [(6, 0, [])], }, context=context) else: # split up the original reconcile in a partial one # and a new one for reconciling the storno transfer + reconcile = { + 'line_partial_ids': [(3, line.transit_move_line_id.id)] + } reconcile_obj.write( - cr, uid, reconcile_id, { - 'line_partial_ids': [(3, transit_move_line.id)], - }, context=context) + cr, uid, reconcile_id, reconcile, context=context) reconcile_id = reconcile_obj.create( cr, uid, { 'type': 'auto', - 'line_id': [(6, 0, transit_move_line.id)], + 'line_id': [(6, 0, line.transit_move_line_id.id)], }, context=context) - elif transit_move_line.reconcile_id: - reconcile_id = transit_move_line.reconcile_id.id - if len(transit_move_line.reconcile_id.line_id) == 2: + elif line.transit_move_line_id.reconcile_id: + reconcile_id = line.transit_move_line_id.reconcile_id.id + if len(line.transit_move_line_id.reconcile_id.line_id) == 2: # reuse the simple reconcile for the storno transfer reconcile_obj.write( cr, uid, reconcile_id, { - 'line_id': [(6, 0, [transit_move_line.id])] + 'line_id': [(6, 0, [line.transit_move_line_id.id])] }, context=context) else: # split up the original reconcile in a partial one # and a new one for reconciling the storno transfer + reconcile = line.transit_move_line_id.reconcile_id partial_ids = [ - x.id for x in transit_move_line.reconcile_id.line_id - if x.id != transit_move_line.id + x.id for x in reconcile.line_id + if x.id != line.transit_move_line_id.id ] reconcile_obj.write( cr, uid, reconcile_id, { @@ -88,7 +89,7 @@ class payment_line(orm.Model): reconcile_id = reconcile_obj.create( cr, uid, { 'type': 'auto', - 'line_id': [(6, 0, transit_move_line.id)], + 'line_id': [(6, 0, line.transit_move_line_id.id)], }, context=context) # mark the payment line for storno processed if reconcile_id: @@ -103,10 +104,9 @@ class payment_line(orm.Model): activity, cr) return reconcile_id - def get_storno_account_id(self, cr, uid, payment_line_id, amount, - currency, context=None): - """ - Check the match of the arguments, and return the account associated + def get_storno_account_id( + self, cr, uid, payment_line_id, amount, currency, context=None): + """Check the match of the arguments, and return the account associated with the storno. Used in account_banking interactive mode @@ -116,7 +116,6 @@ class payment_line(orm.Model): :return: an account if there is a full match, False otherwise :rtype: database id of an account.account resource. """ - line = self.browse(cr, uid, payment_line_id) account_id = False if (line.transit_move_line_id and not line.storno and @@ -128,9 +127,7 @@ class payment_line(orm.Model): return account_id def debit_reconcile(self, cr, uid, payment_line_id, context=None): - """ - Raise if a payment line is passed for which storno is True - """ + """Raise if a payment line is passed for which storno is True.""" if isinstance(payment_line_id, (list, tuple)): payment_line_id = payment_line_id[0] payment_line_vals = self.read( @@ -140,7 +137,7 @@ class payment_line(orm.Model): _('Can not reconcile'), _('Cancelation of payment line \'%s\' has already been ' 'processed') % payment_line_vals['name']) - return super(payment_line, self).debit_reconcile( + return super(PaymentLine, self).debit_reconcile( cr, uid, payment_line_id, context=context) _columns = { diff --git a/__unported__/account_direct_debit/view/account_invoice.xml b/account_direct_debit/views/account_invoice.xml similarity index 100% rename from __unported__/account_direct_debit/view/account_invoice.xml rename to account_direct_debit/views/account_invoice.xml diff --git a/__unported__/account_direct_debit/view/account_payment.xml b/account_direct_debit/views/account_payment.xml similarity index 71% rename from __unported__/account_direct_debit/view/account_payment.xml rename to account_direct_debit/views/account_payment.xml index b5cbd73b2..8570789da 100644 --- a/__unported__/account_direct_debit/view/account_payment.xml +++ b/account_direct_debit/views/account_payment.xml @@ -19,7 +19,7 @@ [('payment_order_type', '=', 'debit')] A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for.
- + @@ -29,23 +29,22 @@ - - - - - - {'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'payment')]} - - - - +
+
[('payment_order_type', '=', payment_order_type)] diff --git a/__unported__/account_direct_debit/view/payment_mode.xml b/account_direct_debit/views/payment_mode.xml similarity index 100% rename from __unported__/account_direct_debit/view/payment_mode.xml rename to account_direct_debit/views/payment_mode.xml diff --git a/__unported__/account_direct_debit/view/payment_mode_type.xml b/account_direct_debit/views/payment_mode_type.xml similarity index 52% rename from __unported__/account_direct_debit/view/payment_mode_type.xml rename to account_direct_debit/views/payment_mode_type.xml index eb726750d..54c14367d 100644 --- a/__unported__/account_direct_debit/view/payment_mode_type.xml +++ b/account_direct_debit/views/payment_mode_type.xml @@ -2,15 +2,26 @@ - + + view.payment.mode.type.tree + payment.mode.type + + + + + + + + view.payment.mode.type.form payment.mode.type - + diff --git a/account_direct_debit/wizard/__init__.py b/account_direct_debit/wizard/__init__.py new file mode 100644 index 000000000..cbcdda94a --- /dev/null +++ b/account_direct_debit/wizard/__init__.py @@ -0,0 +1 @@ +from . import payment_order_create diff --git a/__unported__/account_direct_debit/model/payment_order_create.py b/account_direct_debit/wizard/payment_order_create.py similarity index 80% rename from __unported__/account_direct_debit/model/payment_order_create.py rename to account_direct_debit/wizard/payment_order_create.py index 5625faac2..d69a4eb78 100644 --- a/__unported__/account_direct_debit/model/payment_order_create.py +++ b/account_direct_debit/wizard/payment_order_create.py @@ -25,17 +25,15 @@ from openerp.osv import orm -class payment_order_create(orm.TransientModel): +class PaymentOrderCreate(orm.TransientModel): _inherit = 'payment.order.create' def extend_payment_order_domain( self, cr, uid, payment_order, domain, context=None): - super(payment_order_create, self).extend_payment_order_domain( + super(PaymentOrderCreate, self).extend_payment_order_domain( cr, uid, payment_order, domain, context=context) if payment_order.payment_order_type == 'debit': - domain += [ - ('account_id.type', '=', 'receivable'), - ('invoice.state', '!=', 'debit_denied'), - ('amount_to_receive', '>', 0), - ] + domain += [('account_id.type', '=', 'receivable'), + ('invoice.state', '!=', 'debit_denied'), + ('amount_to_receive', '>', 0)] return True diff --git a/__unported__/account_direct_debit/workflow/account_invoice.xml b/account_direct_debit/workflow/account_invoice.xml similarity index 100% rename from __unported__/account_direct_debit/workflow/account_invoice.xml rename to account_direct_debit/workflow/account_invoice.xml diff --git a/account_payment_partner/__init__.py b/account_payment_partner/__init__.py new file mode 100644 index 000000000..fe47437f2 --- /dev/null +++ b/account_payment_partner/__init__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Partner module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import models +from . import wizard diff --git a/__unported__/account_payment_partner/__openerp__.py b/account_payment_partner/__openerp__.py similarity index 88% rename from __unported__/account_payment_partner/__openerp__.py rename to account_payment_partner/__openerp__.py index 1a2ffeea9..3f3a51f3f 100644 --- a/__unported__/account_payment_partner/__openerp__.py +++ b/account_payment_partner/__openerp__.py @@ -39,18 +39,15 @@ This module adds severals fields : On a Payment Order, in the wizard *Select Invoices to Pay*, the invoices will be filtered per Payment Mode. - -Please contact Alexis de Lattre from Akretion -for any help or question about this module. """, 'author': 'Akretion', 'website': 'http://www.akretion.com', + 'contributors': ['Pedro M. Baeza '], 'depends': ['account_banking_payment_export'], 'data': [ - 'view/partner.xml', - 'view/account_invoice.xml', + 'views/res_partner_view.xml', + 'views/account_invoice_view.xml', ], 'demo': ['demo/partner_demo.xml'], - 'active': False, - 'installable': False, + 'installable': True, } diff --git a/__unported__/account_payment_partner/demo/partner_demo.xml b/account_payment_partner/demo/partner_demo.xml similarity index 100% rename from __unported__/account_payment_partner/demo/partner_demo.xml rename to account_payment_partner/demo/partner_demo.xml diff --git a/__unported__/account_payment_partner/i18n/account_payment_partner.pot b/account_payment_partner/i18n/account_payment_partner.pot similarity index 100% rename from __unported__/account_payment_partner/i18n/account_payment_partner.pot rename to account_payment_partner/i18n/account_payment_partner.pot diff --git a/__unported__/account_payment_partner/i18n/nl.po b/account_payment_partner/i18n/nl.po similarity index 100% rename from __unported__/account_payment_partner/i18n/nl.po rename to account_payment_partner/i18n/nl.po diff --git a/__unported__/account_payment_partner/model/__init__.py b/account_payment_partner/models/__init__.py similarity index 94% rename from __unported__/account_payment_partner/model/__init__.py rename to account_payment_partner/models/__init__.py index 16ab8bc9e..c2c7b405d 100644 --- a/__unported__/account_payment_partner/model/__init__.py +++ b/account_payment_partner/models/__init__.py @@ -20,6 +20,5 @@ # ############################################################################## -from . import partner +from . import res_partner from . import account_invoice -from . import payment_order_create diff --git a/__unported__/account_payment_partner/model/account_invoice.py b/account_payment_partner/models/account_invoice.py similarity index 65% rename from __unported__/account_payment_partner/model/account_invoice.py rename to account_payment_partner/models/account_invoice.py index 607cda29a..cbbd4b5b9 100644 --- a/__unported__/account_payment_partner/model/account_invoice.py +++ b/account_payment_partner/models/account_invoice.py @@ -20,37 +20,32 @@ # ############################################################################## -from openerp.osv import orm, fields +from openerp import models, fields, api -class account_invoice(orm.Model): +class AccountInvoice(models.Model): _inherit = 'account.invoice' - _columns = { - 'payment_mode_id': fields.many2one( - 'payment.mode', 'Payment Mode'), - } + payment_mode_id = fields.Many2one('payment.mode', string="Payment Mode") + @api.multi def onchange_partner_id( - self, cr, uid, ids, type, partner_id, date_invoice=False, + self, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): - res = super(account_invoice, self).onchange_partner_id( - cr, uid, ids, type, partner_id, date_invoice=date_invoice, + res = super(AccountInvoice, self).onchange_partner_id( + type, partner_id, date_invoice=date_invoice, payment_term=payment_term, partner_bank_id=partner_bank_id, company_id=company_id) if partner_id: - partner = self.pool['res.partner'].browse(cr, uid, partner_id) + partner = self.env['res.partner'].browse(partner_id) if type == 'in_invoice': res['value']['payment_mode_id'] = \ - partner.supplier_payment_mode.id or False + partner.supplier_payment_mode.id elif type == 'out_invoice': res['value'].update({ - 'payment_mode_id': - partner.customer_payment_mode.id or False, - 'partner_bank_id': - partner.customer_payment_mode and - partner.customer_payment_mode.bank_id.id or False, - }) + 'payment_mode_id': partner.customer_payment_mode.id, + 'partner_bank_id': partner.customer_payment_mode.bank_id.id + }) else: res['value']['payment_mode_id'] = False return res diff --git a/__unported__/account_payment_partner/model/partner.py b/account_payment_partner/models/partner.py similarity index 100% rename from __unported__/account_payment_partner/model/partner.py rename to account_payment_partner/models/partner.py diff --git a/__unported__/account_payment_partner/model/payment_order_create.py b/account_payment_partner/models/payment_order_create.py similarity index 100% rename from __unported__/account_payment_partner/model/payment_order_create.py rename to account_payment_partner/models/payment_order_create.py diff --git a/account_payment_partner/models/res_partner.py b/account_payment_partner/models/res_partner.py new file mode 100644 index 000000000..c8762f7d5 --- /dev/null +++ b/account_payment_partner/models/res_partner.py @@ -0,0 +1,42 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Partner module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + supplier_payment_mode = fields.Many2one( + 'payment.mode', string='Supplier Payment Mode', company_dependent=True, + domain="[('payment_order_type', '=', 'payment')]", + help="Select the default payment mode for this supplier.") + customer_payment_mode = fields.Many2one( + 'payment.mode', string='Customer Payment Mode', company_dependent=True, + domain="[('payment_order_type', '=', 'debit')]", + help="Select the default payment mode for this customer.") + + @api.model + def _commercial_fields(self): + res = super(ResPartner, self)._commercial_fields() + res += ['supplier_payment_mode', 'customer_payment_mode'] + return res diff --git a/__unported__/account_payment_partner/view/account_invoice.xml b/account_payment_partner/views/account_invoice.xml similarity index 100% rename from __unported__/account_payment_partner/view/account_invoice.xml rename to account_payment_partner/views/account_invoice.xml diff --git a/account_payment_partner/views/account_invoice_view.xml b/account_payment_partner/views/account_invoice_view.xml new file mode 100644 index 000000000..f4805fa89 --- /dev/null +++ b/account_payment_partner/views/account_invoice_view.xml @@ -0,0 +1,40 @@ + + + + + + + + + + account_payment_partner.invoice_form + account.invoice + + + + + + + + + + + account_payment_partner.invoice_supplier_form + account.invoice + + + + + + + + + + + diff --git a/__unported__/account_payment_partner/view/partner.xml b/account_payment_partner/views/partner.xml similarity index 100% rename from __unported__/account_payment_partner/view/partner.xml rename to account_payment_partner/views/partner.xml diff --git a/account_payment_partner/views/res_partner_view.xml b/account_payment_partner/views/res_partner_view.xml new file mode 100644 index 000000000..3c6d670aa --- /dev/null +++ b/account_payment_partner/views/res_partner_view.xml @@ -0,0 +1,27 @@ + + + + + + + + + account_partner_payment.partner_form + res.partner + + + + + + + + + + + + + diff --git a/__unported__/account_payment_partner/__init__.py b/account_payment_partner/wizard/__init__.py similarity index 96% rename from __unported__/account_payment_partner/__init__.py rename to account_payment_partner/wizard/__init__.py index 161123944..f7107a63f 100644 --- a/__unported__/account_payment_partner/__init__.py +++ b/account_payment_partner/wizard/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -from . import model +from . import payment_order_create diff --git a/account_payment_partner/wizard/payment_order_create.py b/account_payment_partner/wizard/payment_order_create.py new file mode 100644 index 000000000..c26b7f9d9 --- /dev/null +++ b/account_payment_partner/wizard/payment_order_create.py @@ -0,0 +1,37 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Partner module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, api + + +class PaymentOrderCreate(models.TransientModel): + _inherit = 'payment.order.create' + + @api.model + def extend_payment_order_domain(self, payment_order, domain): + res = super(PaymentOrderCreate, self).extend_payment_order_domain( + payment_order, domain) + domain += ['|', '|', + ('invoice', '=', False), + ('invoice.payment_mode_id', '=', False), + ('invoice.payment_mode_id', '=', payment_order.mode.id)] + return res diff --git a/__unported__/account_payment_purchase/__init__.py b/account_payment_purchase/__init__.py similarity index 98% rename from __unported__/account_payment_purchase/__init__.py rename to account_payment_purchase/__init__.py index 59199014f..b21037b9f 100644 --- a/__unported__/account_payment_purchase/__init__.py +++ b/account_payment_purchase/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -from . import model +from . import models diff --git a/__unported__/account_payment_purchase/__openerp__.py b/account_payment_purchase/__openerp__.py similarity index 82% rename from __unported__/account_payment_purchase/__openerp__.py rename to account_payment_purchase/__openerp__.py index 25a2a73b7..e7c258f73 100644 --- a/__unported__/account_payment_purchase/__openerp__.py +++ b/account_payment_purchase/__openerp__.py @@ -30,26 +30,27 @@ Account Payment Purchase ======================== -This modules adds 2 fields on purchase orders : *Bank Account* and *Payment +This module adds 2 fields on purchase orders : *Bank Account* and *Payment Mode*. These fields are copied from partner to purchase order and then from purchase order to supplier invoice. This module is similar to the *purchase_payment* module ; the main difference is that it doesn't depend on the *account_payment_extension* module (it's not the only module to conflict with *account_payment_extension* ; all the SEPA -modules in the banking addons conflict with *account_payment_extension*, cf -banking-addons-70/account_banking_payment_export/__openerp__.py). - -Please contact Alexis de Lattre from Akretion -for any help or question about this module. +modules in the banking addons conflict with *account_payment_extension*). """, 'author': 'Akretion', 'website': 'http://www.akretion.com', - 'depends': ['purchase', 'account_payment_partner'], + 'contributors': ['Pedro M. Baeza '], + 'depends': [ + 'purchase', + 'stock_account', + 'account_payment_partner' + ], 'conflicts': ['purchase_payment'], 'data': [ - 'view/purchase.xml', + 'views/purchase_order_view.xml', ], - 'installable': False, + 'installable': True, 'active': False, } diff --git a/__unported__/account_payment_purchase/i18n/account_payment_purchase.pot b/account_payment_purchase/i18n/account_payment_purchase.pot similarity index 100% rename from __unported__/account_payment_purchase/i18n/account_payment_purchase.pot rename to account_payment_purchase/i18n/account_payment_purchase.pot diff --git a/__unported__/account_payment_purchase/i18n/fr.po b/account_payment_purchase/i18n/fr.po similarity index 100% rename from __unported__/account_payment_purchase/i18n/fr.po rename to account_payment_purchase/i18n/fr.po diff --git a/__unported__/account_payment_purchase/i18n/nl.po b/account_payment_purchase/i18n/nl.po similarity index 100% rename from __unported__/account_payment_purchase/i18n/nl.po rename to account_payment_purchase/i18n/nl.po diff --git a/__unported__/account_payment_purchase/model/__init__.py b/account_payment_purchase/model/__init__.py similarity index 100% rename from __unported__/account_payment_purchase/model/__init__.py rename to account_payment_purchase/model/__init__.py diff --git a/__unported__/account_payment_purchase/model/purchase.py b/account_payment_purchase/model/purchase.py similarity index 100% rename from __unported__/account_payment_purchase/model/purchase.py rename to account_payment_purchase/model/purchase.py diff --git a/__unported__/account_payment_purchase/model/stock.py b/account_payment_purchase/model/stock.py similarity index 100% rename from __unported__/account_payment_purchase/model/stock.py rename to account_payment_purchase/model/stock.py diff --git a/account_payment_purchase/models/__init__.py b/account_payment_purchase/models/__init__.py new file mode 100644 index 000000000..3d13bc0e4 --- /dev/null +++ b/account_payment_purchase/models/__init__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Purchase module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import purchase_order +from . import stock_picking diff --git a/account_payment_purchase/models/purchase_order.py b/account_payment_purchase/models/purchase_order.py new file mode 100644 index 000000000..e1ca139ff --- /dev/null +++ b/account_payment_purchase/models/purchase_order.py @@ -0,0 +1,63 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Purchase module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api + + +class PurchaseOrder(models.Model): + _inherit = "purchase.order" + + supplier_partner_bank_id = fields.Many2one( + 'res.partner.bank', string='Supplier Bank Account', + domain="[('partner_id', '=', partner_id)]", + help="Select the bank account of your supplier on which your company " + "should send the payment. This field is copied from the partner " + "and will be copied to the supplier invoice.") + payment_mode_id = fields.Many2one( + 'payment.mode', string='Payment Mode', + domain="[('payment_order_type', '=', 'payment')]") + + @api.model + def _get_default_supplier_partner_bank(self, partner): + """This function is designed to be inherited""" + return partner.bank_ids and partner.bank_ids[0].id or False + + @api.multi + def onchange_partner_id(self, partner_id): + res = super(PurchaseOrder, self).onchange_partner_id(partner_id) + if partner_id: + partner = self.env['res.partner'].browse(partner_id) + res['value']['supplier_partner_bank_id'] = \ + self._get_default_supplier_partner_bank(partner) + res['value']['payment_mode_id'] = partner.supplier_payment_mode.id + else: + res['value']['supplier_partner_bank_id'] = False + res['value']['payment_mode_id'] = False + return res + + @api.model + def _prepare_invoice(self, order, line_ids): + res = super(PurchaseOrder, self)._prepare_invoice(order, line_ids) + if order: + res['partner_bank_id'] = order.supplier_partner_bank_id.id + res['payment_mode_id'] = order.payment_mode_id.id + return res diff --git a/account_payment_purchase/models/stock_picking.py b/account_payment_purchase/models/stock_picking.py new file mode 100644 index 000000000..2ab8c6073 --- /dev/null +++ b/account_payment_purchase/models/stock_picking.py @@ -0,0 +1,38 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Purchase module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, api + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + @api.model + def _create_invoice_from_picking(self, picking, vals): + if picking and picking.move_lines: + # Get purchase order from first move line + if picking.move_lines[0].purchase_line_id: + purchase = picking.move_lines[0].purchase_line_id.order_id + vals['partner_bank_id'] = purchase.supplier_partner_bank_id.id + vals['payment_mode_id'] = purchase.payment_mode_id.id + return super(StockPicking, self)._create_invoice_from_picking(picking, + vals) diff --git a/__unported__/account_payment_purchase/view/purchase.xml b/account_payment_purchase/view/purchase.xml similarity index 100% rename from __unported__/account_payment_purchase/view/purchase.xml rename to account_payment_purchase/view/purchase.xml diff --git a/account_payment_purchase/views/purchase_order_view.xml b/account_payment_purchase/views/purchase_order_view.xml new file mode 100644 index 000000000..0e25c175e --- /dev/null +++ b/account_payment_purchase/views/purchase_order_view.xml @@ -0,0 +1,25 @@ + + + + + + + + + account_payment_purchase.purchase_order.form + purchase.order + + + + + + + + + + + diff --git a/__unported__/account_payment_sale/__init__.py b/account_payment_sale/__init__.py similarity index 98% rename from __unported__/account_payment_sale/__init__.py rename to account_payment_sale/__init__.py index 83c0dcfe2..11323c6e9 100644 --- a/__unported__/account_payment_sale/__init__.py +++ b/account_payment_sale/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -from . import model +from . import models diff --git a/__unported__/account_payment_sale/__openerp__.py b/account_payment_sale/__openerp__.py similarity index 85% rename from __unported__/account_payment_sale/__openerp__.py rename to account_payment_sale/__openerp__.py index b5b53fccd..99266a10a 100644 --- a/__unported__/account_payment_sale/__openerp__.py +++ b/account_payment_sale/__openerp__.py @@ -37,19 +37,19 @@ customer invoice. This module is similar to the *sale_payment* module ; the main difference is that it doesn't depend on the *account_payment_extension* module (it's not the only module to conflict with *account_payment_extension* ; all the SEPA -modules in the banking addons conflict with *account_payment_extension*, cf -banking-addons-70/account_banking_payment_export/__openerp__.py). - -Please contact Alexis de Lattre from Akretion -for any help or question about this module. +modules in the banking addons conflict with *account_payment_extension*. """, 'author': 'Akretion', 'website': 'http://www.akretion.com', - 'depends': ['sale', 'account_payment_partner'], + 'contributors': ['Pedro M. Baeza '], + 'depends': [ + 'sale', + 'stock_account', + 'account_payment_partner' + ], 'conflicts': ['sale_payment'], 'data': [ - 'view/sale.xml', + 'views/sale_order_view.xml', ], - 'installable': False, - 'active': False, + 'installable': True, } diff --git a/__unported__/account_payment_sale/i18n/account_payment_sale.pot b/account_payment_sale/i18n/account_payment_sale.pot similarity index 100% rename from __unported__/account_payment_sale/i18n/account_payment_sale.pot rename to account_payment_sale/i18n/account_payment_sale.pot diff --git a/__unported__/account_payment_sale/i18n/nl.po b/account_payment_sale/i18n/nl.po similarity index 100% rename from __unported__/account_payment_sale/i18n/nl.po rename to account_payment_sale/i18n/nl.po diff --git a/__unported__/account_payment_sale/model/__init__.py b/account_payment_sale/model/__init__.py similarity index 100% rename from __unported__/account_payment_sale/model/__init__.py rename to account_payment_sale/model/__init__.py diff --git a/__unported__/account_payment_sale/model/sale.py b/account_payment_sale/model/sale.py similarity index 100% rename from __unported__/account_payment_sale/model/sale.py rename to account_payment_sale/model/sale.py diff --git a/account_payment_sale/models/__init__.py b/account_payment_sale/models/__init__.py new file mode 100644 index 000000000..9de52dd65 --- /dev/null +++ b/account_payment_sale/models/__init__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Sale module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import sale_order +from . import stock_picking diff --git a/account_payment_sale/models/sale_order.py b/account_payment_sale/models/sale_order.py new file mode 100644 index 000000000..cd93e56d7 --- /dev/null +++ b/account_payment_sale/models/sale_order.py @@ -0,0 +1,50 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Sale module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + payment_mode_id = fields.Many2one( + 'payment.mode', string='Payment Mode', + domain="[('payment_order_type', '=', 'debit')]") + + @api.multi + def onchange_partner_id(self, partner_id): + res = super(SaleOrder, self).onchange_partner_id(partner_id) + if partner_id: + partner = self.env['res.partner'].browse(partner_id) + res['value']['payment_mode_id'] = partner.customer_payment_mode.id + else: + res['value']['payment_mode_id'] = False + return res + + @api.model + def _prepare_invoice(self, order, lines): + """Copy bank partner from sale order to invoice""" + vals = super(SaleOrder, self)._prepare_invoice(order, lines) + vals['payment_mode_id'] = order.payment_mode_id.id, + vals['partner_bank_id'] = (order.payment_mode_id and + order.payment_mode_id.bank_id.id) + return vals diff --git a/account_payment_sale/models/stock_picking.py b/account_payment_sale/models/stock_picking.py new file mode 100644 index 000000000..f9d48f688 --- /dev/null +++ b/account_payment_sale/models/stock_picking.py @@ -0,0 +1,40 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Payment Purchase module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, api + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + @api.model + def _create_invoice_from_picking(self, picking, vals): + if picking: + # Search if this picking comes from a sale order + sale_order_obj = self.env['sale.order'] + sale_order = sale_order_obj.search( + [('picking_ids', 'in', picking.id)], limit=1) + if sale_order: + vals['partner_bank_id'] = sale_order.payment_mode_id.bank_id.id + vals['payment_mode_id'] = sale_order.payment_mode_id.id + return super(StockPicking, self)._create_invoice_from_picking(picking, + vals) diff --git a/__unported__/account_payment_sale/view/sale.xml b/account_payment_sale/view/sale.xml similarity index 100% rename from __unported__/account_payment_sale/view/sale.xml rename to account_payment_sale/view/sale.xml diff --git a/account_payment_sale/views/sale_order_view.xml b/account_payment_sale/views/sale_order_view.xml new file mode 100644 index 000000000..016598e09 --- /dev/null +++ b/account_payment_sale/views/sale_order_view.xml @@ -0,0 +1,24 @@ + + + + + + + + + account_payment_sale.sale_order.form + sale.order + + + + + + + + + + From 5b9a026d98304d3351e25c5b30af289c176b1e5d Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 16 Sep 2014 12:28:58 +0200 Subject: [PATCH 02/21] [DEL] Duplicated files --- .../model/__init__.py | 7 - .../model/account_move_line.py | 105 --------- .../model/account_payment.py | 93 -------- .../model/bank_payment_manual.py | 65 ------ .../model/payment_mode.py | 62 ------ .../model/payment_mode_type.py | 73 ------- .../model/payment_order_create.py | 201 ------------------ account_payment_sale/model/__init__.py | 23 -- account_payment_sale/model/sale.py | 55 ----- 9 files changed, 684 deletions(-) delete mode 100644 account_banking_payment_export/model/__init__.py delete mode 100644 account_banking_payment_export/model/account_move_line.py delete mode 100644 account_banking_payment_export/model/account_payment.py delete mode 100644 account_banking_payment_export/model/bank_payment_manual.py delete mode 100644 account_banking_payment_export/model/payment_mode.py delete mode 100644 account_banking_payment_export/model/payment_mode_type.py delete mode 100644 account_banking_payment_export/model/payment_order_create.py delete mode 100644 account_payment_sale/model/__init__.py delete mode 100644 account_payment_sale/model/sale.py diff --git a/account_banking_payment_export/model/__init__.py b/account_banking_payment_export/model/__init__.py deleted file mode 100644 index 74ab85c8d..000000000 --- a/account_banking_payment_export/model/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# -*- coding: utf-8 -*- -from . import account_move_line -from . import account_payment -from . import bank_payment_manual -from . import payment_mode -from . import payment_mode_type -from . import payment_order_create diff --git a/account_banking_payment_export/model/account_move_line.py b/account_banking_payment_export/model/account_move_line.py deleted file mode 100644 index 6d7fad550..000000000 --- a/account_banking_payment_export/model/account_move_line.py +++ /dev/null @@ -1,105 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2004-2014 OpenERP S.A. (http://www.openerp.com/) -# (C) 2014 Akretion (http://www.akretion.com/) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from operator import itemgetter - - -# All the code below aims at fixing one small issue in _to_pay_search() -# But _to_pay_search() is the search function of the field 'amount_to_pay' -# which is a field.function and these functions are not inheritable in OpenERP. -# So we have to inherit the field 'amount_to_pay' and duplicate the related -# functions -# If the patch that I proposed in this bug report -# https://bugs.launchpad.net/openobject-addons/+bug/1275478 -# is integrated in addons/account_payment, then we will be able to remove this -# file. -- Alexis de Lattre -class account_move_line(orm.Model): - _inherit = 'account.move.line' - - def amount_to_pay(self, cr, uid, ids, name, arg=None, context=None): - """ Return the amount still to pay regarding all the payemnt orders - (excepting cancelled orders)""" - if not ids: - return {} - cr.execute("""SELECT ml.id, - CASE WHEN ml.amount_currency < 0 - THEN - ml.amount_currency - ELSE ml.credit - END - - (SELECT coalesce(sum(amount_currency),0) - FROM payment_line pl - INNER JOIN payment_order po - ON (pl.order_id = po.id) - WHERE move_line_id = ml.id - AND po.state != 'cancel') AS amount - FROM account_move_line ml - WHERE id IN %s""", (tuple(ids),)) - r = dict(cr.fetchall()) - return r - - def _to_pay_search(self, cr, uid, obj, name, args, context=None): - if not args: - return [] - line_obj = self.pool.get('account.move.line') - query = line_obj._query_get(cr, uid, context={}) - where = ' and '.join(map(lambda x: '''(SELECT - CASE WHEN l.amount_currency < 0 - THEN - l.amount_currency - ELSE l.credit - END - coalesce(sum(pl.amount_currency), 0) - FROM payment_line pl - INNER JOIN payment_order po ON (pl.order_id = po.id) - WHERE move_line_id = l.id - AND po.state != 'cancel' - ) %(operator)s %%s ''' % {'operator': x[1]}, args)) - sql_args = tuple(map(itemgetter(2), args)) - - cr.execute( - ('''\ - SELECT id - FROM account_move_line l - WHERE account_id IN (select id - FROM account_account - WHERE type in %s AND active) - AND reconcile_id IS null - AND credit > 0 - AND ''' + where + ' and ' + query - ), (('payable', 'receivable'), ) + sql_args - ) - # The patch we have compared to the original function in - # addons/account_payment is just above : - # original code : type = 'payable' - # fixed code : type in ('payable', 'receivable') - - res = cr.fetchall() - if not res: - return [('id', '=', '0')] - return [('id', 'in', map(lambda x:x[0], res))] - - _columns = { - 'amount_to_pay': fields.function( - amount_to_pay, - type='float', - string='Amount to pay', - fnct_search=_to_pay_search - ), - } diff --git a/account_banking_payment_export/model/account_payment.py b/account_banking_payment_export/model/account_payment.py deleted file mode 100644 index bc720771a..000000000 --- a/account_banking_payment_export/model/account_payment.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# -# All other contributions are (C) by their respective contributors -# -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from openerp.tools.translate import _ -from openerp import netsvc - - -class payment_order(orm.Model): - _inherit = 'payment.order' - - _columns = { - 'payment_order_type': fields.selection( - [('payment', 'Payment'), ('debit', 'Direct debit')], - 'Payment order type', required=True, - readonly=True, states={'draft': [('readonly', False)]}, - ), - 'mode_type': fields.related( - 'mode', 'type', type='many2one', relation='payment.mode.type', - string='Payment Type'), - } - - _defaults = { - 'payment_order_type': 'payment', - } - - def launch_wizard(self, cr, uid, ids, context=None): - """ - Search for a wizard to launch according to the type. - If type is manual. just confirm the order. - Previously (pre-v6) in account_payment/wizard/wizard_pay.py - """ - if context is None: - context = {} - result = {} - orders = self.browse(cr, uid, ids, context) - order = orders[0] - # check if a wizard is defined for the first order - if order.mode.type and order.mode.type.ir_model_id: - context['active_ids'] = ids - wizard_model = order.mode.type.ir_model_id.model - wizard_obj = self.pool.get(wizard_model) - wizard_id = wizard_obj.create(cr, uid, {}, context) - result = { - 'name': wizard_obj._description or _('Payment Order Export'), - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': wizard_model, - 'domain': [], - 'context': context, - 'type': 'ir.actions.act_window', - 'target': 'new', - 'res_id': wizard_id, - 'nodestroy': True, - } - else: - # should all be manual orders without type or wizard model - for order in orders[1:]: - if order.mode.type and order.mode.type.ir_model_id: - raise orm.except_orm( - _('Error'), - _('You can only combine payment orders of the same ' - 'type') - ) - # process manual payments - wf_service = netsvc.LocalService('workflow') - for order_id in ids: - wf_service.trg_validate( - uid, 'payment.order', order_id, 'done', cr - ) - return result diff --git a/account_banking_payment_export/model/bank_payment_manual.py b/account_banking_payment_export/model/bank_payment_manual.py deleted file mode 100644 index cd17f4dd1..000000000 --- a/account_banking_payment_export/model/bank_payment_manual.py +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# -# All other contributions are (C) by their respective contributors -# -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -''' -This module contains a single "wizard" for confirming manual -bank transfers. -''' - -from openerp.osv import orm, fields -from openerp import netsvc - - -class payment_manual(orm.TransientModel): - _name = 'payment.manual' - _description = 'Send payment order(s) manually' - - _columns = { - 'payment_order_ids': fields.many2many( - 'payment.order', - 'wiz_manual_payorders_rel', - 'wizard_id', - 'payment_order_id', - 'Payment orders', - readonly=True - ), - } - - def create(self, cr, uid, vals, context=None): - payment_order_ids = context.get('active_ids', []) - vals.update({ - 'payment_order_ids': [[6, 0, payment_order_ids]], - }) - return super(payment_manual, self).create( - cr, uid, vals, context=context - ) - - def button_ok(self, cr, uid, ids, context=None): - wf_service = netsvc.LocalService('workflow') - for wiz in self.browse(cr, uid, ids, context=context): - for order_id in wiz.payment_order_ids: - wf_service.trg_validate( - uid, 'payment.order', order_id.id, 'done', cr) - return {'type': 'ir.actions.act_window_close'} diff --git a/account_banking_payment_export/model/payment_mode.py b/account_banking_payment_export/model/payment_mode.py deleted file mode 100644 index e5cf3b452..000000000 --- a/account_banking_payment_export/model/payment_mode.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# -# All other contributions are (C) by their respective contributors -# -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class payment_mode(orm.Model): - ''' Restoring the payment type from version 5, - used to select the export wizard (if any) ''' - _inherit = "payment.mode" - - def suitable_bank_types(self, cr, uid, payment_mode_id=None, context=None): - """ Reinstates functional code for suitable bank type filtering. - Current code in account_payment is disfunctional. - """ - res = [] - payment_mode = self.browse( - cr, uid, payment_mode_id, context) - if (payment_mode - and payment_mode.type - and payment_mode.type.suitable_bank_types): - res = [t.code for t in payment_mode.type.suitable_bank_types] - return res - - _columns = { - 'type': fields.many2one( - 'payment.mode.type', 'Payment type', - required=True, - help='Select the Payment Type for the Payment Mode.' - ), - 'payment_order_type': fields.related( - 'type', 'payment_order_type', readonly=True, type='selection', - selection=[('payment', 'Payment'), ('debit', 'Direct debit')], - string="Payment Order Type"), - 'active': fields.boolean('Active'), - } - - _defaults = { - 'active': True, - } diff --git a/account_banking_payment_export/model/payment_mode_type.py b/account_banking_payment_export/model/payment_mode_type.py deleted file mode 100644 index 5514595ec..000000000 --- a/account_banking_payment_export/model/payment_mode_type.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# -# All other contributions are (C) by their respective contributors -# -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class payment_mode_type(orm.Model): - _name = 'payment.mode.type' - _description = 'Payment Mode Type' - _columns = { - 'name': fields.char( - 'Name', size=64, required=True, - help='Payment Type' - ), - 'code': fields.char( - 'Code', size=64, required=True, - help='Specify the Code for Payment Type' - ), - 'suitable_bank_types': fields.many2many( - 'res.partner.bank.type', - 'bank_type_payment_type_rel', - 'pay_type_id', 'bank_type_id', - 'Suitable bank types', required=True), - 'ir_model_id': fields.many2one( - 'ir.model', 'Payment wizard', - help=('Select the Payment Wizard for payments of this type. ' - 'Leave empty for manual processing'), - domain=[('osv_memory', '=', True)], - ), - 'payment_order_type': fields.selection( - [('payment', 'Payment'), ('debit', 'Direct debit')], - 'Payment order type', required=True, - ), - 'active': fields.boolean('Active'), - } - - _defaults = { - 'payment_order_type': 'payment', - 'active': True, - } - - def _auto_init(self, cr, context=None): - r = super(payment_mode_type, self)._auto_init(cr, context=context) - # migrate xmlid from manual_bank_transfer to avoid dependency on - # account_banking - cr.execute("""UPDATE ir_model_data - SET module='account_banking_payment_export' - WHERE module='account_banking' AND - name='manual_bank_tranfer' AND - model='payment.mode.type'""") - return r diff --git a/account_banking_payment_export/model/payment_order_create.py b/account_banking_payment_export/model/payment_order_create.py deleted file mode 100644 index 910673da7..000000000 --- a/account_banking_payment_export/model/payment_order_create.py +++ /dev/null @@ -1,201 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# -# All other contributions are (C) by their respective contributors -# -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from openerp.tools.translate import _ - - -class payment_order_create(orm.TransientModel): - _inherit = 'payment.order.create' - - def extend_payment_order_domain( - self, cr, uid, payment_order, domain, context=None): - if payment_order.payment_order_type == 'payment': - domain += [ - ('account_id.type', 'in', ('payable', 'receivable')), - ('amount_to_pay', '>', 0) - ] - return True - - def search_entries(self, cr, uid, ids, context=None): - """ - This method taken from account_payment module. - We adapt the domain based on the payment_order_type - """ - line_obj = self.pool.get('account.move.line') - mod_obj = self.pool.get('ir.model.data') - if context is None: - context = {} - data = self.read(cr, uid, ids, ['duedate'], context=context)[0] - search_due_date = data['duedate'] - - # start account_banking_payment - payment = self.pool.get('payment.order').browse( - cr, uid, context['active_id'], context=context) - # Search for move line to pay: - domain = [ - ('move_id.state', '=', 'posted'), - ('reconcile_id', '=', False), - ('company_id', '=', payment.mode.company_id.id), - ] - self.extend_payment_order_domain( - cr, uid, payment, domain, context=context) - # end account_direct_debit - - domain = domain + [ - '|', ('date_maturity', '<=', search_due_date), - ('date_maturity', '=', False) - ] - line_ids = line_obj.search(cr, uid, domain, context=context) - context.update({'line_ids': line_ids}) - model_data_ids = mod_obj.search( - cr, uid, [ - ('model', '=', 'ir.ui.view'), - ('name', '=', 'view_create_payment_order_lines')], - context=context) - resource_id = mod_obj.read( - cr, uid, model_data_ids, fields=['res_id'], - context=context)[0]['res_id'] - return { - 'name': _('Entry Lines'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'payment.order.create', - 'views': [(resource_id, 'form')], - 'type': 'ir.actions.act_window', - 'target': 'new', - } - - def _prepare_payment_line(self, cr, uid, payment, line, context=None): - '''This function is designed to be inherited - The resulting dict is passed to the create method of payment.line''' - _today = fields.date.context_today(self, cr, uid, context=context) - if payment.date_prefered == "now": - # no payment date => immediate payment - date_to_pay = False - elif payment.date_prefered == 'due': - # account_banking - # date_to_pay = line.date_maturity - date_to_pay = ( - line.date_maturity - if line.date_maturity and line.date_maturity > _today - else False) - # end account banking - elif payment.date_prefered == 'fixed': - # account_banking - # date_to_pay = payment.date_scheduled - date_to_pay = ( - payment.date_scheduled - if payment.date_scheduled and payment.date_scheduled > _today - else False) - # end account banking - - # account_banking - state = 'normal' - communication = line.ref or '-' - if line.invoice: - if line.invoice.type in ('in_invoice', 'in_refund'): - if line.invoice.reference_type == 'structured': - state = 'structured' - communication = line.invoice.reference - else: - if line.invoice.reference: - communication = line.invoice.reference - elif line.invoice.supplier_invoice_number: - communication = line.invoice.supplier_invoice_number - else: - # Make sure that the communication includes the - # customer invoice number (in the case of debit order) - communication = line.invoice.number.replace('/', '') - state = 'structured' - - # support debit orders when enabled - if (payment.payment_order_type == 'debit' - and 'amount_to_receive' in line): - amount_currency = line.amount_to_receive - else: - amount_currency = line.amount_to_pay - # end account_banking - - # account banking - # t = None - # line2bank = line_obj.line2bank(cr, uid, line_ids, t, context) - line2bank = self.pool['account.move.line'].line2bank( - cr, uid, [line.id], payment.mode.id, context) - # end account banking - - res = { - 'move_line_id': line.id, - 'amount_currency': amount_currency, - 'bank_id': line2bank.get(line.id), - 'order_id': payment.id, - 'partner_id': line.partner_id and line.partner_id.id or False, - # account banking - # 'communication': line.ref or '/' - 'communication': communication, - 'state': state, - # end account banking - 'date': date_to_pay, - 'currency': (line.invoice and line.invoice.currency_id.id - or line.journal_id.currency.id - or line.journal_id.company_id.currency_id.id), - } - return res - - def create_payment(self, cr, uid, ids, context=None): - ''' - This method is a slightly modified version of the existing method on - this model in account_payment. - - pass the payment mode to line2bank() - - allow invoices to create influence on the payment process: not only - 'Free' references are allowed, but others as well - - check date_to_pay is not in the past. - ''' - if context is None: - context = {} - data = self.read(cr, uid, ids, [], context=context)[0] - line_ids = data['entries'] - if not line_ids: - return {'type': 'ir.actions.act_window_close'} - - payment = self.pool['payment.order'].browse( - cr, uid, context['active_id'], context=context) - # Populate the current payment with new lines: - for line in self.pool['account.move.line'].browse( - cr, uid, line_ids, context=context): - vals = self._prepare_payment_line( - cr, uid, payment, line, context=context) - self.pool['payment.line'].create(cr, uid, vals, context=context) - # Force reload of payment order view as a workaround for lp:1155525 - return { - 'name': _('Payment Orders'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'form,tree', - 'res_model': 'payment.order', - 'res_id': context['active_id'], - 'type': 'ir.actions.act_window', - } diff --git a/account_payment_sale/model/__init__.py b/account_payment_sale/model/__init__.py deleted file mode 100644 index 079ae1b71..000000000 --- a/account_payment_sale/model/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Payment Sale module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from . import sale diff --git a/account_payment_sale/model/sale.py b/account_payment_sale/model/sale.py deleted file mode 100644 index 5951f96af..000000000 --- a/account_payment_sale/model/sale.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Payment Sale module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class sale_order(orm.Model): - _inherit = "sale.order" - - _columns = { - 'payment_mode_id': fields.many2one( - 'payment.mode', 'Payment Mode'), - } - - def onchange_partner_id(self, cr, uid, ids, part, context=None): - res = super(sale_order, self).onchange_partner_id( - cr, uid, ids, part, context=context) - if part: - partner = self.pool['res.partner'].browse( - cr, uid, part, context=context) - res['value']['payment_mode_id'] = \ - partner.customer_payment_mode.id or False, - else: - res['value']['payment_mode_id'] = False - return res - - def _prepare_invoice(self, cr, uid, order, lines, context=None): - """Copy bank partner from sale order to invoice""" - invoice_vals = super(sale_order, self)._prepare_invoice( - cr, uid, order, lines, context=context) - invoice_vals.update({ - 'payment_mode_id': order.payment_mode_id.id or False, - 'partner_bank_id': order.payment_mode_id and - order.payment_mode_id.bank_id.id or False, - }) - return invoice_vals From 2fc5e596900d3fd3f29d6c8f4189f742c5da156b Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 23 Sep 2014 08:41:37 +0200 Subject: [PATCH 03/21] [IMP] Update icon files --- .../static/description/icon.png | Bin 0 -> 8373 bytes .../static/src/img/icon.png | Bin 6936 -> 0 bytes .../static/description/icon.png | Bin 0 -> 7840 bytes .../static/src/img/icon.png | Bin 6892 -> 0 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 account_banking_sepa_credit_transfer/static/description/icon.png delete mode 100644 account_banking_sepa_credit_transfer/static/src/img/icon.png create mode 100644 account_banking_sepa_direct_debit/static/description/icon.png delete mode 100644 account_banking_sepa_direct_debit/static/src/img/icon.png diff --git a/account_banking_sepa_credit_transfer/static/description/icon.png b/account_banking_sepa_credit_transfer/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e1485aabdd1bb71edc4867a3b83650e68bfda282 GIT binary patch literal 8373 zcmbVSbxa&Uvp)`}xH}YSao1AZodXUi?yf}+cPI{5C@uwxQ=B4KtQ2>r$l>l@{LwG( z&zJ9yx5?~eCcDXIc6NU=lZn<)lgGj!#{d8TSc(cVnlC)~AEBYV%-v#ULoW=;T}n|K z?Pd6*Sw_9c=&lMM++Wtu{UZb^rY!FlC7Fk;o`;r;wFkuPqZI%GfpFM4JGfhzxmt0! ze6-0reoqbn&;k@?B(=S>k8*sx3Bj|yK_#vA^#gP;Hbp%`1QPAvI98NI8eHhfD4vG$ zeF42z8Xnp*RDH-)O%v)nT9i~@Ji-AOrE#IJFzC>t>KM#c<|NQQw8BPjEp=5ogM}v+6LLIZh+3G*9x9dSg&g8g13^PG0L@`~T3pOdJ-;-*~b z;A`*?GP*_ZytVIq@%JGCSr&0zvOl8(5{s?GRn$JE-a5zIwp)y(Z)+}gakR9Kwgk)e z(N+n+s!|=SAzUMhAe1olS4501iFyvx(^bJPy0UrSeW#v#x24gf!)%o^Y2b7+Uesd@ z8#&ecq7nAEHFE0)xnW;aTIBcuD>+!VT2xOzpGZM(+@GZPvxiXhM)p<}lHAK&Cj6ON5v%_Tg$|dnLoYjH->IrX*AU>Ozs2Y0?eQA_df@o{b*k#cBEX*Znr+&P+n;>t3J8o)&bDyFmF@! zAa96ay-ms3_zC`UCsr{QgF(3?&uS=*z*Cn!M*onXi!9Hf()``Eb>rkp^||j1692wp zQJp~U8z!BTrdzb9`B-zyNwP;!aWoX@bT0CyK8pfgCT`*U_Fuf5ijvo`uG5p!susrxV###hI zW8YRWoUAt?c4c~y%3S2MSWLP9EWR8_I-mdNiCoSFHXVk3gO%aiIFzGtdz>i!yb$~h z*1i1hx+mIc5hBP^-VCto975F~!ZLE1#FbR%Gj%y_V(A@+DY`oT{#GAK{VAJ71H0^~W{s}02*k&ZXFuv@ zp4^Sr%@P@0)8y%PJWm3cf{x$cb=x$Jv~ET{TXB16)BoO&BNcEA5zVx5L{)%nHW3PO z#KehWWMMG@*`?y>z~zKTNFK;_$dh!N6OPJ5IaDF+Pz>0WI>hAh)Mx5gh@+?>HNWXe zqA#qPy>0W>CfEDP3`{4+v!i@7hPb`_KJZtR$(5b}Gwen;3?Rn*&gsd3Q~cpW;$hh` z{g#>JE6GqyH-3a~$P?Jh;hTJZ9|TRWCX|!kknJtptTW*Uq5ArghUge1Ebn#<{|R7VEZx2&X4>?gscC&?%<>Xf9G z$4ECQ3*K;|Lk+a~w~!tPX)Ubsc=^tE9bioAmJ&CjLqSJgGh4Go_vG>0KNPxj}^V`7gWK2P*dL@v)i4&!%d z+N$zzk)+S=EigikpqttZt1Ux}c)Yq|EZOcoufwZo6UqKF* z+al#5h$|Biboe!(&3O9#`NZ$!xqEZ!T{YS9eE|6Rd>c`OaBg3@iP~Nl-q9U7lpWM@ zT4%eDkNrvj^Y7Z$fV!Yi9@jhyo_J;9jbB0rd_?1jMiQ>I^>GZb(-QkvP0gghqAl$q z>K+v`DJ&&_ZMGdxs}{ZYZgYyVrDY+%E&R1D0%A0O#(6gf`QdywKlAeE$4lIBp^pytGYhrb z`d%Mv0KEVPUmP#z3w7RqN%3$_E|s zoUxLBYZ#^hT*3(fdiRpY0x7akR!U-&aTErEHMS%N86R0Ji$AG4up6t*%|!9X-Z^{B zy}E_(KP|ksKZ{|pHL0Z=c=tl81=MpsvJK%%cE;K2RoIeww*^6sI{aqG$eZ|97qX)~ zYk!8m1|6aEdE;zVDv-?*uxkXATS6*UtP%!bKV28*tpF6*UiuzKm3~!cB$NxDJy;#$ zPS?244)TTrhTKPEW5tYV)sD8ZEHmv&CYi1(Ef{+rZgs;fVHR9GG5b@__vkPV zJ}{)EA~Kt48jo)*2qsIP;U%z06d6514=0rgIij@BP`);0@~|&M#cSp>{9Jo0g7k5j zR{h<)*@u1(TJ%}%50`O@o%V278fbGh>|YLZ`+Ra(cBSa6F!R#d<>&{4tlk_(FWkS? zAF6?`53`T;dyS&XMJi_4Q!0tjq*EPkgOKO{=_!RFgwaJ)xCO5AvlPoc-*EsNVawCB z*a_RwTMbGg`0>^2>C)jo_9$dL6c{q+B`8v9a(j=wSTH<~VjXRp3I!o#2^DufC?Vjh z>uA)VSvRqzlU?HhuoK}kRzsXdORMyi<^$pC4Me?pYZ7jlpdTLH%j7 z+THm6=Gz_dZBOyj7O#$xkoU;&MA6kqVeRWdeAxmwId-g`(vPvDwX)hGEiy>x0!pux z&@b}y=*4R%w}dGijfjqz#z7MaER!H@kx&mnsM>^F=rW&3b%wAr4DGy^H!aX@E7)ge z`fZ-=*)B;(fam15IcE&dXB&p_zcp2*of9JTi!J!2Tj$uFg|f&ApQM(D`@NpfvPn4* z`9~ysc>4lKyhYiVrPvDzk#;*2olB=7_KD+Sb(#J%YsR0^ z9;h5aahY90RxT;G*>2{=HD#HdH3KQNKI5D~!wb|u5{=M-^HFAx4)j|+bWdtHrt(PY zzVbi~!F=>0N@5@r&2yAK3F<_%&Ri8z%Mziz9VvYvzv1Xux^6GR5~J1Hh-%PHnf zV4%@=vYKzPgG@j ze+7R%YS7~%$Jph1@%Oem@BUCwI8XFxo)v36Lr8OR$s-g1L zP1IC7ouu#(lMY4N`sL<3JLv9xJNPyvK<+0yt;Y zE?dj_Cir@lAN8lkIquL!5TWR$Sc5^(4UL89ajmsDru}seMn*@6I@;&d?xq!^hv|%* zxu5ViTc+{C;Z^Jq!H%87pYjXOjhmGq-8`=Y)MrW>Frn&pe~aP=#BDME`wSCfAK#M3 zoQ?&2ySvAEi8rb|lY11iKJIZzyR~0%KH0y^pfcT16hBfkfzO4lTv~FK@^|xVnr?zT z&+rr(-Z@OOwz6p|15ej^$9_Jp{+_HqdFOCa&%-YCbzr?fT=jG<- zF=D5^w43TQ>N_qyu^p2~r4vabT_aJuzjteY0!VT{o65*4h*?KX-lLvUx8tzC%SO3; z^>+0L#hxWtE!)=GQbZR}GMis>C(TdyVd9hg+cvL@wwt#nZC2xPuy;-K1`cd|r5BlM zVehJMkLHt!*$9y#%Ei#HY{!Bsu`xjx#9DFH!q=}i7#YaNW*NJZ6FW{ZWL=y}DNBDdN#{1Q zHqQ4~OPFq(L9UC%PlCCBtgeViia3Q2np3(#O?qE)k;FKt8`c-u1B%<)?Emsk%)gG0 z-)#(_>URV`g1wokupZE*R8XwmoiCORJ@A@ic266ly?z|W)1ce+D=u?E z%8IgOa;6p!JS3x`;qYByK>g#<&6gibO=sh0tU6!39^rkK*nN{+M%$8p1!tDO zr3_N}cAwGMq|hi#3+)4qR~}+Z5{=TJNB#;7{!zKBcG!5uVHn>d*K3U$EV^fMt3ExsbtveJSL4T9-sQG7wd~=j?3fNcKmqkCOLm7 zWukq4IXsWMit%)N+DnX?!jM+g1Zu3S-FHUa6|>fNIXk5Q?*$p&BRVK~HD+3A-Jq>v zrTB4IwmijUKdjkV5t&e{sR|8o{V@@8U%FYnU%px19x_>q~R&04QqvMqjzWzT7{dlH#3tF!P1C%W>p^Q8`SG#)-eNYG z=)jax<<>K1S#Q;$Yw`sVO}?1kiwzV8U?uJu3tB9#4_7`QyjilyJlx&sHv#)JXC&$Q z=Ejg`n)*{YMyGva;U$48t^UnrRi_L|+ew4+UpZw%ubbIS z3@_0E+%^|^ma@&ty_yyeW9QoQ>ZyMU{JYvMLv#<2M`mY3L1?Y}3oz#lsa}q(ht`f+ zS&9(-CH)5UNa?c{u`4tqE`~KIM2tjgmbtbw`<4r?{~aj+%2y1t?Z{%d(4F(ABTgk~ zU)`7tzouWzKqicGokruuymtVP;5apX`IZ`+ANHyw-Y5lnR4Kur{F@D=)h@Lu4|*Kl zhLS7^7)8~g=TrO=k)5LAS12L-V#Wf!SwDFd)^^D1RNN(|9h= z*)`r6Dpt5#|IhjKO_E@^VW5IKd?vgv1apgj(U_PadrXp)p=#ASdXKHHksD2VS{ptb zY4=S)yJMunPkm|v8Zqa@bga1aC9RIxFQH{^r!&Q+fWenG3|fJ5NL))G31QEjhIMCjn^@HBt&^;mB!pYx6~Nf^vApNZ{$4G z{JQiEi_^*2#uT)?Z-ZPT3~U$~$z6zuHlOrOV-!xK@UQxfPY4||Fa$95G2kthe*L%` zY7#L8%S6U};cZ>vF&MpYx6AYlgA|=q>(CzR{hfYw23p@3w>sr=^JGmW7JT^0>P-IE;|nO$PaHfBu8g7c|4 zi2w?9^@K%`h^&ZzE=|-MZLdMyLdw4re`I}Lf&t?zyR_im@&PnWr{F<><6@-@=;y)d za^tlga$a!l6=-fwP<>iTE11i)U@_o>AF-t)*#CRbO>q$7iWRS+DSn#jCma&4~w#X#&^i8BHKJ$V79E@21 zPaz*Lzp~I1rDhf1reX+YnHwDaAfq5^bGP`A`N}jv^0~R>XyBy zD60muKnCPw;4zq)9C+LqNQ4j;sg)*K;<&?=7o4G_?GdL10DpqPiXxf`M1zI2JS`_t3(`q6@WXT z8Telmgq$#^brQ{oR8B3&9gHzuGU9p9t-5|{w6K4b!uoFHi7bVm07#^JW zEWuN4AEl-HnM{GaAt}K>Z$2p&c9sR!S(CP$gyc)^i}k5nGw1}{H=jQw&IJzaz!~%b zwK}brHnc>**c$!PkYmoa50hbt)K>xM3 zyaOk9Z_V_BXYuwoR)C~%2d9v}$K#feu6+GqS|4N5%2CxdTMW6?2nm~$TlG#P@OM1H zujLoo{F+J8&q}88O6wXkZRNh=GY7|u!7%drI1>z2NrVU8<_EshEqMuLJYjX2Dxkke zUh5f3Tx6#gUfHS0eqH>LU*L{eQ}4aHq*e{WL(36}$0xBsoNMLeMu%1zj3}scD!;mq z?};9;vJHU?f13`%%?t%r-iVx#YqAIphEPf1up!pGa;3-RNIg^P6yI&&kgR?>psB)P zzM=^){t9>+YA~dugH+fzaBhi!saWWYf~#u@cTw;@l$JL#tr`!5W@<$8BD!cEMuSRi zs8umkyHNf{*)#3}e=^d^celzgD9SjKK((Z-zLpz=tlS#;O36s^A1Ts(rgRPW#a5)7 zRFfISgW}X+>ICzwPS`#fYV~ne0m}8!4W&J&$4E^pqSy$bJ$f6PBvCajjpd_Zg)loW zS`Wb*s)~bC@!p6e(aTv5CJ5>X{N&dPe*MjDB1Ci`?kDn z8?5V61bXcNn&Y$9REk%q!H^Jm`JETT+B4w`7z6P36h~TurA(panecmd1QUoxLHQ8k zE_VdFNpiFw49Z*&U&~*~Zho}q@h6OJsKwHwbXL-n ziL~Gj_TPhRfOUgaOmoC8TVn%m#`1k_;)Tmw|C|`(rwX1ku+jAgvJp>wWb2TM(B&W% zoS-Qxze~{lLBT~AcPIuPxf#3$0@I=@I`zLe7L_}{Qdy$q0~VHuPh6}RpB8_hk+Vj0 z^@^&)4+%gxPm=?cK!C>`hY*)i2`X~T=+MW$D)yA zr$zT`m6O{&cRm+p=G7oM^m1bDN;kgcBnA2eY9x!SCVsSsHA)X0182R5ToSMRt8QkG z8o92bspChu3yXgQ;Y;;)An)$ArK+il8JE!RiG9s{g!TFvqc=nsfHSG8kUKvT>H1c) zztZ$V8K;+dg`2uVa;jo2n{?%Z06#Y-SXJ#fi0@@^R+3wl>udsEO9I>R@$3?1sZbrf zMw<}K>GEwZzGl)0O^T@FVn|(4N(tf(;5n!x0kj(xz=AS&1bskzyDp^;<@jD7M+^+t z;wVGRp9)tgF1hxr$JvIGjT4!l8m}@E;Q^lM4{3-~KX-z#7{8T+^@@oT!s*%oLdvC2(-!T^@Y zB+{mk>hr4(*iNf*iQ?#t=7;TGKT*rt($~-vOET)UC77OJ74id3(9TpssS?9?f%asv z622Dg)y3n$%91ynC%)y~l>l65h#n_V<!9s1N4f_J+cyB<4n{R>u03`04vm1<`wMs#f360aFeibO4)irNsYaW; z!DII>_6YuuCp2Z&3)tNUmUvL4f~mVvy^x~(!Fi=Ck|nY9xTs-5XsnD>m9KH+6<7dC z4p+@wZ~Jq3)i2lxMQZI`6UuCUD^L6vkaRxrMsJX^cb*v^zU_`^UYIPxjkxorGQlV* z(hyo@Bf%#cIkP_iR9VaDD1UT9#CCRvo${MxM*v5$z}s3rM~qimHQAN`L}~UN6J0(s zaj{$*-o?S zzFOS+nA01kUszyDqYyT}o5F=>Cw(N&R7+`b9SlzWo043J5oF3Kd?pp5D2Y;_Uvtn>I z53YRXMMu$Ub3pQbq-w9J&na*1<;+7ejWTJiZd#;_zhEvj q{-^V$Vc^ZbUV#4s?EhK)jCyh8mi$^J$LwVXKv7mrrb@~*^nU;)3MR_{ literal 0 HcmV?d00001 diff --git a/account_banking_sepa_credit_transfer/static/src/img/icon.png b/account_banking_sepa_credit_transfer/static/src/img/icon.png deleted file mode 100644 index 12ecf91ce177d6d36997bb6769f34ddd287a4465..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6936 zcmV+z8|UPSP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*$` z7BD0^OCF&B02-J{L_t(|+RdAJcvbba_dk1|dCG9k$;rt)5C{em0)e0r5J9a|t@G5@ zYHy3RzP7!+-qyGJ`n2`-7WLk?)@rG(+S=P{2en#3D}tcN5HbS^gv|4JPR=~-v-kVQ ziGi4b;MDtj9-b#>+WgjcueE;P^<8TVe8OvOSypy=S=OdByJfLiugf>+)%iNDDkUys z6i|!+3PMmN5)4P;u5d)^34|gYqb~o+`o_LJhno8PKFR$FpTtFPyu5V7iqfoWEJj_G z-D)fw8ue>iJIBQSArHPl6j2nA6%Yjh1qA^CS&BN0Gz)oI$>e3FhC`89gWD56 z*x1zn;>&Lx+xNc~fOVz0DeKl1Zpm;a-H_q1tU6TRE7lzwK&??zT9U3B^S9UPSzKUa zO=)&lQ_H}QfBKt!PkpKYY`LXk>9XRi$Fnn%H@)!pCei6k;no}1V$f^&v{r3n4}X5? zFc+U+B&*cI?&{jEd!GOMk>j5@0N?yd)fcK(6+YV0GwwXl(8pb0zJLs8@~2{Sb!``w z75P)I<8hf6UaFy|XN=1?E*?5^V(6Rywe6ihpUpK@XY=JB+MK{VzH0GDGR7Z>5{^PRA`^{DXfz^%Fuy~3ykSyPjJPL) zpa_^vI!4F*WH^&qciv)N-q9rHW~5YYKEEi>6+F3Pa1i+;hrq^-sBgIF>gSzlmTUj` zYLj@^S2tp}n$ODEKu83&9hJroq8UMD!fZ)KrBZ>SpeQmP&jhmMM~?eZBsWUjg;^g% z6cg9*`6Ilw_c%FODXcEfo4WSFnoiDLT`=|fch4WdX3}6W>;C%ko>y<#vj^!T0r2DR zUi$2^V&`qo|Gi24`d2Spu**kd5En8Lb-AQia}h-m1qD!0WO?#$rT|bBW%8w*cn|RV z#)t&E(F!9NbaC7hK{Of_C)-De#^O}2$|o3#U^43H>2r~rZ3Wx*b%J={6qDMbe4*2ff z8*g5-BIl9qds0#Y9h^n|NGiXvE8eCkVh7Z$6iI zYrEBD=VU&1+chheEEs^&b8;S+WW^CxM3$YCHNWw)8g0rZ(lS=f$l`%OfDIS;;vc^pSZ(K$xr=J3G56EXZSQY#hD8fS|Gw4ozS-Dx{|+ zp;n3HWLdGM8Ug6;b&=^z#v2HeWYiQC<=gu9*LK&>=>eNJ7dT3nrr+Oua)hdLi{>>x zE^9D3F2d$XOuTx`9HF3DU zivx!{h{fWJjClb#|J=nKJvl0tmt@|*v0}-z7*(JCVtrZB-42^MyKB%V7UrkTX}m0h zF7*OT7AJ}-pBV?@xrE6z8RvUneHT>Fn{cxG)u; zKa3|-z?)IVl4eN8izNfbJhcf`!Se~C!n3wwH=C%>mpTA^&_M|T*Ikf;; znMt%P77L)@@ubZFATBF7(j3#jpJd^wUq4Gr%L%T#?kev3`nPFrPSiA2>)zo=!@em1 zIy$;&Y&^=p-0^t;I=i}QZfT{mawQ#oB8&0`%9dplmlZtT5M?FVQ~ys+mX)JTy<$~iI82)#IpN)+fHoIsM|EL)n1N|lK8Wu-X`_l;#=a$eroYHK?l znFc_HBl)_au>hsZa_6bX1uTyB3nDgd_e{aYYE7B(o<^f#ZDj?~NQ8IxzQ?lCa}zgY z{iS4NIC=B+zp~@?ot$^>YMjpWsT|qde1hugI;yMd09aXGidug?v9KGBT4HF}i`N$> zKi5W*C80v)W?Sj%92T?Eldc0EnM#5;TvocFAltgy69|hL8S|93+B{5_j58NH{s7@n z_>2kg>1Uo}X-NgER&QY2ub$y2Klw4ojvVC5D?Wo(t7UL-h?oBM8gKk#HyhShP5bR1 zo_~?=KX@~Hjq2gQn&1#{kggZ(PZ$<8SkmKFIlcUDl8#J|qYPFh<}CXTO3o-fM^n>KAg ztyV3#7I?pI=;-W1tJR`R3a5%96PM%IZB_&U#>QRPZ8o%875)7K!~^wc)Dn^;laZc` zR(mQTN|MasgRQb_BJh*@A9>^7MSv8uzRKkZvSjhxcUMt4FeNz`L{w&T|CE#@)N1t^ zBrk>Warcb(4SEBym^3Zv%Cd|os?h88WM^g2+t*J=XAcM>alt-$Oo~&i@D!UAF(v6m zi$zxjAg(RT%68bzW#OnS&R6Vc%|#1lYA%;+X8bRJ{SA+d;PZL$dZ$xmlgWtPZY4J- zn^-IcKyq?2vK&9<+GZnKtp-655Y%?!@q`bBqp_KJN2|qYvy@kyljjsG%5pa)S@c@t zJjN@EfH}En!N$i=+t~Ye)@rq#S@8))P!K*)C_!>^5-OF5*XzSzFwoxK$*o_wli`t3 z0Lm*i6A4F=V$!66Mq;vIinBzc)AwVuTF`1$`qitP7l{t1Wf6ecq@U;LOGcwLE(n0} zao3ERK&4V)v(4@Skw}E0p<#M@`VxjK3c+A#*02f&LnJ3#IB=+z3pP}dpO*u`D=+;P zwMLCbdzvUKSQ22UMS`Kov}-vW7GiOQEJsqIXx3>90o0ng<5OeISg`xM-R?7H|LGnx zK`0bLuh(I>+ek@G#^>|TS_!(`6O4_yXl_2iy7Skb3K6r3hK8g3`*(hLT18h%>u{g=|kRP=sWkJTvvW$CTVnOjgHa5B>joMrh1gjtj=;zV&MYUx?0E~=`%y55MmT@>{))n{N z_aNovWgI%No5P3p(AwHgW~P&${p3G+{1;Er(0GJMB+B;fZ!$PI%+`k=M52;1)jya~&jp#!Zk_z71wTIf;dNy5n0Y!xctga~MjxXQM z^0F$n@7PIOdk2+kR`R_Ee#FsZEi75Qi1BeZwRMd+GaU5v^x;TP5KD?2q&t#0a;%@+ z94k&o5^k4|lgImq#CTi|p03!;P6VU{#Q*4wB1utX91h2Vyhp3k5|77;#UxZJ6$ZU7 zQSx^8uxwev&7)BXwMspW)g?McVf2&Vk4bUVYBiBalrguD{5%_4tr~+~LsmvI1B0F^ zQ6sJ>ele~n!S`9yoIF4Zekk^roSckWy|C~x8Vop{=}55{Qanx|6sG!c9lq08VIUB| zY)<5(U@(NqlsM|5ktlH~PD8^n78T~8R;zKlJvi-VmMn6RIoZ1u1c7K&n$#v_;*uN` zL2-$Idm=FR@h15`)cJ3Y*+eWR;r05l zSj@b(V<-3B|0A-pG7=%Fyuar#A1pn5fhc-|W)jRW2)M*hDAuD^i-bbax%EHEGw;TI zK0o1bcn1Bo+2#fy!2m~ax!hCyJ`#zb$O_?b2$d?a(fqtzPMmDRJ>kJ%G@w$c$j!~d z7w}`ZS^3ACZ*#$h^DvoBq}grs^$#Y%PtoG@M~O|6pm&)%+DnrkJH~jNM3FZu5lOH*%=6e zz{$2wM1m|`oK8(cH?8d>)HQWeRFH->#e^&;l5`{-ZC4MEcuoTNymQC7TJR8y22rVJ zuNTI~#%E!F(~rN22@iMNu?2ujF8v%MBco(wr1R9apL6rAU&ib8v0_Cj4{!ZGLqo&- zpL@PTUT!uL8tzxM9k$C4#Q)Ymt0`Q-`OYum4$=12eWAXi;=ITfqQ(P}kxbaZj;HJ?RRWHxWU zAVFP?Mqd5f|8U2bZsqYOenTu4}8 zrlx5i6farKMHgR5U3~*9%9ba@%#|zn;X@D8)OeItD_7u1OXE;=Eg4QH&%f{@x88gm z;c%FpZ|!Au>(BV&7j7Uu-9c?#BWo&F@VTo#!#BQpKiA#(6$S@~&P&rK#Je}<&n4ns%BF%2YWHMni8L`C>gXQF?Ha}x)PtY~MM14rBZva= zc$|1#Mv65ke-r)OUhtKb)yStac;Sm-W6;6FmqtOrw1u=-781*8f<9^yZ$FSSXXeYZwiUO^z z{rG(0>Yx1TogYl=3-tC)yjYZHUp?450_8J%10}`INp(meEpIcTD9))0gECn+Osc}N zjL+vMuEa4K^iw*Y$z+_N3eUG{Ya6LpwF1TIAQDUPmg?#{Dl1pg($Y#nRvg15`-w#* zBq@%`sGa)#fy3<-WTnV8P5pnF(Hz}b-Lq|Y%-5Hnl_DQG)<4gY=*Bf%eby~)i^WWG zQW6@?ho2>kPl9c+n6X(?Cp{v;U|r(_XoVr<$=>*)f;5T>r`I8_5f5Hpq-R%k_ittZ zP+QyK?dWp<)^0V@($dF#H$({?!Q<}apS65`KO-Y!rxI>7gc$Ed6k*??c4`}X5-QU0 zsRX^}-4iS+u*uy$uBQ(jYV*$89zRsu@%YHNucxdyU4HBB=D8Ij5hCur1bxH*6aYLE zUdF~7{6NDpD*Bgggo}6<&;PrRg#u}RkA4*Bm zjniUR3&3u(5*7~k@xiRqSCcQkO` zsvNogXx~Ez4)nR^9g+F3U%m58Ysc7IRV#Dl7hXIx6;rdS#p);#_fCAC-cQ~5SR_cq zS3`zFBpjBgYwV%6p_>VB2(K?um>CQj-rawaY`aNr?{dBI)8Fj-?Sf{6Y8txk@pwZ+ z7giR?e|@EPe!WnXh`4t#I#{=$O#X4KKwuOi%^0;IGMy>t^=g)vWKo!(hFUF74Mz+P zdFbvQ!EQAU>~HM)*9FZ80W=;T9?#EB?OVDi?OLxlD4y&bXYnG(yg5N7594w7fhrZP z&WJL3et&RGZt6h(5HmvE-CbDpqof!Hu$a`eca750I!v0~LT|r|MFnYz9AMVt4@7wG zkMD8Wh9%JhHCmY$QIwYEHW<$Ki~f_5~&|KJ2A#hJ9W50jmlib1czV9*i> zM0o6%ySVwvQn{z!we5Rb-?(?){hle_BvsoRX-V13sw(o9)--er1H-;~!{Jmv5Hz9> zmE6a~_;G^%5yC+qv1piZL_()GOfxzd3=;5-5)KRz@U|239K|5^px5}&s1Yws zktCVYk}T3}W{gHHeFGB-01R5jTz($kwws%;ES0Y9IId_fOPR8*k8 z;iAiaUA{c)w*7V8;^0`2JMY*qrOKY|l4S*dP(o3}#1OSCVbF^+Cc8eknvV68?nuI9 z)Y9GOVp(wpK3^D%MNe&G4?EsyHrE-6ay-&fQ9wXIL=e*A2%sXE(D z9IWd;rd6}UXw(&7vVL)a2+EVszAHpy5{nAbK9ql%($!c+qv<&dhzE*nrT%1#6XLD7N?DI$ZPIinw{bu!v zUsPB3yFSYPKQ@1@s3=U@T$%f|+|1Jw{je82v*YR01q1u(7%5#(bz;dB6WoVvG&0+Pg_mx(4P7e ey#t@*{{BDaJT*%o#VE@F0000wC;&gPe z$v6=s1pp{1l;xy#JTs58ynJHOOI;k&64Cxb0fH-h*2(;uLJl9s5*I}l;MP#PdLJ>sfV2%i;50bK6MWi_#UfR9wS25*H8&)BB zb-Z;PS12md+!=dd*M;^Z==8VG%~VG8LH@Y5}X z1LT-*b+jyGyDXh0G9xmPe9L4pyb+?y;c+u$+j9NL$${%u;>7UtwDeoGjfp|@qpw4g zH*A=URd)MS++X)|yxph}E>O5^$V1jL9CMKaZ?VpOe%5IlEfEAB1uO{EI$aNRhho(< z$g^^Fnj?zF2QUfG>z;oGQs87F)!Lbgi$M`g->v-=@?u#{YikG+>2jI+f@g)ZUu&jy z_@{f>kTKc)*zusr64AEp1=)%IBSThQT&!CEBT! zH}lJ?F&zCZaS}Jt2i+*=eV-17Z$b#w$Z~uNe>KJ*jB@E5+1iJZ*Qc&X| z+VB@5UQa^^5(ZJc=Enqq$>S+?1%P_LvFJcgeM+pVg}ea5ADm>1-!@~lQMz$9PR81-XC0!lcS zN~3r{#pY@3$P0WB9N(0?*r2UYz(qxj!){o+AKW2+-Lsk|Lbkd`WGjbQs z0$#a-xxN$6o_K(J^q2Dbz_h<`l~clJJ387P=d3u@i>L+w00H{G!TH0i`I#W52T_*{ zV6z+5k8#`Md_AJ!EFn>XiQidLNNpVxC<<{AE@)1Qvb@W1=<)4}$MYhdheLIPSJfpY zY^%E*3A2OCp`qeW&3uJ;_~%p3%O1UYb%|+_4<)q@i+{S2UWyjyY{0f2xw=ISUoP?* z;o&3gE8B6U-iI0M0idpz(!8s3xBWI~4x+k_E+2ti*9e*h2_FA2Kw}i7m4{C!81ugR zvBC<*>8wcm1pVIdynT}A)!~@o%Petb6w1~)1PA?N`s#7*?K7Y5YHZZ9wNUeLB?Joi zw$(%-@a6W>pK76{;6$xNc@;R@TyqB{5srm-@FQ%;XZ3enUfrNrz@CzN$DRAl%18I` z=~5PHoB9L-`4vGBsZ#W}K5y$uGysNy?@=H+Yzr8BnEz0;y7p{!Gn-54G{`He7N4EQ zuH%h(cSm)V3*1G#Gw?jbt}YI$$HcDh_~MHRZW4ua0!&$|u2KfI6-*W^M)-YB)lrdJ z^_)&>=1e@dzW;~U?)|g;dur*hMpCrNV5M-7jCoXf8Cli3?PRT;Li){<0dm?4mbWo_ zP)cw44KA7ldeIu;!Or8J*B(m3vukU%4N&CZKPz~`VFWjH^@vp;^&B{{X zBPBuDw?Pd z-i3k5j_rPlATZWpFW6PI?q;A*(LMNha0I4=8}tn!1nu9WiKK3owO!T!w*|?}xQDx| z7*Ej)raYmqYXX`;Ubpabr&btGCco>&!*3&EoXcIh-E z|IA>((GC-T;D3u=aC~p~H|tAMoh1xDesj|);@!R*(zJ{{6J)j}KErvd1z;zpi9u&^ zNZ$WpfKY zT&i&1qY=q$c9!>#=P-52**yt4`iQ8ofMV{i&l(Iza4I+F5tED^wWS{*Ffqcitfi2o zINNDVaMO+WHO4={uszGgKiX!nO_WncenXIHuBlX}86C%zUBRL-x;G&CDFURE01WFl zoY{5?ulydX?6Y)dxH0v;qiNE%ahX5eMK9m~;mN?!*k>c!p2ApesPpg%i4%jVJOx;4 z1+>aTZwMVQXRfG*mR@55d~ZE&Jbosxvyl@Z*&-zdIUx+-s}$VA#Z#@O9_$eE(-pl)GxVQu4y=;ia~kZJCUr^~p6g$@-QY%lCoS0L)K_ zCe<_NHSC=QL{eH2nRNdhgt^~2x*|^Q5aWxI+rEBi!aC~;vUe$i>m+%T&AV46Fygb1 z2SY;19E*ia@m1dZb21PKxN*hvcSAfR#t+lYN#&v0Rmvg+ZDM~Y17R+sG;z{eb*)6S z1?0Pn%=V5RMY*-Ol5jK1jaqIx4Ov0EOqt?IrK2wj&}T`+bU4ocU(HqyilzV{1zw>5HB3DHa_E5Q)p4UAM> z2njG?!ryG)6S1Av%K?r@Ca3nG{-Cl=8h4O;R+Zqr+$lj`vBIdIEX>F$n2 zT7h5Yr@ru&SIhg?x|{a4UZ>(M3kCSvS-6us%H7K(C}nDv9!3|tM04_Xr)R|wNe9PH z28V^rjISn;nQUJepr)AU2L2!wAlef4E?Uew3>4u!1r)y95~i#;wR}~-IOAMD z5$no2Lob=01i8g6HHx`R&Agb?MmJZLL2B|o@v*q3?wZN_Ql}bT03-8y1P>!0c(-2c z;nV!M(}k*;{J8;Km+02#NG@eU1DWzb*bF2{_c($UZ6yx!<*06-5=dN~;zp$oRi-(4clsvM70?F$2*CrPyrCneDOjSRnP{<#Cx5v^gXk63K>LExsdN$5m4N_dRNFy))MqGhe_pi3&>;A!Vn{2a6 zfWD;{P;4Gz+bm9Sx_T~crm=9h#D^r?*LDstx6EC7_px)9So8(+D6Xnj+zieTrgH+Z z)#kqL&NvtjWat5A3qNh7soT`97{hqkLrP#E-vAqf#eO;nn#TUlz@*-ZF{%Fyp4X{jnMe&m(m%f&DE18H$%hsnvtoS8wKQ(->77H-GX?PZ9U7Fnv=I6Mn4AM8QH2s3aUFBilsHmH^ z;`J!XhGg*%aj;7C<-i>!oN>j09M}C>@(@j(bME8(UOZf^Xfj5(jqKGt?UKymx_ zdHZpc%)~Cqt$3DPW^P)1L_4pHJf5Q4(7;~;o@zBS6zAdo-fEfnno<`SbTX$@Ptv2_gV0pD5-2Tgc^Bz;29Gs5C4 zW!Dpwb5zh(tA_~54!-ABAaAlBA?>xmlAUgzA+SJU@*niXIPaUn89eK;7?W@tdpc@0 z8=u_wTXet?8Czl9k8p5%c-Iza++UEwlsFJ9NlJceJ0Ek~Q^1+Ka-E1-&IfUOe};dz ze588GSe}25ML^ffz$z$cU2vuy;C~YuP}a1O>MCG#WffX#mt_-gbz!{jg~Bisxf+%# z(SDW5-9VP$`7&)=g>W~EG~2RMg$i4!PG|I9Q=xWh@Y03le)YY zv10Rb(crZ);0M1cM+$KDPsN!tO1SAoDNl@(TQUcFZRl$Wc^>cf`t7t<`%h~pT*<}> zCiFh9ryLyoV2e1El_Q266yz1SiJhSp+wd}XCoHOcnWe(FKu)=lDW1cl2qTcTF-U1A z{YIN#vc&6k(L+Na_$4V_XSQ5*BTr5I^Xa!Kn(f@_J6v2Hfg-1XqNkRj&!_C=Dy+{g zHhnE7e*W87(%n|crt0-Am zXCEfO!Qg?!XJ8H`X4@OB8QQ@>dLm`SM0|qYeC*nuE@lJ{9&BM|eTItZC=Q%ulHW9~ zcUwuqQn=7uwiPA2)%CSNkb?)F-RhAP{HdS>9*vt*?crxP$MuyqO;+AcpY!ks$BHNI zx4aSt)rS}KGCA}nsKU%cRrLebuG-R15Lkkpz&kQ~%?{VB@Vmw1UC9jM)yUA-O~fh5 zm_|okHhavm#Pu z{!;jQ)}i{?5Jj?9 zak;Bvl$Me_1%uiqNeaUGoVU{LKnmXcpn|mnt74lX)?@jI2D^(n%HJ-vi~MsA_qQRj zYhMmc$v-~WC64GDPX!mu+nDH5*!ZWdO|*ygyEvu`+5r`;PpGj@>exMQz*`lSB9kf+ zTy1jlII(=X$cq~cc?&}de=vo9?>77YKJUFRuo-P1*K+M(!B(m$Hfr@4th2H+XnGeJ z{sraoFBYID;cH^-1(A-`xX%R>`o?m110eLKx8%^Ma8Rb)ZVLqh@># z^OEtIWBEkK6hnz&Pbl6l8)&J2Z^y}@VV04n!(wC|`P|d6aaR{CrU;8s*(JiPq^UtH z`>Q=viuT~R^Gdv}5xr>1k3&epj<*kX!oj~728qn~#vg?V^Bqv=|U<46Fc%kM2&7}Y2XahI5gUUQXM>( z&CrZDy20%TPV@{Cd-)1L)iPl*PW48{(b}pC*qH0mHqW)UX+Wn~zXsNzTvK_tpD|42 zVWRr|LsqUj%Y)l7u2n!(r;w%r+RuoO9V3jVhzvxW6igAa<4yh8x_Vn){iVw7)n~TEnTi*Rb0O`q*r=G<0)Tpt2Ly>ex`tT4c_V_tn%*DK0a4yC}zwhN8lDe z;iZlf(tEQSy7P8Rc=%CFF{7(B@)q#NYG);;mwjBzv?x$DYn~F{Snx-wbPYStO7R3W zEt+35MEZv87{ccJZW7r6FV_|f{KCkpsP`G;;IP)NAlPnkxqbEw#;ei-`Jk<%2-#lw zu`^Ikgl*BdEQmmy|M!g->Kpdk%DCq-U)V%jby|ekL?;1<-qn2!Pc-3h;-9&m$wB)n zRH#Ng*IR&6RW)e=xFAD)>R9+M5o4tNxR48v{TSI|SqvJoRFa4FRs?g>sOK)3)bO-k^gdca4}nO3 zDIq%<9A?&(67|tB=r#yq9nKmbr=<|157JIJ41!}_kVn4Wteoak5@rX1Vg(pguNE`c z$@qrUlq}x{!-$$yZ;OlcOXx?zAV2e&9(yIRJ8aW7zLte;ms`D=ew6v*j~>rr{T6_f zy`-=LDnw@QcM85iw~kFF~}Ko@7$;ltkN?`897- z^TAE3zl)tld$@YmFcAo&_d~x6v}(DQzdcRTOB(yi;}RSC?V?!6XB>uq-zS5cUg!`J zKvmK>(>WXUj1uWn&N%XW77HRmM`1YEtQeIJYSKukgBHDaoI3f3S=B0t>s2b~8E431h8gB4Se8;zcb z@K^U|atn#QIfM4TaZ1Nt`j2(vA`!c|C7lxMp9?V`+K-L>YkQ13HPw!M5dL?L_y6y@ zS6!jo^Q5Nj2>MO-wlT*T?nr{Y|q6(hWeo1B<2-8VtBk@dVGGP18xDog&U?h&;uos_)cEG8hH| z>Nl2ss;r65=Aq%Vyg(q8LvBT#6v~R#>AC0JRtF1hmd*!#BR`fE^_2%#H##hQp1@uw zH?*Iut&4jO-HW6+C=2V$$I}5*QF6I$CX_F>1-a|alJA+|`*@Rx@7rtZp%(tTOVDxD zdO+&Kq}F*ms{JHaSrLk-fQtC(dD1fK6`s&4X(OvrJM8Jg&#k7i;l+8#0}<$+1CfAM zx1Ff2ohTfL^i(rx1$8Ot!U8_e!FAmIq=eCQ+;!>PbKa^MAf0u;1cyD6e|du%Ij~L3 zn`QC!A{Aoq2Pa%+rA)W0*JQ!Xnu~LmdkSV+!@)0c?2aCRh;Xg_L(PQ{ zPd|_wSB+mz#c59f2;}}`MHtc3I&L0IBmG2}B7>*^#XS`XKbY_zBTY9rw6f4fB80yv zmOh!VO!=u5{f-y_;HOQFi)5>)$s;kN-K;Gi6?< zg};Hk{Dz=N7@+mj#zPMWgd@P+1!KUvS#XT}7H`}=_A`=iJh+{P02AnL7g8fh&Lm39 zAa|vTCDT9Yhl-7n=qUfoR}VhuPbLH6T0M zYYx>OcUf31HW$k4mY+>SIG|=7SGb-?qV}Ue1f&By1Ws)2umG&_u~bGWX>JPST7dKw z&besEiKR)mQruJpVKJmd=la&OyRs8L{lqDk5;mD;@q~z1X94hc%k)59Q>3pBh6VTB zG0f1x^CFJ=L`$YH9bqml&q^{K2b*sDNXT@F`ki;wcGnIzivkfwQ4tXj3%68sMSl_G z2-t*BPA_-^4l>LsqXmsx-<`d2qU1($R6ME0yau5c6(HQ{?k%09>X?+R^+TFzW$Hfb zxYJc>%4wZ>+(F6KUjvUxv0Nc+M5pj)={Sxt5%lTX>Y_X9JQL6iv@&3hl?nI#e$I3w zX%1y3C+ax4;~x#`0;npa`ERx_EclNq8YOO`gkr17=H5PAW!ODV$=-h7zBwR>9B>hc z_CX0{Qm$#LSYR6 literal 0 HcmV?d00001 diff --git a/account_banking_sepa_direct_debit/static/src/img/icon.png b/account_banking_sepa_direct_debit/static/src/img/icon.png deleted file mode 100644 index 6d1d923b6506b33ca0825af17ed0ae36c9bd0dc6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6892 zcmVPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*$` z7B3e|!Eq@702*vbL_t(|+RdAHcwFVR?tgpFo<5^8Ga8M0v1A#^k}b=Yja)D`;hH!h zp@cw^OL9)Yq+CcN<6E5%AqMj|;G$)Txm zv~I!^I(n+U|IaV%J#*-PEC8EIvy(P$%HNgdO88Wo)4Jx^$zJiqnE@oNL}_sbt5#-` zn{6jC!MNykqR|+A0~0j24O4rvo6#{JPP>^cm3fMya-x68^T%U{J0Cw#*ERV+0)Xw? z^PE*Hm)%;JXZu1R7){^3zgZMD8a}eEn2qa~A&T!EDNduL$l2G| z?|I^Ib>}0m9&R7`rvY&Lm$vLGD@wn^;}2!--hWoi&vSCawd=523?E3mswy0=Zs#vA zoun|&&brdfuKK2dAOG~%haUe>0oZjz#fp-mjE6JR61P43w|dd#O5!uut;cB4@?ovo zQ$0NQ{Bb_Au|UyC!v5;ou3Mk^+v&3(H~?R}sp@l8Yx3{!=oxn%sq5p*|9S~&uEY<; z=<3=oDl2klUdLhz&puy6PtO=1-C8(wx_RhpKY8?x=ibRRHSgrhKe+w!`!|&5-t)J8 zO$jE8iLc(g^#gPF`Bo?##g=Sl+#MhkiefhDDJ#h!H^;$m|5#(WxIF8s%JMAJKMuF= zdtU*ls6e{y3s*c@R+N6rZ(lg6`Q*peu(_)6JsINC$> zNhT&HgP;mn%z8%0{G_=O*>rIsFYKuov(u8Qwr?!RaR*!X3=X2a=MdPs73ou#eexMs ziuLN>zgRDR`R1)SY?gOqY+y`e0MUY=F=MeNqS0tTRZ&$1k7p7^_M^o7sPY7A z%#FnmMHJ)L@cF~+ef=z18A+^NoilUoqcxpuSerNV`oEt!g59jeYSI7cg#$0%aNq#) zdjjCc-`(+KNs;TuXZ}_%e&yy%m+bP9D8z(xM13|%wroUEL`4NuR7IKon;8I9Rh@pR z#NPw_zA?gqZgj#3MtzKl$sk&-hSv5GBGDL?YjO!rg)y7-^z^yO&a?sWm)&((w4f^L z2#y}Y&K93A-N&ee=ehSBM@H+}zGm)-xa za=>@Ly7l^XtFrFfeV|2i-L;k2lFS#}@Kn@}*>NdJjv^$jVLGPO_yIn>dVBi_27_2E z=U-1<;P1GHXfzTAlbyCsFDWSw%=$1Ula8J~H^=L`iOMp|3sNx|bcDk)k%-Ki)j7O= zq+KXpmQq=iXKy-G)7`ja57>1>#fplOjGxvu4oaJ<3Q0{#Sk!PiCJ>d%NX^}e+2WXo zz^L^0_HpRYVVav;@cDf2$|EF6OHxWX<5Rf=L-7bU8?@Mx%=Gk45Q`}cjd+>#1OfQp z*KgopZMRf*QTl^7UbSlZk^v~aDC=QaQJoQ0q~xNE#f?`abV=JtNn0}~iw6P$nwy(B z@cJ8^ZEhhH3Zbeh$;rv@=>*BiDZ&?7hR%@4%Hj-s{s?uadpTCyg(Qh6(@rFc0-wIR zlDej$^tG#V9$r!ieCNxT?pj-xdFz`ed&TRnUdLi5Q&iSrw0#6?Vg{ht1qR|*5V_pC@ZYZRobyQqkoPNjFisiFnR675~=CXpXI_;Lsu0fxepPRCv z@rnZarnWu>U9ir4EU5{b~()`rL9o%7qI`kM zNfN56@Vlq~fXCxy-)n#2uP^Qa;MLdu!6jR&`0Qt{QhlQIW@n4;oLanAmJf|bXA^(0MA&0KTMm3;Xt-=wiIUei=U3aaCS0QF(oH@4m@s#B4U9 zo|hB;_=l%BR$as1egELb&wq(MFFnVmEjxJW#b-%OOh8o>+S)qs`vW}rn}=|vrlP6} zimLGYXJ6okPhZ8vq=(*qHxZ=(gE)#t6zCtEM3!TetVl_Vs0p-u~@s;UrEVmRzJ1Odjz-8k%abUF?F{R6}TC(%kWvaFDn znutz!E+NXY!ttXmihDBfz#aF!@@)|y$zrH-dx9)4T=?#)8Ykui*OG|JeD0r=lz=2j z7m&PE#>Xe-yl*rZiALpFNmo%6L{WpmU?4Lijo!X~Iy!qm5Qzzn>0?ryVTI?|q=-4e zAX=^ZDgbePSw^PQVJQnm6mhX)M`tNmGE;NA-E-rA3G8opWCWkji`P4wDx1wF91a`V zS(!wmQ2-JX6H%1dIoGzB(CM@Yf`A}7h{fVQ6pBRW<{h05m)*L$;-VavSW%X}Ex~Hg znHDi#RRt`G1xq$QcHYL`y0bQ$eZk)}Hl1b16;~6Q3Zo)$@utgXeV&+@fJP(Y_4+Ux zjWeM#JTe+5N$p*PLlNYtJZ+$fsA8PqERo3U{n%|*bUKY;?Hbo*qSIwv24FE87CHJ7 z(dtY~0$_aHJ*OtnXf)XE^Ls!z9A?j+S1B)F6|WFgm1BqZ&Kp+2;1r38Rzl%0$;nCN z=48bUmNZCO39artQC6@{eZg~GT}Q+ZU+pnWAtON)Q^JnnBYnJ}4*^LjvW@kP|0sAJ3KDxz|XhBJ*6m#m<^p^>XTu@j@w z$jQ3XJo?B3yuAB4{_^}&05qIwV$;UT8RG$JYU;?%%{rF?G$IjMo#`LUsb>TMK@v@( zMkAW^+6#1agr&6)CfxJI|NP-|*=1Y#Kev99y1IHcZ>~Zk3Y=+dV&@f?Q(Iey#bV** zSN5@b)k?m4+qb!5=XLBqaEMd&4eYpl8@GM^4t8GoS@yiLm!6(JoT(|?e9P?&3=E%_ z2Q-X~`Z#r_pA+@H3=VtFM*xi=ScJ##xn?js%jR@tITs}OCg-)7ttlvqf*>$26AXt# z?B9QYxHqY&N?gb&E?z;JEA=g2x1cIKF)>LX5I`e|bai$!G(1Yhnle;HrLplW7Zn%L z($b2-U?3|q9Tk-mC+b;KUdqVG810>1tgkGmq2VkA%W}{g^mLwmjc{m+43Ac~dv;9M2ET#m{S8V1d0`d~#e{@cfq^b%|r*lc(qtok%#bQLGG8&Br zqap6zo!vc@l*ARJNJK``NV8a7ykiu?F#Y|g97B>M!r=&G6Fzct?C5k7MuV1&v_u95 zJu{+4OjZ42OjUz#v8DxifE;{R>@P7f5lLEF_?V1FT&`5)XcRdXBQO=B`uGWa=dr>- zAb`aZ&qu-F6lQb$sEdRn#N-%tb!S+XpM@kzOiXxiIV>z+<|KW(cPR)0k%&C4O(?`< zB`AXG7J-S$z{1Cy?0Z+|zs+V_GJj}nYUavMT#q1%$k7-sr-RCMYi8v0uC5+_^1vgQ zEoP!o8L!um)oNkqm7gUXj*^j)77t1Ftv!c$d+Ff|L@*e&(_n@`z%5QqMSCPkWNIq1 zu>L1|7Tvth=O+{j&7r?``@#T(!(oPoMsT|)h(@CvJb0Lm8#kaTDxuI68clqoxjET1 zx3+Qc&7%|*6{68-$j;8d7x3e-+t~f$(*%M+%oZ~#4m*AQgK_Yabol%cqSGWO7E>7- z@sOPv=OmGktONql9w`u(I{>1Qh2uOD7+4g5(b183>+8Ho5;YoZHe0;Bov+d9@gd7m zt@N73>ET3g#GDK4V6whoueNq%lNu~>|; zF*hx(?L76{=XmgEchhv%PitEz*)Ek8g{jokbz`?#@OXn1U77kTL6$7t{9WYwxt5)!Ta?&&}9 zgCE|@8wU?_#g31#e0d=a4NWvOH1YfkyUEVVL?cOjao0CUNKD|FXJ4SRtB1S(<337? zizqC}Lm*D4FJ6~VYKoP0<+)^}B~5FIqgYH@dWR?5#QM_%`#rv?NN6g$;87q5Dt=Gf zyq^W9rsj?R#nNg|PcH_8o}d5xF>b!;3%FdVtSl);r_=GXpZ$`?re-3M2(RrufZ1%~ zc+Cmyb{luy^=(c!G!YI**t_?2%2$`NEI)@!w{GOlJHEl)Km2a|R0w*J!ya_g%JAC< zv%;Y;et#r%;^fGF@y(OH14CoJx>UQ7p5F0=!@xg301c-b=I!hIyuKNg=k2*65{c)V z*4B0k3zyN*(8#)VYlz7TjZMw`_4%i1s6WE-WBUO(c<3nk`MG!|y%ZMYV>IfiJJrCl z{9FbGhdEwTM_z6=k#GdPPDfg*NKs)b&XoBnd}u1n@VKw8wyAqa1PJ(|hjm(sfdTiz zWH2^Dz&mta40||steVNm`KQ&Q(I}_t>*s*r_4?3HQ`n6gH}D_d{}GK%&8%Bjfuh8? z>XSRU=DN?bvg~4d`}zTRzgwq zOec)so(wWN<|7oEEr^Vb`w>-D@dQGLW;DT1?I_vw`RglRZ||94%Oxe^d>x@lPmobh zB8J3rCMG5cO$CY5LiIdN@O-uxXM&QXA;n?GY&K&uo3PuH85!tQ0pBo**$Cx{XYSN&d~BYBs;{(&?ibfX24bo{j5rcV?$2rFZmB3iAy;b##w2;U2~pG=Lz1 zsv=1ef+!G+#fZfeWla-l)q>am0q99^4 z>abYM)4V~QAuZ?k2Hz4pe11RO-MtJBk5E{UKl44UR?E~>5Tn?M$sjU1?x($T42Rt^ zlM7T8T3Y(?`9jqXJod&9X7vSn`zHTfkmFc8*fIjE=k^AQi(J#{kV;Cp1|_)^>P1x+eb1VKdRx)W>2sM4dW~XQGpT*7EuNjEsz(OSq9K#8@w)2#1cf zQ(M;qz~Jz?1byIOGt2YrN_UU@H^+{(dFO49AFJ(ncx2qyQ&yC!?EOdM!U~ZH;fdD? z`iB200C*<7jE%dei#i!Oa1xh8k03yDk_oGIw!j+*Mi?EQBovmrUOCqEiv{NcUOw11 zcB*mk?xX|*UXPz~_re8|MvUSgc@^JzN8^XRVsZpI*ojdW!erK?s*viil46gK@vU4D zpKf_^PaPMp$x==>^xb{rNS}Mr5t*Mn_Qn$}9bmo*#f(sQcNbQ}C`rZvtY(S!u2Gs=hDmW)>Fsy3EH5RV z11tvofiO?~{!OmfvOIF6rfb))eqViX$p8QxuIWCrJlB!1wk&Hyd*`U&3r5LIPriUR zOc4pRpxbi^z^$Q{r7ubxqZ?7UMSvVP1`Fe37I8T6*((v>bix2Vc(+R zaIPN+TG59_>0@&IEJ6PWp`edwBt$4Iqc<35866A;3HU|{1%?QC+nMq-U=({WXnklU z6`w!M;p%o|S)sHzgA}_3lSxP4z+@Z%qmD7RpNAja&-EWGRl55op8x9`FWuDDwfMyN zk{+0-s6hJEWmo)a^~#JJ51;532gick@-JIvRM~gB6h*}!lu=bNt|TckMuRwKvg_@u z{!Blq&IHUR9o>CyN{Z6(`9fH&25L|Bu;-OieE#YRrLk@3iC2!i{N)QxiZ96n00sw9 z_P*Kn*P>+(8XJpR<1!iu7_clE%8APDGn8Vq_7y-q-{*UStuEh@c_`N_|9 z%!HH0tVfbWo_h8O1HGeMvtwoC#F>Hn?!5o+U%$|ue@6hkwf=FqeP3!yLQ7tzZPUeT zvdvFDS1q)(k5F2iu_OcD>vFpTq&O^SG$IzWp1RY0JowAKtS`$@iVITv57l&k>7GaS zKm1Ovsd=ZHIC`S{j80;Y$)qp3d~;!*2GRyK(-j~PZ7FsC|%XG73jE5iF zk9*9^jaQc|V-tZ_4;TO1sk|iP-%{+B+@mMD#Y45-tXZAI z&dWJSP9G?v0 z4@L=vqR5JZ$*9AqldxEHWTqyNnU&-T=)lS5-hmHtfBzqpiy;_LBaChU0000 Date: Tue, 23 Sep 2014 08:55:22 +0200 Subject: [PATCH 04/21] [FIX] account_banking_payment_export: Manual payment wizard --- .../wizard/bank_payment_manual.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/account_banking_payment_export/wizard/bank_payment_manual.py b/account_banking_payment_export/wizard/bank_payment_manual.py index dd7beee10..d6ac06ec5 100644 --- a/account_banking_payment_export/wizard/bank_payment_manual.py +++ b/account_banking_payment_export/wizard/bank_payment_manual.py @@ -27,28 +27,17 @@ bank transfers. """ -from openerp import models, fields, api -from openerp import netsvc +from openerp import models, api, netsvc class PaymentManual(models.TransientModel): _name = 'payment.manual' _description = 'Send payment order(s) manually' - payment_order_ids = fields.Many2many( - comodel_name='payment.order', relation='wiz_manual_payorders_rel', - column1='wizard_id', column2='payment_order_id', - string='Payment orders', readonly=True), - - def create(self, vals): - payment_order_ids = self.env.context.get('active_ids', []) - vals['payment_order_ids'] = [[6, 0, payment_order_ids]] - return super(PaymentManual, self).create(vals) - - @api.one + @api.multi def button_ok(self): wf_service = netsvc.LocalService('workflow') - for order_id in self.payment_order_ids: - wf_service.trg_validate(self.env.uid, 'payment.order', order_id.id, + for order_id in self.env.context.get('active_ids', []): + wf_service.trg_validate(self.env.uid, 'payment.order', order_id, 'done', self.env.cr) return {'type': 'ir.actions.act_window_close'} From 34241ce1e6a3ccec7d606fc73cc8bcd5046a08f7 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 23 Sep 2014 09:24:14 +0200 Subject: [PATCH 05/21] [FIX] account_payment_sale: Check if payment mode is set in the propagation --- account_payment_sale/models/sale_order.py | 7 ++++--- account_payment_sale/models/stock_picking.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/account_payment_sale/models/sale_order.py b/account_payment_sale/models/sale_order.py index cd93e56d7..fa30ccf2d 100644 --- a/account_payment_sale/models/sale_order.py +++ b/account_payment_sale/models/sale_order.py @@ -44,7 +44,8 @@ class SaleOrder(models.Model): def _prepare_invoice(self, order, lines): """Copy bank partner from sale order to invoice""" vals = super(SaleOrder, self)._prepare_invoice(order, lines) - vals['payment_mode_id'] = order.payment_mode_id.id, - vals['partner_bank_id'] = (order.payment_mode_id and - order.payment_mode_id.bank_id.id) + if order.payment_mode_id: + vals['payment_mode_id'] = order.payment_mode_id.id, + vals['partner_bank_id'] = (order.payment_mode_id and + order.payment_mode_id.bank_id.id) return vals diff --git a/account_payment_sale/models/stock_picking.py b/account_payment_sale/models/stock_picking.py index f9d48f688..320952ac5 100644 --- a/account_payment_sale/models/stock_picking.py +++ b/account_payment_sale/models/stock_picking.py @@ -33,7 +33,7 @@ class StockPicking(models.Model): sale_order_obj = self.env['sale.order'] sale_order = sale_order_obj.search( [('picking_ids', 'in', picking.id)], limit=1) - if sale_order: + if sale_order and sale_order.payment_mode_id: vals['partner_bank_id'] = sale_order.payment_mode_id.bank_id.id vals['payment_mode_id'] = sale_order.payment_mode_id.id return super(StockPicking, self)._create_invoice_from_picking(picking, From b1b07a417c72504086c41346cbb700d213307a36 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 7 Oct 2014 00:09:26 +0200 Subject: [PATCH 06/21] Clean files --- .../banking_export_pain.py | 439 ----------------- account_banking_pain_base/company.py | 82 ---- account_banking_pain_base/company_view.xml | 24 - account_banking_pain_base/payment_line.py | 52 --- .../payment_line_view.xml | 41 -- account_banking_pain_base/payment_mode.py | 39 -- .../payment_mode_view.xml | 22 - .../account_banking_sepa.py | 90 ---- .../account_banking_sepa_view.xml | 77 --- .../sepa_credit_transfer_demo.xml | 15 - .../account_banking_sdd.py | 440 ------------------ .../account_banking_sdd_view.xml | 77 --- .../account_invoice_view.xml | 22 - .../account_payment_view.xml | 26 -- account_banking_sepa_direct_debit/company.py | 90 ---- .../company_view.xml | 23 - .../mandate_expire_cron.xml | 26 -- .../res_partner_bank_view.xml | 48 -- .../sdd_mandate_view.xml | 152 ------ .../sepa_direct_debit_demo.xml | 27 -- account_payment_partner/__openerp__.py | 59 +++ .../models/account_invoice.py | 5 +- account_payment_purchase/model/__init__.py | 24 - account_payment_purchase/model/purchase.py | 82 ---- account_payment_purchase/model/stock.py | 42 -- account_payment_sale/models/sale_order.py | 3 +- 26 files changed, 64 insertions(+), 1963 deletions(-) delete mode 100644 account_banking_pain_base/banking_export_pain.py delete mode 100644 account_banking_pain_base/company.py delete mode 100644 account_banking_pain_base/company_view.xml delete mode 100644 account_banking_pain_base/payment_line.py delete mode 100644 account_banking_pain_base/payment_line_view.xml delete mode 100644 account_banking_pain_base/payment_mode.py delete mode 100644 account_banking_pain_base/payment_mode_view.xml delete mode 100644 account_banking_sepa_credit_transfer/account_banking_sepa.py delete mode 100644 account_banking_sepa_credit_transfer/account_banking_sepa_view.xml delete mode 100644 account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml delete mode 100644 account_banking_sepa_direct_debit/account_banking_sdd.py delete mode 100644 account_banking_sepa_direct_debit/account_banking_sdd_view.xml delete mode 100644 account_banking_sepa_direct_debit/account_invoice_view.xml delete mode 100644 account_banking_sepa_direct_debit/account_payment_view.xml delete mode 100644 account_banking_sepa_direct_debit/company.py delete mode 100644 account_banking_sepa_direct_debit/company_view.xml delete mode 100644 account_banking_sepa_direct_debit/mandate_expire_cron.xml delete mode 100644 account_banking_sepa_direct_debit/res_partner_bank_view.xml delete mode 100644 account_banking_sepa_direct_debit/sdd_mandate_view.xml delete mode 100644 account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml delete mode 100644 account_payment_purchase/model/__init__.py delete mode 100644 account_payment_purchase/model/purchase.py delete mode 100644 account_payment_purchase/model/stock.py diff --git a/account_banking_pain_base/banking_export_pain.py b/account_banking_pain_base/banking_export_pain.py deleted file mode 100644 index 279dc5f5a..000000000 --- a/account_banking_pain_base/banking_export_pain.py +++ /dev/null @@ -1,439 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm -from openerp.tools.translate import _ -from openerp.tools.safe_eval import safe_eval -from datetime import datetime -from unidecode import unidecode -from lxml import etree -from openerp import tools -import logging -import base64 - -logger = logging.getLogger(__name__) - - -class banking_export_pain(orm.AbstractModel): - _name = 'banking.export.pain' - - def _validate_iban(self, cr, uid, iban, context=None): - '''if IBAN is valid, returns IBAN - if IBAN is NOT valid, raises an error message''' - partner_bank_obj = self.pool.get('res.partner.bank') - if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context): - return iban.replace(' ', '') - else: - raise orm.except_orm( - _('Error:'), _("This IBAN is not valid : %s") % iban) - - def _prepare_field( - self, cr, uid, field_name, field_value, eval_ctx, max_size=0, - gen_args=None, context=None): - '''This function is designed to be inherited !''' - if gen_args is None: - gen_args = {} - assert isinstance(eval_ctx, dict), 'eval_ctx must contain a dict' - try: - value = safe_eval(field_value, eval_ctx) - # SEPA uses XML ; XML = UTF-8 ; UTF-8 = support for all characters - # But we are dealing with banks... - # and many banks don't want non-ASCCI characters ! - # cf section 1.4 "Character set" of the SEPA Credit Transfer - # Scheme Customer-to-bank guidelines - if gen_args.get('convert_to_ascii'): - value = unidecode(value) - unallowed_ascii_chars = [ - '"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@', - '[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!'] - for unallowed_ascii_char in unallowed_ascii_chars: - value = value.replace(unallowed_ascii_char, '-') - except: - line = eval_ctx.get('line') - if line: - raise orm.except_orm( - _('Error:'), - _("Cannot compute the '%s' of the Payment Line with " - "reference '%s'.") - % (field_name, line.name)) - else: - raise orm.except_orm( - _('Error:'), - _("Cannot compute the '%s'.") % field_name) - if not isinstance(value, (str, unicode)): - raise orm.except_orm( - _('Field type error:'), - _("The type of the field '%s' is %s. It should be a string " - "or unicode.") - % (field_name, type(value))) - if not value: - raise orm.except_orm( - _('Error:'), - _("The '%s' is empty or 0. It should have a non-null value.") - % field_name) - if max_size and len(value) > max_size: - value = value[0:max_size] - return value - - def _prepare_export_sepa( - self, cr, uid, total_amount, transactions_count, xml_string, - gen_args, context=None): - return { - 'batch_booking': gen_args['sepa_export'].batch_booking, - 'charge_bearer': gen_args['sepa_export'].charge_bearer, - 'total_amount': total_amount, - 'nb_transactions': transactions_count, - 'file': base64.encodestring(xml_string), - 'payment_order_ids': [( - 6, 0, [x.id for x in gen_args['sepa_export'].payment_order_ids] - )], - } - - def _validate_xml(self, cr, uid, xml_string, gen_args, context=None): - xsd_etree_obj = etree.parse( - tools.file_open(gen_args['pain_xsd_file'])) - official_pain_schema = etree.XMLSchema(xsd_etree_obj) - - try: - root_to_validate = etree.fromstring(xml_string) - official_pain_schema.assertValid(root_to_validate) - except Exception, e: - logger.warning( - "The XML file is invalid against the XML Schema Definition") - logger.warning(xml_string) - logger.warning(e) - raise orm.except_orm( - _('Error:'), - _("The generated XML file is not valid against the official " - "XML Schema Definition. The generated XML file and the " - "full error have been written in the server logs. Here " - "is the error, which may give you an idea on the cause " - "of the problem : %s") - % str(e)) - return True - - def finalize_sepa_file_creation( - self, cr, uid, ids, xml_root, total_amount, transactions_count, - gen_args, context=None): - xml_string = etree.tostring( - xml_root, pretty_print=True, encoding='UTF-8', - xml_declaration=True) - logger.debug( - "Generated SEPA XML file in format %s below" - % gen_args['pain_flavor']) - logger.debug(xml_string) - self._validate_xml(cr, uid, xml_string, gen_args, context=context) - - file_id = gen_args['file_obj'].create( - cr, uid, self._prepare_export_sepa( - cr, uid, total_amount, transactions_count, - xml_string, gen_args, context=context), - context=context) - - self.write( - cr, uid, ids, { - 'file_id': file_id, - 'state': 'finish', - }, context=context) - - action = { - 'name': 'SEPA File', - 'type': 'ir.actions.act_window', - 'view_type': 'form', - 'view_mode': 'form,tree', - 'res_model': self._name, - 'res_id': ids[0], - 'target': 'new', - } - return action - - def generate_group_header_block( - self, cr, uid, parent_node, gen_args, context=None): - group_header_1_0 = etree.SubElement(parent_node, 'GrpHdr') - message_identification_1_1 = etree.SubElement( - group_header_1_0, 'MsgId') - message_identification_1_1.text = self._prepare_field( - cr, uid, 'Message Identification', - 'sepa_export.payment_order_ids[0].reference', - {'sepa_export': gen_args['sepa_export']}, 35, - gen_args=gen_args, context=context) - creation_date_time_1_2 = etree.SubElement(group_header_1_0, 'CreDtTm') - creation_date_time_1_2.text = datetime.strftime( - datetime.today(), '%Y-%m-%dT%H:%M:%S') - if gen_args.get('pain_flavor') == 'pain.001.001.02': - # batch_booking is in "Group header" with pain.001.001.02 - # and in "Payment info" in pain.001.001.03/04 - batch_booking = etree.SubElement(group_header_1_0, 'BtchBookg') - batch_booking.text = \ - str(gen_args['sepa_export'].batch_booking).lower() - nb_of_transactions_1_6 = etree.SubElement( - group_header_1_0, 'NbOfTxs') - control_sum_1_7 = etree.SubElement(group_header_1_0, 'CtrlSum') - # Grpg removed in pain.001.001.03 - if gen_args.get('pain_flavor') == 'pain.001.001.02': - grouping = etree.SubElement(group_header_1_0, 'Grpg') - grouping.text = 'GRPD' - self.generate_initiating_party_block( - cr, uid, group_header_1_0, gen_args, - context=context) - return group_header_1_0, nb_of_transactions_1_6, control_sum_1_7 - - def generate_start_payment_info_block( - self, cr, uid, parent_node, payment_info_ident, - priority, local_instrument, sequence_type, requested_date, - eval_ctx, gen_args, context=None): - payment_info_2_0 = etree.SubElement(parent_node, 'PmtInf') - payment_info_identification_2_1 = etree.SubElement( - payment_info_2_0, 'PmtInfId') - payment_info_identification_2_1.text = self._prepare_field( - cr, uid, 'Payment Information Identification', - payment_info_ident, eval_ctx, 35, - gen_args=gen_args, context=context) - payment_method_2_2 = etree.SubElement(payment_info_2_0, 'PmtMtd') - payment_method_2_2.text = gen_args['payment_method'] - if gen_args.get('pain_flavor') != 'pain.001.001.02': - batch_booking_2_3 = etree.SubElement(payment_info_2_0, 'BtchBookg') - batch_booking_2_3.text = \ - str(gen_args['sepa_export'].batch_booking).lower() - # The "SEPA Customer-to-bank - # Implementation guidelines" for SCT and SDD says that control sum - # and nb_of_transactions should be present - # at both "group header" level and "payment info" level - nb_of_transactions_2_4 = etree.SubElement( - payment_info_2_0, 'NbOfTxs') - control_sum_2_5 = etree.SubElement(payment_info_2_0, 'CtrlSum') - payment_type_info_2_6 = etree.SubElement( - payment_info_2_0, 'PmtTpInf') - if priority: - instruction_priority_2_7 = etree.SubElement( - payment_type_info_2_6, 'InstrPrty') - instruction_priority_2_7.text = priority - service_level_2_8 = etree.SubElement( - payment_type_info_2_6, 'SvcLvl') - service_level_code_2_9 = etree.SubElement(service_level_2_8, 'Cd') - service_level_code_2_9.text = 'SEPA' - if local_instrument: - local_instrument_2_11 = etree.SubElement( - payment_type_info_2_6, 'LclInstrm') - local_instr_code_2_12 = etree.SubElement( - local_instrument_2_11, 'Cd') - local_instr_code_2_12.text = local_instrument - if sequence_type: - sequence_type_2_14 = etree.SubElement( - payment_type_info_2_6, 'SeqTp') - sequence_type_2_14.text = sequence_type - - if gen_args['payment_method'] == 'DD': - request_date_tag = 'ReqdColltnDt' - else: - request_date_tag = 'ReqdExctnDt' - requested_date_2_17 = etree.SubElement( - payment_info_2_0, request_date_tag) - requested_date_2_17.text = requested_date - return payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 - - def generate_initiating_party_block( - self, cr, uid, parent_node, gen_args, context=None): - my_company_name = self._prepare_field( - cr, uid, 'Company Name', - 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name', - {'sepa_export': gen_args['sepa_export']}, - gen_args.get('name_maxsize'), gen_args=gen_args, context=context) - initiating_party_1_8 = etree.SubElement(parent_node, 'InitgPty') - initiating_party_name = etree.SubElement(initiating_party_1_8, 'Nm') - initiating_party_name.text = my_company_name - initiating_party_identifier = self.pool['res.company'].\ - _get_initiating_party_identifier( - cr, uid, - gen_args['sepa_export'].payment_order_ids[0].company_id.id, - context=context) - initiating_party_issuer = gen_args['sepa_export'].\ - payment_order_ids[0].company_id.initiating_party_issuer - if initiating_party_identifier and initiating_party_issuer: - iniparty_id = etree.SubElement(initiating_party_1_8, 'Id') - iniparty_org_id = etree.SubElement(iniparty_id, 'OrgId') - iniparty_org_other = etree.SubElement(iniparty_org_id, 'Othr') - iniparty_org_other_id = etree.SubElement(iniparty_org_other, 'Id') - iniparty_org_other_id.text = initiating_party_identifier - iniparty_org_other_issuer = etree.SubElement( - iniparty_org_other, 'Issr') - iniparty_org_other_issuer.text = initiating_party_issuer - return True - - def generate_party_agent( - self, cr, uid, parent_node, party_type, party_type_label, - order, party_name, iban, bic, eval_ctx, gen_args, context=None): - '''Generate the piece of the XML file corresponding to BIC - This code is mutualized between TRF and DD''' - assert order in ('B', 'C'), "Order can be 'B' or 'C'" - try: - bic = self._prepare_field( - cr, uid, '%s BIC' % party_type_label, bic, eval_ctx, - gen_args=gen_args, context=context) - party_agent = etree.SubElement(parent_node, '%sAgt' % party_type) - party_agent_institution = etree.SubElement( - party_agent, 'FinInstnId') - party_agent_bic = etree.SubElement( - party_agent_institution, gen_args.get('bic_xml_tag')) - party_agent_bic.text = bic - except orm.except_orm: - if order == 'C': - if iban[0:2] != gen_args['initiating_party_country_code']: - raise orm.except_orm( - _('Error:'), - _("The bank account with IBAN '%s' of partner '%s' " - "must have an associated BIC because it is a " - "cross-border SEPA operation.") - % (iban, party_name)) - if order == 'B' or ( - order == 'C' and gen_args['payment_method'] == 'DD'): - party_agent = etree.SubElement( - parent_node, '%sAgt' % party_type) - party_agent_institution = etree.SubElement( - party_agent, 'FinInstnId') - party_agent_other = etree.SubElement( - party_agent_institution, 'Othr') - party_agent_other_identification = etree.SubElement( - party_agent_other, 'Id') - party_agent_other_identification.text = 'NOTPROVIDED' - # for Credit Transfers, in the 'C' block, if BIC is not provided, - # we should not put the 'Creditor Agent' block at all, - # as per the guidelines of the EPC - return True - - def generate_party_block( - self, cr, uid, parent_node, party_type, order, name, iban, bic, - eval_ctx, gen_args, context=None): - '''Generate the piece of the XML file corresponding to Name+IBAN+BIC - This code is mutualized between TRF and DD''' - assert order in ('B', 'C'), "Order can be 'B' or 'C'" - if party_type == 'Cdtr': - party_type_label = 'Creditor' - elif party_type == 'Dbtr': - party_type_label = 'Debtor' - party_name = self._prepare_field( - cr, uid, '%s Name' % party_type_label, name, eval_ctx, - gen_args.get('name_maxsize'), - gen_args=gen_args, context=context) - piban = self._prepare_field( - cr, uid, '%s IBAN' % party_type_label, iban, eval_ctx, - gen_args=gen_args, - context=context) - viban = self._validate_iban(cr, uid, piban, context=context) - # At C level, the order is : BIC, Name, IBAN - # At B level, the order is : Name, IBAN, BIC - if order == 'B': - gen_args['initiating_party_country_code'] = viban[0:2] - elif order == 'C': - self.generate_party_agent( - cr, uid, parent_node, party_type, party_type_label, - order, party_name, viban, bic, - eval_ctx, gen_args, context=context) - party = etree.SubElement(parent_node, party_type) - party_nm = etree.SubElement(party, 'Nm') - party_nm.text = party_name - party_account = etree.SubElement( - parent_node, '%sAcct' % party_type) - party_account_id = etree.SubElement(party_account, 'Id') - party_account_iban = etree.SubElement( - party_account_id, 'IBAN') - party_account_iban.text = viban - if order == 'B': - self.generate_party_agent( - cr, uid, parent_node, party_type, party_type_label, - order, party_name, viban, bic, - eval_ctx, gen_args, context=context) - return True - - def generate_remittance_info_block( - self, cr, uid, parent_node, line, gen_args, context=None): - - remittance_info_2_91 = etree.SubElement( - parent_node, 'RmtInf') - if line.state == 'normal': - remittance_info_unstructured_2_99 = etree.SubElement( - remittance_info_2_91, 'Ustrd') - remittance_info_unstructured_2_99.text = \ - self._prepare_field( - cr, uid, 'Remittance Unstructured Information', - 'line.communication', {'line': line}, 140, - gen_args=gen_args, - context=context) - else: - if not line.struct_communication_type: - raise orm.except_orm( - _('Error:'), - _("Missing 'Structured Communication Type' on payment " - "line with reference '%s'.") - % (line.name)) - remittance_info_structured_2_100 = etree.SubElement( - remittance_info_2_91, 'Strd') - creditor_ref_information_2_120 = etree.SubElement( - remittance_info_structured_2_100, 'CdtrRefInf') - if gen_args.get('pain_flavor') == 'pain.001.001.02': - creditor_ref_info_type_2_121 = etree.SubElement( - creditor_ref_information_2_120, 'CdtrRefTp') - creditor_ref_info_type_code_2_123 = etree.SubElement( - creditor_ref_info_type_2_121, 'Cd') - creditor_ref_info_type_issuer_2_125 = etree.SubElement( - creditor_ref_info_type_2_121, 'Issr') - creditor_reference_2_126 = etree.SubElement( - creditor_ref_information_2_120, 'CdtrRef') - else: - creditor_ref_info_type_2_121 = etree.SubElement( - creditor_ref_information_2_120, 'Tp') - creditor_ref_info_type_or_2_122 = etree.SubElement( - creditor_ref_info_type_2_121, 'CdOrPrtry') - creditor_ref_info_type_code_2_123 = etree.SubElement( - creditor_ref_info_type_or_2_122, 'Cd') - creditor_ref_info_type_issuer_2_125 = etree.SubElement( - creditor_ref_info_type_2_121, 'Issr') - creditor_reference_2_126 = etree.SubElement( - creditor_ref_information_2_120, 'Ref') - - creditor_ref_info_type_code_2_123.text = 'SCOR' - creditor_ref_info_type_issuer_2_125.text = \ - line.struct_communication_type - creditor_reference_2_126.text = \ - self._prepare_field( - cr, uid, 'Creditor Structured Reference', - 'line.communication', {'line': line}, 35, - gen_args=gen_args, - context=context) - return True - - def generate_creditor_scheme_identification( - self, cr, uid, parent_node, identification, identification_label, - eval_ctx, scheme_name_proprietary, gen_args, context=None): - csi_id = etree.SubElement( - parent_node, 'Id') - csi_privateid = csi_id = etree.SubElement(csi_id, 'PrvtId') - csi_other = etree.SubElement(csi_privateid, 'Othr') - csi_other_id = etree.SubElement(csi_other, 'Id') - csi_other_id.text = self._prepare_field( - cr, uid, identification_label, identification, eval_ctx, - gen_args=gen_args, context=context) - csi_scheme_name = etree.SubElement(csi_other, 'SchmeNm') - csi_scheme_name_proprietary = etree.SubElement( - csi_scheme_name, 'Prtry') - csi_scheme_name_proprietary.text = scheme_name_proprietary - return True diff --git a/account_banking_pain_base/company.py b/account_banking_pain_base/company.py deleted file mode 100644 index 222786c27..000000000 --- a/account_banking_pain_base/company.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# Copyright (C) 2013 Noviat (http://www.noviat.com) -# @author: Alexis de Lattre -# @author: Luc de Meyer (Noviat) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class res_company(orm.Model): - _inherit = 'res.company' - - _columns = { - 'initiating_party_issuer': fields.char( - 'Initiating Party Issuer', size=35, - help="This will be used as the 'Initiating Party Issuer' in the " - "PAIN files generated by OpenERP."), - } - - def _get_initiating_party_identifier( - self, cr, uid, company_id, context=None): - '''The code here may be different from one country to another. - If you need to add support for an additionnal country, you can - contribute your code here or inherit this function in the - localization modules for your country''' - assert isinstance(company_id, int), 'Only one company ID' - company = self.browse(cr, uid, company_id, context=context) - company_vat = company.vat - party_identifier = False - if company_vat: - country_code = company_vat[0:2].upper() - if country_code == 'BE': - party_identifier = company_vat[2:].replace(' ', '') - elif country_code == 'ES': - party_identifier = company.sepa_creditor_identifier - return party_identifier - - def _initiating_party_issuer_default(self, cr, uid, context=None): - '''If you need to add support for an additionnal country, you can - add an entry in the dict "party_issuer_per_country" here - or inherit this function in the localization modules for - your country''' - initiating_party_issuer = '' - # If your country require the 'Initiating Party Issuer', you should - # contribute the entry for your country in the dict below - party_issuer_per_country = { - 'BE': 'KBO-BCE', # KBO-BCE = the registry of companies in Belgium - } - company_id = self._company_default_get( - cr, uid, 'res.company', context=context) - if company_id: - company = self.browse(cr, uid, company_id, context=context) - country_code = company.country_id.code - initiating_party_issuer = party_issuer_per_country.get( - country_code, '') - return initiating_party_issuer - - def _initiating_party_issuer_def(self, cr, uid, context=None): - return self._initiating_party_issuer_default( - cr, uid, context=context) - - _defaults = { - 'initiating_party_issuer': _initiating_party_issuer_def, - } diff --git a/account_banking_pain_base/company_view.xml b/account_banking_pain_base/company_view.xml deleted file mode 100644 index a98d9b641..000000000 --- a/account_banking_pain_base/company_view.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - pain.group.on.res.company.form - res.company - - - - - - - - - - - - diff --git a/account_banking_pain_base/payment_line.py b/account_banking_pain_base/payment_line.py deleted file mode 100644 index 0dffbcf42..000000000 --- a/account_banking_pain_base/payment_line.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class payment_line(orm.Model): - _inherit = 'payment.line' - - def _get_struct_communication_types(self, cr, uid, context=None): - return [('ISO', 'ISO')] - - _columns = { - 'priority': fields.selection([ - ('NORM', 'Normal'), - ('HIGH', 'High'), - ], 'Priority', - help="This field will be used as the 'Instruction Priority' in " - "the generated PAIN file."), - # Update size from 64 to 140, because PAIN allows 140 caracters - 'communication': fields.char( - 'Communication', size=140, required=True, - help="Used as the message between ordering customer and current " - "company. Depicts 'What do you want to say to the recipient " - "about this order ?'"), - 'struct_communication_type': fields.selection( - _get_struct_communication_types, 'Structured Communication Type'), - } - - _defaults = { - 'priority': 'NORM', - 'struct_communication_type': 'ISO', - } diff --git a/account_banking_pain_base/payment_line_view.xml b/account_banking_pain_base/payment_line_view.xml deleted file mode 100644 index f92b1bbf5..000000000 --- a/account_banking_pain_base/payment_line_view.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - pain.base.payment.line.form - payment.line - - - - - - - - - - - - - - pain.base.payment.line.inside.order.form - payment.order - - - - - - - - - - - - - - diff --git a/account_banking_pain_base/payment_mode.py b/account_banking_pain_base/payment_mode.py deleted file mode 100644 index 540d01b67..000000000 --- a/account_banking_pain_base/payment_mode.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class payment_mode(orm.Model): - _inherit = 'payment.mode' - - _columns = { - 'convert_to_ascii': fields.boolean( - 'Convert to ASCII', - help="If active, OpenERP will convert each accented caracter to " - "the corresponding unaccented caracter, so that only ASCII " - "caracters are used in the generated PAIN file."), - } - - _defaults = { - 'convert_to_ascii': True, - } diff --git a/account_banking_pain_base/payment_mode_view.xml b/account_banking_pain_base/payment_mode_view.xml deleted file mode 100644 index 2deb24999..000000000 --- a/account_banking_pain_base/payment_mode_view.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - add.convert_to_ascii.in.payment.mode.form - payment.mode - - - - - - - - - - diff --git a/account_banking_sepa_credit_transfer/account_banking_sepa.py b/account_banking_sepa_credit_transfer/account_banking_sepa.py deleted file mode 100644 index 99d5b022b..000000000 --- a/account_banking_sepa_credit_transfer/account_banking_sepa.py +++ /dev/null @@ -1,90 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Credit Transfer module for OpenERP -# Copyright (C) 2010-2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from openerp.addons.decimal_precision import decimal_precision as dp -from unidecode import unidecode - - -class banking_export_sepa(orm.Model): - '''SEPA export''' - _name = 'banking.export.sepa' - _description = __doc__ - _rec_name = 'filename' - - def _generate_filename(self, cr, uid, ids, name, arg, context=None): - res = {} - for sepa_file in self.browse(cr, uid, ids, context=context): - ref = sepa_file.payment_order_ids[0].reference - if ref: - label = unidecode(ref.replace('/', '-')) - else: - label = 'error' - res[sepa_file.id] = 'sct_%s.xml' % label - return res - - _columns = { - 'payment_order_ids': fields.many2many( - 'payment.order', - 'account_payment_order_sepa_rel', - 'banking_export_sepa_id', 'account_order_id', - 'Payment Orders', - readonly=True), - 'nb_transactions': fields.integer( - 'Number of Transactions', readonly=True), - 'total_amount': fields.float( - 'Total Amount', digits_compute=dp.get_precision('Account'), - readonly=True), - 'batch_booking': fields.boolean( - 'Batch Booking', readonly=True, - help="If true, the bank statement will display only one debit " - "line for all the wire transfers of the SEPA XML file ; " - "if false, the bank statement will display one debit line " - "per wire transfer of the SEPA XML file."), - 'charge_bearer': fields.selection([ - ('SLEV', 'Following Service Level'), - ('SHAR', 'Shared'), - ('CRED', 'Borne by Creditor'), - ('DEBT', 'Borne by Debtor'), - ], 'Charge Bearer', readonly=True, - help="Following service level : transaction charges are to be " - "applied following the rules agreed in the service level and/or " - "scheme (SEPA Core messages must use this). Shared : " - "transaction charges on the creditor side are to be borne by " - "the creditor, transaction charges on the debtor side are to " - "be borne by the debtor. Borne by creditor : all transaction " - "charges are to be borne by the creditor. Borne by debtor : " - "all transaction charges are to be borne by the debtor."), - 'create_date': fields.datetime('Generation Date', readonly=True), - 'file': fields.binary('SEPA XML File', readonly=True), - 'filename': fields.function( - _generate_filename, type='char', size=256, string='Filename', - readonly=True), - 'state': fields.selection([ - ('draft', 'Draft'), - ('sent', 'Sent'), - ], 'State', readonly=True), - } - - _defaults = { - 'state': 'draft', - } diff --git a/account_banking_sepa_credit_transfer/account_banking_sepa_view.xml b/account_banking_sepa_credit_transfer/account_banking_sepa_view.xml deleted file mode 100644 index a5896c757..000000000 --- a/account_banking_sepa_credit_transfer/account_banking_sepa_view.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - account.banking.export.sepa.form - banking.export.sepa - -
-
- -
- - - - - - - - - - - - - - - - -
-
-
- - - - account.banking.export.sepa.tree - banking.export.sepa - - - - - - - - - - - - - SEPA Credit Transfer Files - banking.export.sepa - form - tree,form - - - - - - - -
-
diff --git a/account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml b/account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml deleted file mode 100644 index 77abf1b34..000000000 --- a/account_banking_sepa_credit_transfer/sepa_credit_transfer_demo.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - SEPA Credit Transfer La Banque Postale - - - - - - - - diff --git a/account_banking_sepa_direct_debit/account_banking_sdd.py b/account_banking_sepa_direct_debit/account_banking_sdd.py deleted file mode 100644 index 87e50111b..000000000 --- a/account_banking_sepa_direct_debit/account_banking_sdd.py +++ /dev/null @@ -1,440 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Direct Debit module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from openerp.tools.translate import _ -from openerp.addons.decimal_precision import decimal_precision as dp -from unidecode import unidecode -from datetime import datetime -from dateutil.relativedelta import relativedelta -import logging - -NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY = 36 - -logger = logging.getLogger(__name__) - - -class banking_export_sdd(orm.Model): - '''SEPA Direct Debit export''' - _name = 'banking.export.sdd' - _description = __doc__ - _rec_name = 'filename' - - def _generate_filename(self, cr, uid, ids, name, arg, context=None): - res = {} - for sepa_file in self.browse(cr, uid, ids, context=context): - ref = sepa_file.payment_order_ids[0].reference - if ref: - label = unidecode(ref.replace('/', '-')) - else: - label = 'error' - res[sepa_file.id] = 'sdd_%s.xml' % label - return res - - _columns = { - 'payment_order_ids': fields.many2many( - 'payment.order', - 'account_payment_order_sdd_rel', - 'banking_export_sepa_id', 'account_order_id', - 'Payment Orders', - readonly=True), - 'nb_transactions': fields.integer( - 'Number of Transactions', readonly=True), - 'total_amount': fields.float( - 'Total Amount', digits_compute=dp.get_precision('Account'), - readonly=True), - 'batch_booking': fields.boolean( - 'Batch Booking', readonly=True, - help="If true, the bank statement will display only one credit " - "line for all the direct debits of the SEPA file ; if false, " - "the bank statement will display one credit line per direct " - "debit of the SEPA file."), - 'charge_bearer': fields.selection([ - ('SLEV', 'Following Service Level'), - ('SHAR', 'Shared'), - ('CRED', 'Borne by Creditor'), - ('DEBT', 'Borne by Debtor'), - ], 'Charge Bearer', readonly=True, - help="Following service level : transaction charges are to be " - "applied following the rules agreed in the service level and/or " - "scheme (SEPA Core messages must use this). Shared : " - "transaction charges on the creditor side are to be borne by " - "the creditor, transaction charges on the debtor side are to be " - "borne by the debtor. Borne by creditor : all transaction " - "charges are to be borne by the creditor. Borne by debtor : " - "all transaction charges are to be borne by the debtor."), - 'create_date': fields.datetime('Generation Date', readonly=True), - 'file': fields.binary('SEPA File', readonly=True), - 'filename': fields.function( - _generate_filename, type='char', size=256, - string='Filename', readonly=True, store=True), - 'state': fields.selection([ - ('draft', 'Draft'), - ('sent', 'Sent'), - ], 'State', readonly=True), - } - - _defaults = { - 'state': 'draft', - } - - -class sdd_mandate(orm.Model): - '''SEPA Direct Debit Mandate''' - _name = 'sdd.mandate' - _description = __doc__ - _rec_name = 'unique_mandate_reference' - _inherit = ['mail.thread'] - _order = 'signature_date desc' - _track = { - 'state': { - 'account_banking_sepa_direct_debit.mandate_valid': - lambda self, cr, uid, obj, ctx=None: - obj['state'] == 'valid', - 'account_banking_sepa_direct_debit.mandate_expired': - lambda self, cr, uid, obj, ctx=None: - obj['state'] == 'expired', - 'account_banking_sepa_direct_debit.mandate_cancel': - lambda self, cr, uid, obj, ctx=None: - obj['state'] == 'cancel', - }, - 'recurrent_sequence_type': { - 'account_banking_sepa_direct_debit.recurrent_sequence_type_first': - lambda self, cr, uid, obj, ctx=None: - obj['recurrent_sequence_type'] == 'first', - 'account_banking_sepa_direct_debit.' - 'recurrent_sequence_type_recurring': - lambda self, cr, uid, obj, ctx=None: - obj['recurrent_sequence_type'] == 'recurring', - 'account_banking_sepa_direct_debit.recurrent_sequence_type_final': - lambda self, cr, uid, obj, ctx=None: - obj['recurrent_sequence_type'] == 'final', - } - } - - _columns = { - 'partner_bank_id': fields.many2one( - 'res.partner.bank', 'Bank Account', track_visibility='onchange'), - 'partner_id': fields.related( - 'partner_bank_id', 'partner_id', type='many2one', - relation='res.partner', string='Partner', readonly=True), - 'company_id': fields.many2one('res.company', 'Company', required=True), - 'unique_mandate_reference': fields.char( - 'Unique Mandate Reference', size=35, readonly=True, - track_visibility='always'), - 'type': fields.selection([ - ('recurrent', 'Recurrent'), - ('oneoff', 'One-Off'), - ], 'Type of Mandate', required=True, track_visibility='always'), - 'recurrent_sequence_type': fields.selection([ - ('first', 'First'), - ('recurring', 'Recurring'), - ('final', 'Final'), - ], 'Sequence Type for Next Debit', track_visibility='onchange', - help="This field is only used for Recurrent mandates, not for " - "One-Off mandates."), - 'signature_date': fields.date( - 'Date of Signature of the Mandate', track_visibility='onchange'), - 'scan': fields.binary('Scan of the Mandate'), - 'last_debit_date': fields.date( - 'Date of the Last Debit', readonly=True), - 'state': fields.selection([ - ('draft', 'Draft'), - ('valid', 'Valid'), - ('expired', 'Expired'), - ('cancel', 'Cancelled'), - ], 'Status', - help="Only valid mandates can be used in a payment line. A " - "cancelled mandate is a mandate that has been cancelled by " - "the customer. A one-off mandate expires after its first use. " - "A recurrent mandate expires after it's final use or if it " - "hasn't been used for 36 months."), - 'payment_line_ids': fields.one2many( - 'payment.line', 'sdd_mandate_id', "Related Payment Lines"), - 'sepa_migrated': fields.boolean( - 'Migrated to SEPA', track_visibility='onchange', - help="If this field is not active, the mandate section of the " - "next direct debit file that include this mandate will contain " - "the 'Original Mandate Identification' and the 'Original " - "Creditor Scheme Identification'. This is required in a few " - "countries (Belgium for instance), but not in all countries. " - "If this is not required in your country, you should keep this " - "field always active."), - 'original_mandate_identification': fields.char( - 'Original Mandate Identification', size=35, - track_visibility='onchange', - help="When the field 'Migrated to SEPA' is not active, this " - "field will be used as the Original Mandate Identification in " - "the Direct Debit file."), - } - - _defaults = { - 'company_id': lambda self, cr, uid, context: - self.pool['res.company']._company_default_get( - cr, uid, 'sdd.mandate', context=context), - 'unique_mandate_reference': '/', - 'state': 'draft', - 'sepa_migrated': True, - } - - _sql_constraints = [( - 'mandate_ref_company_uniq', - 'unique(unique_mandate_reference, company_id)', - 'A Mandate with the same reference already exists for this company !' - )] - - def create(self, cr, uid, vals, context=None): - if vals.get('unique_mandate_reference', '/') == '/': - vals['unique_mandate_reference'] = \ - self.pool['ir.sequence'].next_by_code( - cr, uid, 'sdd.mandate.reference', context=context) - return super(sdd_mandate, self).create(cr, uid, vals, context=context) - - def _check_sdd_mandate(self, cr, uid, ids): - for mandate in self.browse(cr, uid, ids): - if (mandate.signature_date and - mandate.signature_date > - datetime.today().strftime('%Y-%m-%d')): - raise orm.except_orm( - _('Error:'), - _("The date of signature of mandate '%s' is in the " - "future !") - % mandate.unique_mandate_reference) - if mandate.state == 'valid' and not mandate.signature_date: - raise orm.except_orm( - _('Error:'), - _("Cannot validate the mandate '%s' without a date of " - "signature.") - % mandate.unique_mandate_reference) - if mandate.state == 'valid' and not mandate.partner_bank_id: - raise orm.except_orm( - _('Error:'), - _("Cannot validate the mandate '%s' because it is not " - "attached to a bank account.") - % mandate.unique_mandate_reference) - - if (mandate.signature_date and mandate.last_debit_date and - mandate.signature_date > mandate.last_debit_date): - raise orm.except_orm( - _('Error:'), - _("The mandate '%s' can't have a date of last debit " - "before the date of signature.") - % mandate.unique_mandate_reference) - if (mandate.type == 'recurrent' - and not mandate.recurrent_sequence_type): - raise orm.except_orm( - _('Error:'), - _("The recurrent mandate '%s' must have a sequence type.") - % mandate.unique_mandate_reference) - if (mandate.type == 'recurrent' and not mandate.sepa_migrated - and mandate.recurrent_sequence_type != 'first'): - raise orm.except_orm( - _('Error:'), - _("The recurrent mandate '%s' which is not marked as " - "'Migrated to SEPA' must have its recurrent sequence " - "type set to 'First'.") - % mandate.unique_mandate_reference) - if (mandate.type == 'recurrent' and not mandate.sepa_migrated - and not mandate.original_mandate_identification): - raise orm.except_orm( - _('Error:'), - _("You must set the 'Original Mandate Identification' " - "on the recurrent mandate '%s' which is not marked " - "as 'Migrated to SEPA'.") - % mandate.unique_mandate_reference) - return True - - _constraints = [ - (_check_sdd_mandate, "Error msg in raise", [ - 'last_debit_date', 'signature_date', 'state', 'partner_bank_id', - 'type', 'recurrent_sequence_type', 'sepa_migrated', - 'original_mandate_identification', - ]), - ] - - def mandate_type_change(self, cr, uid, ids, type): - if type == 'recurrent': - recurrent_sequence_type = 'first' - else: - recurrent_sequence_type = False - res = {'value': {'recurrent_sequence_type': recurrent_sequence_type}} - return res - - def mandate_partner_bank_change( - self, cr, uid, ids, partner_bank_id, type, recurrent_sequence_type, - last_debit_date, state): - res = {'value': {}} - if partner_bank_id: - partner_bank_read = self.pool['res.partner.bank'].read( - cr, uid, partner_bank_id, ['partner_id'])['partner_id'] - if partner_bank_read: - res['value']['partner_id'] = partner_bank_read[0] - if (state == 'valid' and partner_bank_id - and type == 'recurrent' - and recurrent_sequence_type != 'first'): - res['value']['recurrent_sequence_type'] = 'first' - res['warning'] = { - 'title': _('Mandate update'), - 'message': _( - "As you changed the bank account attached to this " - "mandate, the 'Sequence Type' has been set back to " - "'First'."), - } - return res - - def validate(self, cr, uid, ids, context=None): - to_validate_ids = [] - for mandate in self.browse(cr, uid, ids, context=context): - assert mandate.state == 'draft', 'Mandate should be in draft state' - to_validate_ids.append(mandate.id) - self.write( - cr, uid, to_validate_ids, {'state': 'valid'}, context=context) - return True - - def cancel(self, cr, uid, ids, context=None): - to_cancel_ids = [] - for mandate in self.browse(cr, uid, ids, context=context): - assert mandate.state in ('draft', 'valid'),\ - 'Mandate should be in draft or valid state' - to_cancel_ids.append(mandate.id) - self.write( - cr, uid, to_cancel_ids, {'state': 'cancel'}, context=context) - return True - - def back2draft(self, cr, uid, ids, context=None): - to_draft_ids = [] - for mandate in self.browse(cr, uid, ids, context=context): - assert mandate.state == 'cancel',\ - 'Mandate should be in cancel state' - to_draft_ids.append(mandate.id) - self.write( - cr, uid, to_draft_ids, {'state': 'draft'}, context=context) - return True - - def _sdd_mandate_set_state_to_expired(self, cr, uid, context=None): - logger.info('Searching for SDD Mandates that must be set to Expired') - expire_limit_date = datetime.today() + \ - relativedelta(months=-NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY) - expire_limit_date_str = expire_limit_date.strftime('%Y-%m-%d') - expired_mandate_ids = self.search(cr, uid, [ - '|', - ('last_debit_date', '=', False), - ('last_debit_date', '<=', expire_limit_date_str), - ('state', '=', 'valid'), - ('signature_date', '<=', expire_limit_date_str), - ], context=context) - if expired_mandate_ids: - self.write( - cr, uid, expired_mandate_ids, {'state': 'expired'}, - context=context) - logger.info( - 'The following SDD Mandate IDs has been set to expired: %s' - % expired_mandate_ids) - else: - logger.info('0 SDD Mandates must be set to Expired') - return True - - -class res_partner_bank(orm.Model): - _inherit = 'res.partner.bank' - - _columns = { - 'sdd_mandate_ids': fields.one2many( - 'sdd.mandate', 'partner_bank_id', 'SEPA Direct Debit Mandates'), - } - - -class payment_line(orm.Model): - _inherit = 'payment.line' - - _columns = { - 'sdd_mandate_id': fields.many2one( - 'sdd.mandate', 'SEPA Direct Debit Mandate', - domain=[('state', '=', 'valid')]), - } - - def create(self, cr, uid, vals, context=None): - '''If the customer invoice has a mandate, take it - otherwise, take the first valid mandate of the bank account''' - if context is None: - context = {} - if not vals: - vals = {} - partner_bank_id = vals.get('bank_id') - move_line_id = vals.get('move_line_id') - if (context.get('default_payment_order_type') == 'debit' - and 'sdd_mandate_id' not in vals): - if move_line_id: - line = self.pool['account.move.line'].browse( - cr, uid, move_line_id, context=context) - if (line.invoice and line.invoice.type == 'out_invoice' - and line.invoice.sdd_mandate_id): - vals.update({ - 'sdd_mandate_id': line.invoice.sdd_mandate_id.id, - 'bank_id': - line.invoice.sdd_mandate_id.partner_bank_id.id, - }) - if partner_bank_id and 'sdd_mandate_id' not in vals: - mandate_ids = self.pool['sdd.mandate'].search(cr, uid, [ - ('partner_bank_id', '=', partner_bank_id), - ('state', '=', 'valid'), - ], context=context) - if mandate_ids: - vals['sdd_mandate_id'] = mandate_ids[0] - return super(payment_line, self).create(cr, uid, vals, context=context) - - def _check_mandate_bank_link(self, cr, uid, ids): - for payline in self.browse(cr, uid, ids): - if (payline.sdd_mandate_id and payline.bank_id - and payline.sdd_mandate_id.partner_bank_id.id != - payline.bank_id.id): - raise orm.except_orm( - _('Error:'), - _("The payment line with reference '%s' has the bank " - "account '%s' which is not attached to the mandate " - "'%s' (this mandate is attached to the bank account " - "'%s').") % ( - payline.name, - self.pool['res.partner.bank'].name_get( - cr, uid, [payline.bank_id.id])[0][1], - payline.sdd_mandate_id.unique_mandate_reference, - self.pool['res.partner.bank'].name_get( - cr, uid, - [payline.sdd_mandate_id.partner_bank_id.id])[0][1], - )) - return True - - _constraints = [ - (_check_mandate_bank_link, 'Error msg in raise', - ['sdd_mandate_id', 'bank_id']), - ] - - -class account_invoice(orm.Model): - _inherit = 'account.invoice' - - _columns = { - 'sdd_mandate_id': fields.many2one( - 'sdd.mandate', 'SEPA Direct Debit Mandate', - domain=[('state', '=', 'valid')], readonly=True, - states={'draft': [('readonly', False)]}) - } diff --git a/account_banking_sepa_direct_debit/account_banking_sdd_view.xml b/account_banking_sepa_direct_debit/account_banking_sdd_view.xml deleted file mode 100644 index f74b60353..000000000 --- a/account_banking_sepa_direct_debit/account_banking_sdd_view.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - account.banking.export.sdd.form - banking.export.sdd - -
-
- -
- - - - - - - - - - - - - - - - -
-
-
- - - - account.banking.export.sdd.tree - banking.export.sdd - - - - - - - - - - - - - SEPA Direct Debit Files - banking.export.sdd - form - tree,form - - - - - - - -
-
diff --git a/account_banking_sepa_direct_debit/account_invoice_view.xml b/account_banking_sepa_direct_debit/account_invoice_view.xml deleted file mode 100644 index 2ca480e54..000000000 --- a/account_banking_sepa_direct_debit/account_invoice_view.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - add.sdd.mandate.on.customer.invoice.form - account.invoice - - - - - - - - - - diff --git a/account_banking_sepa_direct_debit/account_payment_view.xml b/account_banking_sepa_direct_debit/account_payment_view.xml deleted file mode 100644 index 74098c44e..000000000 --- a/account_banking_sepa_direct_debit/account_payment_view.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - sdd.payment.order.form - payment.order - - - - - - - - - - - - - - diff --git a/account_banking_sepa_direct_debit/company.py b/account_banking_sepa_direct_debit/company.py deleted file mode 100644 index 6d54ba8e6..000000000 --- a/account_banking_sepa_direct_debit/company.py +++ /dev/null @@ -1,90 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Direct Debit module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -import logging - -logger = logging.getLogger(__name__) - - -class res_company(orm.Model): - _inherit = 'res.company' - - _columns = { - 'sepa_creditor_identifier': fields.char( - 'SEPA Creditor Identifier', size=35, - help="Enter the Creditor Identifier that has been attributed " - "to your company to make SEPA Direct Debits. This identifier " - "is composed of :\n- your country ISO code (2 letters)\n- a " - "2-digits checkum\n- a 3-letters business code\n- a " - "country-specific identifier"), - 'original_creditor_identifier': fields.char( - 'Original Creditor Identifier', size=70), - } - - def is_sepa_creditor_identifier_valid( - self, cr, uid, sepa_creditor_identifier, context=None): - """Check if SEPA Creditor Identifier is valid - @param sepa_creditor_identifier: SEPA Creditor Identifier as str - or unicode - @return: True if valid, False otherwise - """ - if not isinstance(sepa_creditor_identifier, (str, unicode)): - return False - try: - sci_str = str(sepa_creditor_identifier) - except: - logger.warning( - "SEPA Creditor ID should contain only ASCII caracters.") - return False - sci = sci_str.lower() - if len(sci) < 9: - return False - before_replacement = sci[7:] + sci[0:2] + '00' - logger.debug( - "SEPA ID check before_replacement = %s" % before_replacement) - after_replacement = '' - for char in before_replacement: - if char.isalpha(): - after_replacement += str(ord(char)-87) - else: - after_replacement += char - logger.debug( - "SEPA ID check after_replacement = %s" % after_replacement) - if int(sci[2:4]) == (98 - (int(after_replacement) % 97)): - return True - else: - return False - - def _check_sepa_creditor_identifier(self, cr, uid, ids): - for company in self.browse(cr, uid, ids): - if company.sepa_creditor_identifier: - if not self.is_sepa_creditor_identifier_valid( - cr, uid, company.sepa_creditor_identifier): - return False - return True - - _constraints = [ - (_check_sepa_creditor_identifier, - "Invalid SEPA Creditor Identifier.", - ['sepa_creditor_identifier']), - ] diff --git a/account_banking_sepa_direct_debit/company_view.xml b/account_banking_sepa_direct_debit/company_view.xml deleted file mode 100644 index e4c9e0b93..000000000 --- a/account_banking_sepa_direct_debit/company_view.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - sepa_direct_debit.res.company.form - res.company - - - - - - - - - - - diff --git a/account_banking_sepa_direct_debit/mandate_expire_cron.xml b/account_banking_sepa_direct_debit/mandate_expire_cron.xml deleted file mode 100644 index 4cb0693d2..000000000 --- a/account_banking_sepa_direct_debit/mandate_expire_cron.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - Set SEPA Direct Debit Mandates to Expired - - - 1 - days - -1 - - - - - - - - diff --git a/account_banking_sepa_direct_debit/res_partner_bank_view.xml b/account_banking_sepa_direct_debit/res_partner_bank_view.xml deleted file mode 100644 index 0b32e9f1c..000000000 --- a/account_banking_sepa_direct_debit/res_partner_bank_view.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - sdd.mandate.res.partner.bank.form - res.partner.bank - - - - - - - - - - - - sdd.mandate.res.partner.bank.tree - res.partner.bank - - - - - - - - - - - sdd.mandate.partner.form - res.partner - - - - - - - - - - diff --git a/account_banking_sepa_direct_debit/sdd_mandate_view.xml b/account_banking_sepa_direct_debit/sdd_mandate_view.xml deleted file mode 100644 index bd1dd6e79..000000000 --- a/account_banking_sepa_direct_debit/sdd_mandate_view.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - sdd.mandate.form - sdd.mandate - -
-
-
- -
-

- -

-
- - - - - - - - - - - - - - - -
-
- - -
-
-
-
- - - sdd.mandate.tree - sdd.mandate - - - - - - - - - - - - - - - sdd.mandate.search - sdd.mandate - - - - - - - - - - - - - - - SEPA Direct Debit Mandates - sdd.mandate - form - tree,form - -

- Click to create a new SEPA Direct Debit Mandate. -

- A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account. -

-
-
- - - - - - Mandate Validated - sdd.mandate - - SEPA Direct Debit Mandate Validated - - - - Mandate Expired - sdd.mandate - - SEPA Direct Debit Mandate has Expired - - - - Mandate Cancelled - sdd.mandate - - SEPA Direct Debit Mandate Cancelled - - - - Sequence Type set to First - sdd.mandate - - Sequence Type set to First - - - - Sequence Type set to Recurring - sdd.mandate - - Sequence Type set to Recurring - - - - Sequence Type set to Final - sdd.mandate - - Sequence Type set to Final - - -
-
diff --git a/account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml b/account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml deleted file mode 100644 index 220261088..000000000 --- a/account_banking_sepa_direct_debit/sepa_direct_debit_demo.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - SEPA Direct Debit La Banque Postale - - - - - - - - FR78ZZZ424242 - - - - - recurrent - first - 2014-02-01 - valid - - - - diff --git a/account_payment_partner/__openerp__.py b/account_payment_partner/__openerp__.py index 3f3a51f3f..b499d6028 100644 --- a/account_payment_partner/__openerp__.py +++ b/account_payment_partner/__openerp__.py @@ -51,3 +51,62 @@ be filtered per Payment Mode. 'demo': ['demo/partner_demo.xml'], 'installable': True, } + +from openerp import models, fields, api, exceptions +from datetime import datetime + + +class CrmLead(models.Model): + _inherit = 'crm.lead' + + @api.one + @api.constrains('state', 'code') + def _check_code(self): + if self.state == 'won': + if not self.code: + raise exceptions.Warning('Debe poner un código cuando la etapa se pasa a ganado.') + + @api.constrains('state', 'code') + def _check_code(self): + for record in self: + if record.state == 'won': + if not record.code: + raise exceptions.Warning('Debe poner un código cuando la etapa se pasa a ganado.') + + def do_something(self, vals): + pass + + def create(self, vals): + # Complementar valores del create + rec_id = super(CrmLead, self).create(vals) + # Crear registros accesorios + analytic_acc_obj = self.env['account.analytic.account'] + analytic_acc_obj.create({'name': vals['name'], + 'type': 'project', + 'date': datetime.now(), + 'project_id': rec_id}) + analytic_accs = analytic_acc_obj.search([('type', '=', 'project')], + order='partner_id', limit=1) + analytic_accs.write({'partner_id': 1}) + return rec_id + + def copy(self, default): + default['name'] = self.name + " (copia)" + return super(CrmLead, self).copy(default) + + def search(self, domain): + return {1: {''}, 2: {} } + + @api.one + def unlink(self): + if self.state in ('to_invoice', 'done'): + raise exceptions.Warning('No se puede borrar un pedido confirmado.') + super(CrmLead, self).unlink() + return True + + def write(self, vals): + if vals.get('state') == 'won': + for record in self: + if not record.code and not vals.get('code'): + raise exceptions.Warning('Debe poner un código cuando la etapa se pasa a ganado.') + return super(CrmLead, self).write(vals) diff --git a/account_payment_partner/models/account_invoice.py b/account_payment_partner/models/account_invoice.py index cbbd4b5b9..1c2428eb6 100644 --- a/account_payment_partner/models/account_invoice.py +++ b/account_payment_partner/models/account_invoice.py @@ -26,7 +26,10 @@ from openerp import models, fields, api class AccountInvoice(models.Model): _inherit = 'account.invoice' - payment_mode_id = fields.Many2one('payment.mode', string="Payment Mode") + type = fields.Selection('out', 'in') + + payment_mode_id = fields.Many2one('payment.mode', string="Payment Mode", + domain="[('type', '=', type)]") @api.multi def onchange_partner_id( diff --git a/account_payment_purchase/model/__init__.py b/account_payment_purchase/model/__init__.py deleted file mode 100644 index fe39c6366..000000000 --- a/account_payment_purchase/model/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Payment Purchase module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from . import purchase -from . import stock diff --git a/account_payment_purchase/model/purchase.py b/account_payment_purchase/model/purchase.py deleted file mode 100644 index f397a6a61..000000000 --- a/account_payment_purchase/model/purchase.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Payment Purchase module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class purchase_order(orm.Model): - _inherit = "purchase.order" - - _columns = { - 'supplier_partner_bank_id': fields.many2one( - 'res.partner.bank', 'Supplier Bank Account', - help="Select the bank account of your supplier on which " - "your company should send the payment. This field is copied " - "from the partner and will be copied to the supplier invoice."), - 'payment_mode_id': fields.many2one( - 'payment.mode', 'Payment Mode'), - } - - def _get_default_supplier_partner_bank( - self, cr, uid, partner, context=None): - '''This function is designed to be inherited''' - if partner.bank_ids: - return partner.bank_ids[0].id - else: - return False - - def onchange_partner_id(self, cr, uid, ids, partner_id): - res = super(purchase_order, self).onchange_partner_id( - cr, uid, ids, partner_id) - if partner_id: - partner = self.pool['res.partner'].browse( - cr, uid, partner_id) - res['value'].update({ - 'supplier_partner_bank_id': - self._get_default_supplier_partner_bank( - cr, uid, partner), - 'payment_mode_id': - partner.supplier_payment_mode.id or False, - }) - else: - res['value'].update({ - 'supplier_partner_bank_id': False, - 'payment_mode_id': False, - }) - return res - - def action_invoice_create(self, cr, uid, ids, context=None): - """Copy bank partner + payment type from PO to invoice""" - # as of OpenERP 7.0, there is no _prepare function for - # the invoice (the _prepare function only exists for invoice lines) - res = super(purchase_order, self).action_invoice_create( - cr, uid, ids, context=context) - for order in self.browse(cr, uid, ids, context=context): - for invoice in order.invoice_ids: - if invoice.state == 'draft': - invoice.write({ - 'partner_bank_id': - order.supplier_partner_bank_id.id or False, - 'payment_mode_id': - order.payment_mode_id.id or False, - }, context=context) - return res diff --git a/account_payment_purchase/model/stock.py b/account_payment_purchase/model/stock.py deleted file mode 100644 index e2f83663b..000000000 --- a/account_payment_purchase/model/stock.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Payment Purchase module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm - - -class stock_picking(orm.Model): - _inherit = "stock.picking" - - def _prepare_invoice( - self, cr, uid, picking, partner, inv_type, journal_id, - context=None): - """Copy bank partner and payment type from PO to invoice""" - invoice_vals = super(stock_picking, self)._prepare_invoice( - cr, uid, picking, partner, inv_type, journal_id, context=context) - if picking.purchase_id: - invoice_vals.update({ - 'partner_bank_id': - picking.purchase_id.supplier_partner_bank.id or False, - 'payment_mode_type': - picking.purchase_id.payment_mode_type.id or False, - }) - return invoice_vals diff --git a/account_payment_sale/models/sale_order.py b/account_payment_sale/models/sale_order.py index fa30ccf2d..0906beae0 100644 --- a/account_payment_sale/models/sale_order.py +++ b/account_payment_sale/models/sale_order.py @@ -46,6 +46,5 @@ class SaleOrder(models.Model): vals = super(SaleOrder, self)._prepare_invoice(order, lines) if order.payment_mode_id: vals['payment_mode_id'] = order.payment_mode_id.id, - vals['partner_bank_id'] = (order.payment_mode_id and - order.payment_mode_id.bank_id.id) + vals['partner_bank_id'] = order.payment_mode_id.bank_id.id return vals From 7d3b61dbec94c7c2fb9ca74d0411b34556f66b44 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 7 Oct 2014 11:51:19 +0200 Subject: [PATCH 07/21] [IMP] Replace deprecated workflow calls --- .../models/account_payment.py | 8 +-- .../wizard/bank_payment_manual.py | 7 +-- .../wizard/export_sepa.py | 5 +- .../wizard/export_sdd.py | 5 +- .../models/account_move_line.py | 2 +- account_payment_partner/__openerp__.py | 59 ------------------- .../models/account_invoice.py | 2 - .../views/account_invoice.xml | 38 ------------ account_payment_partner/views/partner.xml | 31 ---------- 9 files changed, 11 insertions(+), 146 deletions(-) delete mode 100644 account_payment_partner/views/account_invoice.xml delete mode 100644 account_payment_partner/views/partner.xml diff --git a/account_banking_payment_export/models/account_payment.py b/account_banking_payment_export/models/account_payment.py index 069d9b427..3ab44b586 100644 --- a/account_banking_payment_export/models/account_payment.py +++ b/account_banking_payment_export/models/account_payment.py @@ -23,8 +23,7 @@ # ############################################################################## -from openerp import models, fields, api, exceptions, _ -from openerp import netsvc +from openerp import models, fields, api, exceptions, workflow, _ class PaymentOrder(models.Model): @@ -70,8 +69,7 @@ class PaymentOrder(models.Model): _('You can only combine payment orders of the same ' 'type')) # process manual payments - wf_service = netsvc.LocalService('workflow') for order_id in self.ids: - wf_service.trg_validate(self.env.uid, 'payment.order', - order_id, 'done', self.env.cr) + workflow.trg_validate(self.env.uid, 'payment.order', + order_id, 'done', self.env.cr) return {} diff --git a/account_banking_payment_export/wizard/bank_payment_manual.py b/account_banking_payment_export/wizard/bank_payment_manual.py index d6ac06ec5..c2ca42573 100644 --- a/account_banking_payment_export/wizard/bank_payment_manual.py +++ b/account_banking_payment_export/wizard/bank_payment_manual.py @@ -27,7 +27,7 @@ bank transfers. """ -from openerp import models, api, netsvc +from openerp import models, api, workflow class PaymentManual(models.TransientModel): @@ -36,8 +36,7 @@ class PaymentManual(models.TransientModel): @api.multi def button_ok(self): - wf_service = netsvc.LocalService('workflow') for order_id in self.env.context.get('active_ids', []): - wf_service.trg_validate(self.env.uid, 'payment.order', order_id, - 'done', self.env.cr) + workflow.trg_validate(self.env.uid, 'payment.order', order_id, + 'done', self.env.cr) return {'type': 'ir.actions.act_window_close'} diff --git a/account_banking_sepa_credit_transfer/wizard/export_sepa.py b/account_banking_sepa_credit_transfer/wizard/export_sepa.py index 7b2c94ef9..f5d3324c1 100644 --- a/account_banking_sepa_credit_transfer/wizard/export_sepa.py +++ b/account_banking_sepa_credit_transfer/wizard/export_sepa.py @@ -23,7 +23,7 @@ from openerp.osv import orm, fields from openerp.tools.translate import _ -from openerp import netsvc +from openerp import workflow from lxml import etree @@ -273,7 +273,6 @@ class banking_export_sepa_wizard(orm.TransientModel): self.pool['banking.export.sepa'].write( cr, uid, sepa_export.file_id.id, {'state': 'sent'}, context=context) - wf_service = netsvc.LocalService('workflow') for order in sepa_export.payment_order_ids: - wf_service.trg_validate(uid, 'payment.order', order.id, 'done', cr) + workflow.trg_validate(uid, 'payment.order', order.id, 'done', cr) return {'type': 'ir.actions.act_window_close'} diff --git a/account_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py index 34e37fc59..60dce7653 100644 --- a/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -23,7 +23,7 @@ from openerp.osv import orm, fields from openerp.tools.translate import _ -from openerp import netsvc +from openerp import workflow from datetime import datetime from lxml import etree @@ -422,9 +422,8 @@ class banking_export_sdd_wizard(orm.TransientModel): self.pool.get('banking.export.sdd').write( cr, uid, sepa_export.file_id.id, {'state': 'sent'}, context=context) - wf_service = netsvc.LocalService('workflow') for order in sepa_export.payment_order_ids: - wf_service.trg_validate(uid, 'payment.order', order.id, 'done', cr) + workflow.trg_validate(uid, 'payment.order', order.id, 'done', cr) mandate_ids = [line.sdd_mandate_id.id for line in order.line_ids] self.pool['sdd.mandate'].write( cr, uid, mandate_ids, diff --git a/account_direct_debit/models/account_move_line.py b/account_direct_debit/models/account_move_line.py index 3e48e1f8a..cc475b2c6 100644 --- a/account_direct_debit/models/account_move_line.py +++ b/account_direct_debit/models/account_move_line.py @@ -27,7 +27,7 @@ from openerp.osv import fields, orm class AccountMoveLine(orm.Model): _inherit = "account.move.line" - def _amount_to_receive(self, cr, uid, ids, name, arg={}, context=None): + def _amount_to_receive(self, cr, uid, ids, name, arg=None, context=None): """Return the amount still to receive regarding all the debit orders (excepting canceled orders). This is the reverse from amount_to_pay() in diff --git a/account_payment_partner/__openerp__.py b/account_payment_partner/__openerp__.py index b499d6028..3f3a51f3f 100644 --- a/account_payment_partner/__openerp__.py +++ b/account_payment_partner/__openerp__.py @@ -51,62 +51,3 @@ be filtered per Payment Mode. 'demo': ['demo/partner_demo.xml'], 'installable': True, } - -from openerp import models, fields, api, exceptions -from datetime import datetime - - -class CrmLead(models.Model): - _inherit = 'crm.lead' - - @api.one - @api.constrains('state', 'code') - def _check_code(self): - if self.state == 'won': - if not self.code: - raise exceptions.Warning('Debe poner un código cuando la etapa se pasa a ganado.') - - @api.constrains('state', 'code') - def _check_code(self): - for record in self: - if record.state == 'won': - if not record.code: - raise exceptions.Warning('Debe poner un código cuando la etapa se pasa a ganado.') - - def do_something(self, vals): - pass - - def create(self, vals): - # Complementar valores del create - rec_id = super(CrmLead, self).create(vals) - # Crear registros accesorios - analytic_acc_obj = self.env['account.analytic.account'] - analytic_acc_obj.create({'name': vals['name'], - 'type': 'project', - 'date': datetime.now(), - 'project_id': rec_id}) - analytic_accs = analytic_acc_obj.search([('type', '=', 'project')], - order='partner_id', limit=1) - analytic_accs.write({'partner_id': 1}) - return rec_id - - def copy(self, default): - default['name'] = self.name + " (copia)" - return super(CrmLead, self).copy(default) - - def search(self, domain): - return {1: {''}, 2: {} } - - @api.one - def unlink(self): - if self.state in ('to_invoice', 'done'): - raise exceptions.Warning('No se puede borrar un pedido confirmado.') - super(CrmLead, self).unlink() - return True - - def write(self, vals): - if vals.get('state') == 'won': - for record in self: - if not record.code and not vals.get('code'): - raise exceptions.Warning('Debe poner un código cuando la etapa se pasa a ganado.') - return super(CrmLead, self).write(vals) diff --git a/account_payment_partner/models/account_invoice.py b/account_payment_partner/models/account_invoice.py index 1c2428eb6..9c95f4cda 100644 --- a/account_payment_partner/models/account_invoice.py +++ b/account_payment_partner/models/account_invoice.py @@ -26,8 +26,6 @@ from openerp import models, fields, api class AccountInvoice(models.Model): _inherit = 'account.invoice' - type = fields.Selection('out', 'in') - payment_mode_id = fields.Many2one('payment.mode', string="Payment Mode", domain="[('type', '=', type)]") diff --git a/account_payment_partner/views/account_invoice.xml b/account_payment_partner/views/account_invoice.xml deleted file mode 100644 index 0bfd2d1f5..000000000 --- a/account_payment_partner/views/account_invoice.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - account_payment_partner.invoice_form - account.invoice - - - - - - - - - - - account_payment_partner.invoice_supplier_form - account.invoice - - - - - - - - - - - diff --git a/account_payment_partner/views/partner.xml b/account_payment_partner/views/partner.xml deleted file mode 100644 index 02eb8cc0f..000000000 --- a/account_payment_partner/views/partner.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - account_partner_payment.partner_form - res.partner - - - - - - - - - - - - - - From ba0375a615bff5912c26449c7036a9b8bfb56e72 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 8 Oct 2014 03:34:21 +0200 Subject: [PATCH 08/21] [ADD] account_banking_mandate, spliting functionality in two modules --- .../__init__.py | 52 ++-- account_banking_mandate/__openerp__.py | 57 ++++ .../data/mandate_reference_sequence.xml | 20 ++ account_banking_mandate/models/__init__.py | 26 ++ .../models/account_banking_mandate.py | 154 +++++++++ .../models/account_invoice.py | 65 ++-- .../models/payment_line.py | 76 +++++ .../models/res_partner_bank.py | 34 ++ .../security/ir.model.access.csv | 3 + .../test/banking_mandate.yml | 36 +++ .../views/account_banking_mandate_view.xml | 122 ++++++++ .../views/account_invoice_view.xml | 4 +- .../views/account_payment_view.xml | 8 +- .../views/res_partner_bank_view.xml | 20 +- .../__openerp__.py | 6 +- .../data/mandate_expire_cron.xml | 30 +- .../data/mandate_reference_sequence.xml | 21 -- .../demo/sepa_direct_debit_demo.xml | 2 +- .../models/__init__.py | 5 +- .../models/account_banking_mandate.py | 145 +++++++++ .../models/payment_line.py | 74 ----- .../models/sdd_mandate.py | 291 ------------------ .../security/ir.model.access.csv | 2 - .../views/account_banking_mandate_view.xml | 117 +++++++ .../views/sdd_mandate_view.xml | 153 --------- account_payment_partner/i18n/fr.po | 57 ++++ 26 files changed, 935 insertions(+), 645 deletions(-) rename account_banking_sepa_direct_debit/models/res_partner_bank.py => account_banking_mandate/__init__.py (69%) create mode 100644 account_banking_mandate/__openerp__.py create mode 100644 account_banking_mandate/data/mandate_reference_sequence.xml create mode 100644 account_banking_mandate/models/__init__.py create mode 100644 account_banking_mandate/models/account_banking_mandate.py rename {account_banking_sepa_direct_debit => account_banking_mandate}/models/account_invoice.py (75%) create mode 100644 account_banking_mandate/models/payment_line.py create mode 100644 account_banking_mandate/models/res_partner_bank.py create mode 100644 account_banking_mandate/security/ir.model.access.csv create mode 100644 account_banking_mandate/test/banking_mandate.yml create mode 100644 account_banking_mandate/views/account_banking_mandate_view.xml rename {account_banking_sepa_direct_debit => account_banking_mandate}/views/account_invoice_view.xml (69%) rename {account_banking_sepa_direct_debit => account_banking_mandate}/views/account_payment_view.xml (59%) rename {account_banking_sepa_direct_debit => account_banking_mandate}/views/res_partner_bank_view.xml (60%) delete mode 100644 account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml create mode 100644 account_banking_sepa_direct_debit/models/account_banking_mandate.py delete mode 100644 account_banking_sepa_direct_debit/models/payment_line.py delete mode 100644 account_banking_sepa_direct_debit/models/sdd_mandate.py create mode 100644 account_banking_sepa_direct_debit/views/account_banking_mandate_view.xml delete mode 100644 account_banking_sepa_direct_debit/views/sdd_mandate_view.xml create mode 100644 account_payment_partner/i18n/fr.po diff --git a/account_banking_sepa_direct_debit/models/res_partner_bank.py b/account_banking_mandate/__init__.py similarity index 69% rename from account_banking_sepa_direct_debit/models/res_partner_bank.py rename to account_banking_mandate/__init__.py index 132a4fa42..1feaa8f2d 100644 --- a/account_banking_sepa_direct_debit/models/res_partner_bank.py +++ b/account_banking_mandate/__init__.py @@ -1,30 +1,22 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Direct Debit module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp import models, fields - - -class ResPartnerBank(models.Model): - _inherit = 'res.partner.bank' - - sdd_mandate_ids = fields.One2many( - 'sdd.mandate', 'partner_bank_id', string='SEPA Direct Debit Mandates') +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for openERP +# Copyright (C) 2014 Compassion CH (http://www.compassion.ch) +# @author: Cyril Sester +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from . import models diff --git a/account_banking_mandate/__openerp__.py b/account_banking_mandate/__openerp__.py new file mode 100644 index 000000000..5f825eaa9 --- /dev/null +++ b/account_banking_mandate/__openerp__.py @@ -0,0 +1,57 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for openERP +# Copyright (C) 2014 Compassion CH (http://www.compassion.ch) +# @author: Cyril Sester , +# Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{ + 'name': 'Account Banking Mandate', + 'summary': 'Banking mandates', + 'version': '0.1', + 'license': 'AGPL-3', + 'author': 'Compassion CH', + 'website': 'http://www.compassion.ch', + 'contributors': ['Pedro M. Baeza '], + 'category': 'Banking addons', + 'depends': [ + 'account_payment', + ], + 'data': [ + 'views/account_banking_mandate_view.xml', + 'views/account_invoice_view.xml', + 'views/account_payment_view.xml', + 'views/res_partner_bank_view.xml', + 'data/mandate_reference_sequence.xml', + 'security/ir.model.access.csv', + ], + 'demo': [], + 'test': ['test/banking_mandate.yml'], + 'description': ''' + This module adds a generic model for banking mandates. + These mandates can be specialized to fit any banking mandates (such as + sepa or lsv). + + A banking mandate is attached to a bank account and represents an + authorization that the bank account owner gives to a company for a + specific operation (such as direct debit). + You can setup mandates from the accounting menu or directly from a bank + account. + ''', + 'installable': True, +} diff --git a/account_banking_mandate/data/mandate_reference_sequence.xml b/account_banking_mandate/data/mandate_reference_sequence.xml new file mode 100644 index 000000000..9a51db944 --- /dev/null +++ b/account_banking_mandate/data/mandate_reference_sequence.xml @@ -0,0 +1,20 @@ + + + + + + + DD Mandate Reference + account.banking.mandate + + + + DD Mandate Reference + account.banking.mandate + BM + + + + + + diff --git a/account_banking_mandate/models/__init__.py b/account_banking_mandate/models/__init__.py new file mode 100644 index 000000000..480270819 --- /dev/null +++ b/account_banking_mandate/models/__init__.py @@ -0,0 +1,26 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for openERP +# Copyright (C) 2014 Compassion CH (http://www.compassion.ch) +# @author: Cyril Sester , +# Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from . import account_banking_mandate +from . import account_invoice +from . import res_partner_bank +from . import payment_line diff --git a/account_banking_mandate/models/account_banking_mandate.py b/account_banking_mandate/models/account_banking_mandate.py new file mode 100644 index 000000000..f372f1192 --- /dev/null +++ b/account_banking_mandate/models/account_banking_mandate.py @@ -0,0 +1,154 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for openERP +# Copyright (C) 2014 Compassion CH (http://www.compassion.ch) +# @author: Cyril Sester , +# Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, exceptions, api, _ + + +class AccountBankingMandate(models.Model): + ''' The banking mandate is attached to a bank account and represents an + authorization that the bank account owner gives to a company for a + specific operation (such as direct debit) + ''' + _name = 'account.banking.mandate' + _description = "A generic banking mandate" + _rec_name = 'unique_mandate_reference' + _inherit = ['mail.thread'] + _order = 'signature_date desc' + _track = { + 'state': { + 'account_banking_mandate.mandate_valid': ( + lambda self, cr, uid, obj, ctx=None: obj['state'] == 'valid'), + 'account_banking_mandate.mandate_expired': ( + lambda self, cr, uid, obj, ctx=None: + obj['state'] == 'expired'), + 'account_banking_mandate.mandate_cancel': ( + lambda self, cr, uid, obj, ctx=None: obj['state'] == 'cancel'), + }, + } + + def _get_states(self): + return [('draft', 'Draft'), + ('valid', 'Valid'), + ('expired', 'Expired'), + ('cancel', 'Cancelled')] + + partner_bank_id = fields.Many2one( + comodel_name='res.partner.bank', string='Bank Account', + track_visibility='onchange') + partner_id = fields.Many2one( + comodel_name='res.partner', relation='partner_bank_id.partner_id', + string='Partner', readonly=True, store=True) + company_id = fields.Many2one( + comodel_name='res.company', string='Company', required=True, + default=lambda self: self.env['res.company']._company_default_get( + 'account.banking.mandate')) + unique_mandate_reference = fields.Char( + string='Unique Mandate Reference', track_visibility='always', + default='/') + signature_date = fields.Date(string='Date of Signature of the Mandate', + track_visibility='onchange') + scan = fields.Binary(string='Scan of the Mandate') + last_debit_date = fields.Date(string='Date of the Last Debit', + readonly=True) + state = fields.Selection( + _get_states, string='Status', default='draft', + help="Only valid mandates can be used in a payment line. A cancelled " + "mandate is a mandate that has been cancelled by the customer.") + payment_line_ids = fields.One2many( + comodel_name='payment.line', inverse_name='mandate_id', + string="Related Payment Lines") + + _sql_constraints = [( + 'mandate_ref_company_uniq', + 'unique(unique_mandate_reference, company_id)', + 'A Mandate with the same reference already exists for this company !')] + + @api.one + @api.constrains('signature_date', 'last_debit_date') + def _check_dates(self): + if (self.signature_date and + self.signature_date > fields.Date.context_today(self)): + raise exceptions.Warning( + _("The date of signature of mandate '%s' is in the future !") + % self.unique_mandate_reference) + if (self.signature_date and self.last_debit_date and + self.signature_date > self.last_debit_date): + raise exceptions.Warning( + _("The mandate '%s' can't have a date of last debit before " + "the date of signature.") % self.unique_mandate_reference) + + @api.one + @api.constrains('state', 'partner_bank_id') + def _check_valid_state(self): + if self.state == 'valid': + if not self.signature_date: + raise exceptions.Warning( + _("Cannot validate the mandate '%s' without a date of " + "signature.") % self.unique_mandate_reference) + if not self.partner_bank_id: + raise exceptions.Warning( + _("Cannot validate the mandate '%s' because it is not " + "attached to a bank account.") % + self.unique_mandate_reference) + + @api.model + def create(self, vals=None): + if vals.get('unique_mandate_reference', '/') == '/': + vals['unique_mandate_reference'] = \ + self.env['ir.sequence'].next_by_code('account.banking.mandate') + return super(AccountBankingMandate, self).create(vals) + + @api.one + @api.onchange('partner_bank_id') + def mandate_partner_bank_change(self): + self.partner_id = self.partner_bank_id.partner_id + + @api.multi + def validate(self): + for mandate in self: + if mandate.state != 'draft': + raise exceptions.Warning( + _('Mandate should be in draft state')) + self.write({'state': 'valid'}) + return True + + @api.multi + def cancel(self): + for mandate in self: + if mandate.state not in ('draft', 'valid'): + raise exceptions.Warning( + _('Mandate should be in draft or valid state')) + self.write({'state': 'cancel'}) + return True + + @api.multi + def back2draft(self): + """Allows to set the mandate back to the draft state. + This is for mandates cancelled by mistake. + """ + for mandate in self: + if mandate.state != 'cancel': + raise exceptions.Warning( + _('Mandate should be in cancel state')) + self.write({'state': 'draft'}) + return True diff --git a/account_banking_sepa_direct_debit/models/account_invoice.py b/account_banking_mandate/models/account_invoice.py similarity index 75% rename from account_banking_sepa_direct_debit/models/account_invoice.py rename to account_banking_mandate/models/account_invoice.py index eee2b7757..a4e43eba6 100644 --- a/account_banking_sepa_direct_debit/models/account_invoice.py +++ b/account_banking_mandate/models/account_invoice.py @@ -1,32 +1,33 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Direct Debit module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp import models, fields - - -class AccountInvoice(models.Model): - _inherit = 'account.invoice' - - sdd_mandate_id = fields.Many2one( - 'sdd.mandate', string='SEPA Direct Debit Mandate', - domain=[('state', '=', 'valid')], readonly=True, - states={'draft': [('readonly', False)]}) +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for openERP +# Copyright (C) 2014 Compassion CH (http://www.compassion.ch) +# @author: Cyril Sester , +# Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields + + +class AccountInvoice(models.Model): + _inherit = 'account.invoice' + + mandate_id = fields.Many2one( + 'account.banking.mandate', string='Direct Debit Mandate', + domain=[('state', '=', 'valid')], readonly=True, + states={'draft': [('readonly', False)]}) diff --git a/account_banking_mandate/models/payment_line.py b/account_banking_mandate/models/payment_line.py new file mode 100644 index 000000000..9c6c00dce --- /dev/null +++ b/account_banking_mandate/models/payment_line.py @@ -0,0 +1,76 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for openERP +# Copyright (C) 2014 Compassion CH (http://www.compassion.ch) +# @author: Cyril Sester , +# Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api, exceptions, _ + + +class PaymentLine(models.Model): + _inherit = 'payment.line' + + mandate_id = fields.Many2one( + comodel_name='account.banking.mandate', string='Direct Debit Mandate', + domain=[('state', '=', 'valid')]) + + @api.multi + def create(self, vals=None): + """If the customer invoice has a mandate, take it + otherwise, take the first valid mandate of the bank account + """ + if vals is None: + vals = {} + partner_bank_id = vals.get('bank_id') + move_line_id = vals.get('move_line_id') + if (self.env.context.get('search_payment_order_type') == 'debit' + and 'mandate_id' not in vals): + if move_line_id: + line = self.env['account.move.line'].browse(move_line_id) + if (line.invoice and line.invoice.type == 'out_invoice' + and line.invoice.mandate_id): + vals.update({ + 'mandate_id': line.invoice.mandate_id.id, + 'bank_id': line.invoice.mandate_id.partner_bank_id.id, + }) + if partner_bank_id and 'mandate_id' not in vals: + mandates = self.env['account.banking.mandate'].search( + [('partner_bank_id', '=', partner_bank_id), + ('state', '=', 'valid')]) + if mandates: + vals['mandate_id'] = mandates.id + return super(PaymentLine, self).create(vals) + + @api.one + @api.constrains('mandate_id', 'bank_id') + def _check_mandate_bank_link(self, cr, uid, ids): + if (self.mandate_id and self.bank_id + and self.mandate_id.partner_bank_id.id != + self.bank_id.id): + raise exceptions.Warning( + _("The payment line with reference '%s' has the bank account " + "'%s' which is not attached to the mandate '%s' (this " + "mandate is attached to the bank account '%s').") % + (self.name, + self.env['res.partner.bank'].name_get( + [self.bank_id.id])[0][1], + self.mandate_id.unique_mandate_reference, + self.env['res.partner.bank'].name_get( + [self.mandate_id.partner_bank_id.id])[0][1])) diff --git a/account_banking_mandate/models/res_partner_bank.py b/account_banking_mandate/models/res_partner_bank.py new file mode 100644 index 000000000..ecb1e944c --- /dev/null +++ b/account_banking_mandate/models/res_partner_bank.py @@ -0,0 +1,34 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for openERP +# Copyright (C) 2014 Compassion CH (http://www.compassion.ch) +# @author: Cyril Sester , +# Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields + + +class ResPartnerBank(models.Model): + _inherit = 'res.partner.bank' + + mandate_ids = fields.One2many( + comodel_name='account.banking.mandate', inverse_name='partner_bank_id', + string='Direct Debit Mandates', + help='Banking mandates represents an authorization that the bank ' + 'account owner gives to a company for a specific operation') diff --git a/account_banking_mandate/security/ir.model.access.csv b/account_banking_mandate/security/ir.model.access.csv new file mode 100644 index 000000000..f89130b3f --- /dev/null +++ b/account_banking_mandate/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_account_banking_mandate","Full access on account.banking.mandate","model_account_banking_mandate","account_payment.group_account_payment",1,1,1,1 +"access_account_banking_mandate_read","Read access on account.banking.mandate","model_account_banking_mandate","base.group_user",1,0,0,0 \ No newline at end of file diff --git a/account_banking_mandate/test/banking_mandate.yml b/account_banking_mandate/test/banking_mandate.yml new file mode 100644 index 000000000..d7291cc99 --- /dev/null +++ b/account_banking_mandate/test/banking_mandate.yml @@ -0,0 +1,36 @@ +- + In order to test mandate, I create a partner with a bank account. + Then, I create a mandate, validate it, cancel it and the set it back to draft + + I create a partner +- + !record {model: res.partner, id: mandate_partner, view: False}: + name: "Mandate test" +- + I create a partner bank account +- + !record {model: res.partner.bank, id: mandate_partner_bank, view: False}: + state: 'bank' + acc_number: '1234' + partner_id: mandate_partner +- + I create a mandate on 1st January +- + !record {model: account.banking.mandate, id: test_mandate, view: False}: + partner_bank_id: mandate_partner_bank + signature_date: "2014-01-01" + +- + I check that the state field is automatically set by default +- + !assert {model: account.banking.mandate, id: test_mandate}: + - state == 'draft' +- + I go through all states by clicking on buttons and check that cancel state is reached +- + !python {model: account.banking.mandate}: | + self.validate(cr, uid, [ref('test_mandate')]) + self.cancel(cr, uid, [ref('test_mandate')]) + mandate = self.browse(cr, uid, ref('test_mandate')) + assert mandate.state == 'cancel', 'Mandate is not in cancel state' + self.back2draft(cr, uid, [ref('test_mandate')]) diff --git a/account_banking_mandate/views/account_banking_mandate_view.xml b/account_banking_mandate/views/account_banking_mandate_view.xml new file mode 100644 index 000000000..fbb942b10 --- /dev/null +++ b/account_banking_mandate/views/account_banking_mandate_view.xml @@ -0,0 +1,122 @@ + + + + + + view.mandate.form + account.banking.mandate + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + +
+
+ + +
+
+
+
+ + + view.mandate.tree + account.banking.mandate + + + + + + + + + + + + + + view.mandate.search + account.banking.mandate + + + + + + + + + + + + + Banking Mandates + account.banking.mandate + form + tree,form + +

+ Click to create a new Banking Mandate. +

+ A Banking Mandate is a document signed by your customer that gives you the autorization to do one or several operations on his bank account. +

+
+
+ + + + + + Mandate Validated + account.banking.mandate + + Banking Mandate Validated + + + + Mandate Expired + account.banking.mandate + + Banking Mandate has Expired + + + + Mandate Cancelled + account.banking.mandate + + Banking Mandate Cancelled + +
+
diff --git a/account_banking_sepa_direct_debit/views/account_invoice_view.xml b/account_banking_mandate/views/account_invoice_view.xml similarity index 69% rename from account_banking_sepa_direct_debit/views/account_invoice_view.xml rename to account_banking_mandate/views/account_invoice_view.xml index 2ca480e54..a21e83857 100644 --- a/account_banking_sepa_direct_debit/views/account_invoice_view.xml +++ b/account_banking_mandate/views/account_invoice_view.xml @@ -8,12 +8,12 @@ - add.sdd.mandate.on.customer.invoice.form + add.mandate.on.customer.invoice.form account.invoice - + diff --git a/account_banking_sepa_direct_debit/views/account_payment_view.xml b/account_banking_mandate/views/account_payment_view.xml similarity index 59% rename from account_banking_sepa_direct_debit/views/account_payment_view.xml rename to account_banking_mandate/views/account_payment_view.xml index 74098c44e..39ec86953 100644 --- a/account_banking_sepa_direct_debit/views/account_payment_view.xml +++ b/account_banking_mandate/views/account_payment_view.xml @@ -7,17 +7,17 @@ - - sdd.payment.order.form + + mandate.payment.order.form payment.order - + - + diff --git a/account_banking_sepa_direct_debit/views/res_partner_bank_view.xml b/account_banking_mandate/views/res_partner_bank_view.xml similarity index 60% rename from account_banking_sepa_direct_debit/views/res_partner_bank_view.xml rename to account_banking_mandate/views/res_partner_bank_view.xml index 0b32e9f1c..572fa766e 100644 --- a/account_banking_sepa_direct_debit/views/res_partner_bank_view.xml +++ b/account_banking_mandate/views/res_partner_bank_view.xml @@ -7,39 +7,39 @@ - - sdd.mandate.res.partner.bank.form + + mandate.res.partner.bank.form res.partner.bank - - + + - - sdd.mandate.res.partner.bank.tree + + mandate.res.partner.bank.tree res.partner.bank - + - - sdd.mandate.partner.form + + mandate.partner.form res.partner - + diff --git a/account_banking_sepa_direct_debit/__openerp__.py b/account_banking_sepa_direct_debit/__openerp__.py index 5f222df80..c5fc42fb4 100644 --- a/account_banking_sepa_direct_debit/__openerp__.py +++ b/account_banking_sepa_direct_debit/__openerp__.py @@ -34,15 +34,11 @@ }, 'data': [ 'views/account_banking_sdd_view.xml', - 'views/sdd_mandate_view.xml', - 'views/res_partner_bank_view.xml', - 'views/account_payment_view.xml', + 'views/account_banking_mandate_view.xml', 'views/res_company_view.xml', - 'views/account_invoice_view.xml', 'wizard/export_sdd_view.xml', 'data/mandate_expire_cron.xml', 'data/payment_type_sdd.xml', - 'data/mandate_reference_sequence.xml', 'security/original_mandate_required_security.xml', 'security/ir.model.access.csv', ], diff --git a/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml b/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml index 4cb0693d2..79aa05689 100644 --- a/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml +++ b/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml @@ -7,20 +7,18 @@ --> - - - - Set SEPA Direct Debit Mandates to Expired - - - 1 - days - -1 - - - - - - - + + + Set SEPA Direct Debit Mandates to Expired + + + 1 + days + -1 + + + + + + diff --git a/account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml b/account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml deleted file mode 100644 index 68075d526..000000000 --- a/account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - SDD Mandate Reference - sdd.mandate.reference - - - - SDD Mandate Reference - sdd.mandate.reference - RUM - - - - - - - diff --git a/account_banking_sepa_direct_debit/demo/sepa_direct_debit_demo.xml b/account_banking_sepa_direct_debit/demo/sepa_direct_debit_demo.xml index 220261088..041082d76 100644 --- a/account_banking_sepa_direct_debit/demo/sepa_direct_debit_demo.xml +++ b/account_banking_sepa_direct_debit/demo/sepa_direct_debit_demo.xml @@ -15,7 +15,7 @@ FR78ZZZ424242 - + recurrent first diff --git a/account_banking_sepa_direct_debit/models/__init__.py b/account_banking_sepa_direct_debit/models/__init__.py index 36b8b4b56..274855e14 100644 --- a/account_banking_sepa_direct_debit/models/__init__.py +++ b/account_banking_sepa_direct_debit/models/__init__.py @@ -20,9 +20,6 @@ # ############################################################################## -from . import account_invoice from . import banking_export_sdd -from . import payment_line from . import res_company -from . import res_partner_bank -from . import sdd_mandate +from . import account_banking_mandate diff --git a/account_banking_sepa_direct_debit/models/account_banking_mandate.py b/account_banking_sepa_direct_debit/models/account_banking_mandate.py new file mode 100644 index 000000000..4df706378 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/account_banking_mandate.py @@ -0,0 +1,145 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for OpenERP +# Copyright (C) 2013 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields, api, exceptions, _ +from datetime import datetime +from dateutil.relativedelta import relativedelta +import logging + +NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY = 36 + +logger = logging.getLogger(__name__) + + +class AccountBankingMandate(models.Model): + """SEPA Direct Debit Mandate""" + _inherit = 'account.banking.mandate' + _track = { + 'recurrent_sequence_type': { + 'account_banking_sepa_direct_debit.recurrent_sequence_type_first': + lambda self, cr, uid, obj, ctx=None: + obj['recurrent_sequence_type'] == 'first', + 'account_banking_sepa_direct_debit.' + 'recurrent_sequence_type_recurring': + lambda self, cr, uid, obj, ctx=None: + obj['recurrent_sequence_type'] == 'recurring', + 'account_banking_sepa_direct_debit.recurrent_sequence_type_final': + lambda self, cr, uid, obj, ctx=None: + obj['recurrent_sequence_type'] == 'final', + } + } + + type = fields.Selection([('recurrent', 'Recurrent'), + ('oneoff', 'One-Off')], + string='Type of Mandate', required=True, + track_visibility='always') + recurrent_sequence_type = fields.Selection( + [('first', 'First'), + ('recurring', 'Recurring'), + ('final', 'Final')], + string='Sequence Type for Next Debit', track_visibility='onchange', + help="This field is only used for Recurrent mandates, not for " + "One-Off mandates.", default="first") + sepa_migrated = fields.Boolean( + string='Migrated to SEPA', track_visibility='onchange', + help="If this field is not active, the mandate section of the next " + "direct debit file that include this mandate will contain the " + "'Original Mandate Identification' and the 'Original Creditor " + "Scheme Identification'. This is required in a few countries " + "(Belgium for instance), but not in all countries. If this is " + "not required in your country, you should keep this field always " + "active.", default=True) + original_mandate_identification = fields.Char( + string='Original Mandate Identification', track_visibility='onchange', + help="When the field 'Migrated to SEPA' is not active, this field " + "will be used as the Original Mandate Identification in the " + "Direct Debit file.") + scheme = fields.Selection([('CORE', 'Basic (CORE)'), + ('B2B', 'Enterprise (B2B)')], + string='Scheme', required=True, default="CORE") + + @api.one + @api.constrains('type', 'recurrent_sequence_type') + def _check_recurring_type(self): + if (self.type == 'recurrent' + and not self.recurrent_sequence_type): + raise exceptions.Warning( + _("The recurrent mandate '%s' must have a sequence type.") + % self.unique_mandate_reference) + + @api.one + @api.constrains('type', 'recurrent_sequence_type', 'sepa_migrated') + def _check_migrated_to_sepa(self): + if (self.type == 'recurrent' and not self.sepa_migrated + and self.recurrent_sequence_type != 'first'): + raise exceptions.Warning( + _("The recurrent mandate '%s' which is not marked as " + "'Migrated to SEPA' must have its recurrent sequence type " + "set to 'First'.") % self.unique_mandate_reference) + + @api.one + @api.constrains('type', 'original_mandate_identification', 'sepa_migrated') + def _check_original_mandate_identification(self): + if (self.type == 'recurrent' and not self.sepa_migrated + and not self.original_mandate_identification): + raise exceptions.Warning( + _("You must set the 'Original Mandate Identification' on the " + "recurrent mandate '%s' which is not marked as 'Migrated to " + "SEPA'.") % self.unique_mandate_reference) + + @api.one + @api.onchange('partner_bank_id') + def mandate_partner_bank_change(self): + super(AccountBankingMandate, self).mandate_partner_bank_change() + res = {} + if (self.state == 'valid' and self.partner_bank_id + and self.type == 'recurrent' + and self.recurrent_sequence_type != 'first'): + self.recurrent_sequence_type = 'first' + res['warning'] = { + 'title': _('Mandate update'), + 'message': _("As you changed the bank account attached to " + "this mandate, the 'Sequence Type' has been set " + "back to 'First'."), + } + return res + + @api.multi + def _sdd_mandate_set_state_to_expired(self): + logger.info('Searching for SDD Mandates that must be set to Expired') + expire_limit_date = datetime.today() + \ + relativedelta(months=-NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY) + expire_limit_date_str = expire_limit_date.strftime('%Y-%m-%d') + expired_mandates = self.search( + ['|', + ('last_debit_date', '=', False), + ('last_debit_date', '<=', expire_limit_date_str), + ('state', '=', 'valid'), + ('signature_date', '<=', expire_limit_date_str)]) + if expired_mandates: + expired_mandates.write({'state': 'expired'}) + logger.info( + 'The following SDD Mandate IDs has been set to expired: %s' + % expired_mandates.ids) + else: + logger.info('0 SDD Mandates must be set to Expired') + return True diff --git a/account_banking_sepa_direct_debit/models/payment_line.py b/account_banking_sepa_direct_debit/models/payment_line.py deleted file mode 100644 index 31c47bd89..000000000 --- a/account_banking_sepa_direct_debit/models/payment_line.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Direct Debit module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp import models, fields, api, exceptions, _ - - -class PaymentLine(models.Model): - _inherit = 'payment.line' - - sdd_mandate_id = fields.Many2one( - 'sdd.mandate', string='SEPA Direct Debit Mandate', - domain=[('state', '=', 'valid')]) - - def create(self, vals=None): - """If the customer invoice has a mandate, take it. Otherwise, take the - first valid mandate of the bank account. - """ - if not vals: - vals = {} - partner_bank_id = vals.get('bank_id') - if (self.env.context.get('search_payment_order_type') == 'debit' - and 'sdd_mandate_id' not in vals): - if vals.get('move_line_id'): - line = self.env['account.move.line'].browse( - vals['move_line_id']) - if (line.invoice and line.invoice.type == 'out_invoice' - and line.invoice.sdd_mandate_id): - vals.update( - {'sdd_mandate_id': line.invoice.sdd_mandate_id.id, - 'bank_id': - line.invoice.sdd_mandate_id.partner_bank_id.id}) - if partner_bank_id and 'sdd_mandate_id' not in vals: - mandates = self.env['sdd.mandate'].search( - [('partner_bank_id', '=', partner_bank_id), - ('state', '=', 'valid')]) - if mandates: - vals['sdd_mandate_id'] = mandates.ids[0] - return super(PaymentLine, self).create(vals) - - @api.one - @api.constrains('sdd_mandate_id', 'bank_id') - def _check_mandate_bank_link(self): - if (self.sdd_mandate_id and self.bank_id - and self.sdd_mandate_id.partner_bank_id.id != - self.bank_id.id): - raise exceptions.Warning( - _('Error:'), - _("The payment line with reference '%s' has the bank " - "account '%s' which is not attached to the mandate " - "'%s' (this mandate is attached to the bank account " - "'%s').") % - (self.name, - self.bank_id.name_get()[0][1], - self.sdd_mandate_id.unique_mandate_reference, - self.sdd_mandate_id.partner_bank_id.name_get()[0][1])) diff --git a/account_banking_sepa_direct_debit/models/sdd_mandate.py b/account_banking_sepa_direct_debit/models/sdd_mandate.py deleted file mode 100644 index ebee316d2..000000000 --- a/account_banking_sepa_direct_debit/models/sdd_mandate.py +++ /dev/null @@ -1,291 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Direct Debit module for OpenERP -# Copyright (C) 2013 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from openerp.tools.translate import _ -from datetime import datetime -from dateutil.relativedelta import relativedelta -import logging - -NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY = 36 - -logger = logging.getLogger(__name__) - - -class SddMandate(orm.Model): - """SEPA Direct Debit Mandate""" - _name = 'sdd.mandate' - _description = __doc__ - _rec_name = 'unique_mandate_reference' - _inherit = ['mail.thread'] - _order = 'signature_date desc' - _track = { - 'state': { - 'account_banking_sepa_direct_debit.mandate_valid': - lambda self, cr, uid, obj, ctx=None: - obj['state'] == 'valid', - 'account_banking_sepa_direct_debit.mandate_expired': - lambda self, cr, uid, obj, ctx=None: - obj['state'] == 'expired', - 'account_banking_sepa_direct_debit.mandate_cancel': - lambda self, cr, uid, obj, ctx=None: - obj['state'] == 'cancel', - }, - 'recurrent_sequence_type': { - 'account_banking_sepa_direct_debit.recurrent_sequence_type_first': - lambda self, cr, uid, obj, ctx=None: - obj['recurrent_sequence_type'] == 'first', - 'account_banking_sepa_direct_debit.' - 'recurrent_sequence_type_recurring': - lambda self, cr, uid, obj, ctx=None: - obj['recurrent_sequence_type'] == 'recurring', - 'account_banking_sepa_direct_debit.recurrent_sequence_type_final': - lambda self, cr, uid, obj, ctx=None: - obj['recurrent_sequence_type'] == 'final', - } - } - - _columns = { - 'partner_bank_id': fields.many2one( - 'res.partner.bank', 'Bank Account', track_visibility='onchange'), - 'partner_id': fields.related( - 'partner_bank_id', 'partner_id', type='many2one', - relation='res.partner', string='Partner', readonly=True), - 'company_id': fields.many2one('res.company', 'Company', required=True), - 'unique_mandate_reference': fields.char( - 'Unique Mandate Reference', size=35, readonly=True, - track_visibility='always'), - 'type': fields.selection([ - ('recurrent', 'Recurrent'), - ('oneoff', 'One-Off'), - ], 'Type of Mandate', required=True, track_visibility='always'), - 'recurrent_sequence_type': fields.selection([ - ('first', 'First'), - ('recurring', 'Recurring'), - ('final', 'Final'), - ], 'Sequence Type for Next Debit', track_visibility='onchange', - help="This field is only used for Recurrent mandates, not for " - "One-Off mandates."), - 'signature_date': fields.date( - 'Date of Signature of the Mandate', track_visibility='onchange'), - 'scan': fields.binary('Scan of the Mandate'), - 'last_debit_date': fields.date( - 'Date of the Last Debit', readonly=True), - 'state': fields.selection([ - ('draft', 'Draft'), - ('valid', 'Valid'), - ('expired', 'Expired'), - ('cancel', 'Cancelled'), - ], 'Status', - help="Only valid mandates can be used in a payment line. A " - "cancelled mandate is a mandate that has been cancelled by " - "the customer. A one-off mandate expires after its first use. " - "A recurrent mandate expires after it's final use or if it " - "hasn't been used for 36 months."), - 'payment_line_ids': fields.one2many( - 'payment.line', 'sdd_mandate_id', "Related Payment Lines"), - 'sepa_migrated': fields.boolean( - 'Migrated to SEPA', track_visibility='onchange', - help="If this field is not active, the mandate section of the " - "next direct debit file that include this mandate will contain " - "the 'Original Mandate Identification' and the 'Original " - "Creditor Scheme Identification'. This is required in a few " - "countries (Belgium for instance), but not in all countries. " - "If this is not required in your country, you should keep this " - "field always active."), - 'original_mandate_identification': fields.char( - 'Original Mandate Identification', size=35, - track_visibility='onchange', - help="When the field 'Migrated to SEPA' is not active, this " - "field will be used as the Original Mandate Identification in " - "the Direct Debit file."), - 'scheme': fields.selection([('CORE', 'Basic (CORE)'), - ('B2B', 'Enterprise (B2B)')], - 'Scheme', required=True), - } - - _defaults = { - 'company_id': lambda self, cr, uid, context: - self.pool['res.company']._company_default_get( - cr, uid, 'sdd.mandate', context=context), - 'unique_mandate_reference': '/', - 'state': 'draft', - 'sepa_migrated': True, - 'scheme': 'CORE', - } - - _sql_constraints = [( - 'mandate_ref_company_uniq', - 'unique(unique_mandate_reference, company_id)', - 'A Mandate with the same reference already exists for this company !' - )] - - def create(self, cr, uid, vals, context=None): - if vals.get('unique_mandate_reference', '/') == '/': - vals['unique_mandate_reference'] = \ - self.pool['ir.sequence'].next_by_code( - cr, uid, 'sdd.mandate.reference', context=context) - return super(SddMandate, self).create(cr, uid, vals, context=context) - - def _check_sdd_mandate(self, cr, uid, ids): - for mandate in self.browse(cr, uid, ids): - if (mandate.signature_date and - mandate.signature_date > - datetime.today().strftime('%Y-%m-%d')): - raise orm.except_orm( - _('Error:'), - _("The date of signature of mandate '%s' is in the " - "future !") - % mandate.unique_mandate_reference) - if mandate.state == 'valid' and not mandate.signature_date: - raise orm.except_orm( - _('Error:'), - _("Cannot validate the mandate '%s' without a date of " - "signature.") - % mandate.unique_mandate_reference) - if mandate.state == 'valid' and not mandate.partner_bank_id: - raise orm.except_orm( - _('Error:'), - _("Cannot validate the mandate '%s' because it is not " - "attached to a bank account.") - % mandate.unique_mandate_reference) - - if (mandate.signature_date and mandate.last_debit_date and - mandate.signature_date > mandate.last_debit_date): - raise orm.except_orm( - _('Error:'), - _("The mandate '%s' can't have a date of last debit " - "before the date of signature.") - % mandate.unique_mandate_reference) - if (mandate.type == 'recurrent' - and not mandate.recurrent_sequence_type): - raise orm.except_orm( - _('Error:'), - _("The recurrent mandate '%s' must have a sequence type.") - % mandate.unique_mandate_reference) - if (mandate.type == 'recurrent' and not mandate.sepa_migrated - and mandate.recurrent_sequence_type != 'first'): - raise orm.except_orm( - _('Error:'), - _("The recurrent mandate '%s' which is not marked as " - "'Migrated to SEPA' must have its recurrent sequence " - "type set to 'First'.") - % mandate.unique_mandate_reference) - if (mandate.type == 'recurrent' and not mandate.sepa_migrated - and not mandate.original_mandate_identification): - raise orm.except_orm( - _('Error:'), - _("You must set the 'Original Mandate Identification' " - "on the recurrent mandate '%s' which is not marked " - "as 'Migrated to SEPA'.") - % mandate.unique_mandate_reference) - return True - - _constraints = [ - (_check_sdd_mandate, "Error msg in raise", [ - 'last_debit_date', 'signature_date', 'state', 'partner_bank_id', - 'type', 'recurrent_sequence_type', 'sepa_migrated', - 'original_mandate_identification', - ]), - ] - - def mandate_type_change(self, cr, uid, ids, type): - if type == 'recurrent': - recurrent_sequence_type = 'first' - else: - recurrent_sequence_type = False - res = {'value': {'recurrent_sequence_type': recurrent_sequence_type}} - return res - - def mandate_partner_bank_change( - self, cr, uid, ids, partner_bank_id, type, recurrent_sequence_type, - last_debit_date, state): - res = {'value': {}} - if partner_bank_id: - partner_bank_read = self.pool['res.partner.bank'].read( - cr, uid, partner_bank_id, ['partner_id'])['partner_id'] - if partner_bank_read: - res['value']['partner_id'] = partner_bank_read[0] - if (state == 'valid' and partner_bank_id - and type == 'recurrent' - and recurrent_sequence_type != 'first'): - res['value']['recurrent_sequence_type'] = 'first' - res['warning'] = { - 'title': _('Mandate update'), - 'message': _( - "As you changed the bank account attached to this " - "mandate, the 'Sequence Type' has been set back to " - "'First'."), - } - return res - - def validate(self, cr, uid, ids, context=None): - to_validate_ids = [] - for mandate in self.browse(cr, uid, ids, context=context): - assert mandate.state == 'draft', 'Mandate should be in draft state' - to_validate_ids.append(mandate.id) - self.write( - cr, uid, to_validate_ids, {'state': 'valid'}, context=context) - return True - - def cancel(self, cr, uid, ids, context=None): - to_cancel_ids = [] - for mandate in self.browse(cr, uid, ids, context=context): - assert mandate.state in ('draft', 'valid'),\ - 'Mandate should be in draft or valid state' - to_cancel_ids.append(mandate.id) - self.write( - cr, uid, to_cancel_ids, {'state': 'cancel'}, context=context) - return True - - def back2draft(self, cr, uid, ids, context=None): - to_draft_ids = [] - for mandate in self.browse(cr, uid, ids, context=context): - assert mandate.state == 'cancel',\ - 'Mandate should be in cancel state' - to_draft_ids.append(mandate.id) - self.write( - cr, uid, to_draft_ids, {'state': 'draft'}, context=context) - return True - - def _sdd_mandate_set_state_to_expired(self, cr, uid, context=None): - logger.info('Searching for SDD Mandates that must be set to Expired') - expire_limit_date = datetime.today() + \ - relativedelta(months=-NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY) - expire_limit_date_str = expire_limit_date.strftime('%Y-%m-%d') - expired_mandate_ids = self.search(cr, uid, [ - '|', - ('last_debit_date', '=', False), - ('last_debit_date', '<=', expire_limit_date_str), - ('state', '=', 'valid'), - ('signature_date', '<=', expire_limit_date_str), - ], context=context) - if expired_mandate_ids: - self.write( - cr, uid, expired_mandate_ids, {'state': 'expired'}, - context=context) - logger.info( - 'The following SDD Mandate IDs has been set to expired: %s' - % expired_mandate_ids) - else: - logger.info('0 SDD Mandates must be set to Expired') - return True diff --git a/account_banking_sepa_direct_debit/security/ir.model.access.csv b/account_banking_sepa_direct_debit/security/ir.model.access.csv index cf78ffb59..0cd579511 100644 --- a/account_banking_sepa_direct_debit/security/ir.model.access.csv +++ b/account_banking_sepa_direct_debit/security/ir.model.access.csv @@ -1,4 +1,2 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_banking_export_sdd","Full access on banking.export.sdd","model_banking_export_sdd","account_payment.group_account_payment",1,1,1,1 -"access_sdd_mandate","Full access on sdd.mandate","model_sdd_mandate","account_payment.group_account_payment",1,1,1,1 -"access_sdd_mandate_read","Read access on sdd.mandate","model_sdd_mandate","base.group_user",1,0,0,0 diff --git a/account_banking_sepa_direct_debit/views/account_banking_mandate_view.xml b/account_banking_sepa_direct_debit/views/account_banking_mandate_view.xml new file mode 100644 index 000000000..eba8ae28b --- /dev/null +++ b/account_banking_sepa_direct_debit/views/account_banking_mandate_view.xml @@ -0,0 +1,117 @@ + + + + + + + sdd.mandate.form + account.banking.mandate + + + + + + + + + + + + + + + + + sdd.mandate.tree + account.banking.mandate + + + + + + + + + + sdd.mandate.search + account.banking.mandate + + + + + + + + + + + SEPA Direct Debit Mandates + account.banking.mandate + form + tree,form + +

+ Click to create a new SEPA Direct Debit Mandate. +

+ A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account. +

+
+
+ + + + + sdd.mandate.res.partner.bank.tree + res.partner.bank + + + + SDD Mandates + + + + + + sdd.mandate.partner.form + res.partner + + + + SDD Mandates + + + + + + Sequence Type set to First + account.banking.mandate + + Sequence Type set to First + + + + Sequence Type set to Recurring + account.banking.mandate + + Sequence Type set to Recurring + + + + Sequence Type set to Final + account.banking.mandate + + Sequence Type set to Final + + +
+
diff --git a/account_banking_sepa_direct_debit/views/sdd_mandate_view.xml b/account_banking_sepa_direct_debit/views/sdd_mandate_view.xml deleted file mode 100644 index 4388bd314..000000000 --- a/account_banking_sepa_direct_debit/views/sdd_mandate_view.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - sdd.mandate.form - sdd.mandate - -
-
-
- -
-

- -

-
- - - - - - - - - - - - - - - - -
-
- - -
-
-
-
- - - sdd.mandate.tree - sdd.mandate - - - - - - - - - - - - - - - sdd.mandate.search - sdd.mandate - - - - - - - - - - - - - - - SEPA Direct Debit Mandates - sdd.mandate - form - tree,form - -

- Click to create a new SEPA Direct Debit Mandate. -

- A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account. -

-
-
- - - - - - Mandate Validated - sdd.mandate - - SEPA Direct Debit Mandate Validated - - - - Mandate Expired - sdd.mandate - - SEPA Direct Debit Mandate has Expired - - - - Mandate Cancelled - sdd.mandate - - SEPA Direct Debit Mandate Cancelled - - - - Sequence Type set to First - sdd.mandate - - Sequence Type set to First - - - - Sequence Type set to Recurring - sdd.mandate - - Sequence Type set to Recurring - - - - Sequence Type set to Final - sdd.mandate - - Sequence Type set to Final - - -
-
diff --git a/account_payment_partner/i18n/fr.po b/account_payment_partner/i18n/fr.po new file mode 100644 index 000000000..ca26e532d --- /dev/null +++ b/account_payment_partner/i18n/fr.po @@ -0,0 +1,57 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-06-09 23:22+0000\n" +"PO-Revision-Date: 2014-06-09 23:22+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_partner +#: field:res.partner,customer_payment_mode:0 +msgid "Customer Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Partner" +msgstr "" + +#. module: account_payment_partner +#: field:account.invoice,payment_mode_id:0 +msgid "Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: help:res.partner,customer_payment_mode:0 +msgid "Select the default payment mode for this customer." +msgstr "" + +#. module: account_payment_partner +#: help:res.partner,supplier_payment_mode:0 +msgid "Select the default payment mode for this supplier." +msgstr "" + +#. module: account_payment_partner +#: field:res.partner,supplier_payment_mode:0 +msgid "Supplier Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_payment_order_create +msgid "payment.order.create" +msgstr "" + From 85e4d22de36d7ccb63444c49170ceeb29c62fa24 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 9 Oct 2014 09:57:05 +0200 Subject: [PATCH 09/21] [FIX] account_banking_mandate dependency --- account_banking_sepa_direct_debit/__openerp__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/account_banking_sepa_direct_debit/__openerp__.py b/account_banking_sepa_direct_debit/__openerp__.py index c5fc42fb4..160e52605 100644 --- a/account_banking_sepa_direct_debit/__openerp__.py +++ b/account_banking_sepa_direct_debit/__openerp__.py @@ -28,7 +28,11 @@ 'website': 'http://www.akretion.com', 'contributors': ['Pedro M. Baeza '], 'category': 'Banking addons', - 'depends': ['account_direct_debit', 'account_banking_pain_base'], + 'depends': [ + 'account_direct_debit', + 'account_banking_pain_base', + 'account_banking_mandate', + ], 'external_dependencies': { 'python': ['unidecode', 'lxml'], }, From 38e80516cd944f68520e524bff6131a133ec7256 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 10 Oct 2014 20:09:17 +0200 Subject: [PATCH 10/21] [FIX] replace old sdd.mandate referencess --- .../models/payment_line.py | 2 +- .../models/banking_export_sdd.py | 3 + .../wizard/export_sdd.py | 60 +++++++++---------- account_direct_debit/__init__.py | 1 + .../wizard/payment_order_create.py | 14 +++-- 5 files changed, 43 insertions(+), 37 deletions(-) diff --git a/account_banking_mandate/models/payment_line.py b/account_banking_mandate/models/payment_line.py index 9c6c00dce..43e0c07a9 100644 --- a/account_banking_mandate/models/payment_line.py +++ b/account_banking_mandate/models/payment_line.py @@ -60,7 +60,7 @@ class PaymentLine(models.Model): @api.one @api.constrains('mandate_id', 'bank_id') - def _check_mandate_bank_link(self, cr, uid, ids): + def _check_mandate_bank_link(self): if (self.mandate_id and self.bank_id and self.mandate_id.partner_bank_id.id != self.bank_id.id): diff --git a/account_banking_sepa_direct_debit/models/banking_export_sdd.py b/account_banking_sepa_direct_debit/models/banking_export_sdd.py index 80f5f4a13..4bcd49367 100644 --- a/account_banking_sepa_direct_debit/models/banking_export_sdd.py +++ b/account_banking_sepa_direct_debit/models/banking_export_sdd.py @@ -34,10 +34,13 @@ class BankingExportSdd(models.Model): @api.one def _generate_filename(self): filename = '' + # FIXME : we never enter inside the IF to give a good filename if self.payment_order_ids: ref = self.payment_order_ids[0].reference label = unidecode(ref.replace('/', '-')) if ref else 'error' filename = 'sdd_%s.xml' % label + else: + filename = 'sdd.xml' self.filename = filename payment_order_ids = fields.Many2many( diff --git a/account_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py index 60dce7653..79ead28b8 100644 --- a/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -93,7 +93,7 @@ class banking_export_sdd_wizard(orm.TransientModel): previous_bank = False payline_ids = payline_obj.search( cr, uid, [ - ('sdd_mandate_id', '=', payline.sdd_mandate_id.id), + ('mandate_id', '=', payline.mandate_id.id), ('bank_id', '!=', payline.bank_id.id), ], context=context) @@ -188,23 +188,23 @@ class banking_export_sdd_wizard(orm.TransientModel): requested_date = payment_order.date_scheduled or today else: requested_date = today - if not line.sdd_mandate_id: + if not line.mandate_id: raise orm.except_orm( _('Error:'), _("Missing SEPA Direct Debit mandate on the payment " "line with partner '%s' and Invoice ref '%s'.") % (line.partner_id.name, line.ml_inv_ref.number)) - scheme = line.sdd_mandate_id.scheme - if line.sdd_mandate_id.state != 'valid': + scheme = line.mandate_id.scheme + if line.mandate_id.state != 'valid': raise orm.except_orm( _('Error:'), _("The SEPA Direct Debit mandate with reference '%s' " "for partner '%s' has expired.") - % (line.sdd_mandate_id.unique_mandate_reference, - line.sdd_mandate_id.partner_id.name)) - if line.sdd_mandate_id.type == 'oneoff': - if not line.sdd_mandate_id.last_debit_date: + % (line.mandate_id.unique_mandate_reference, + line.mandate_id.partner_id.name)) + if line.mandate_id.type == 'oneoff': + if not line.mandate_id.last_debit_date: seq_type = 'OOFF' else: raise orm.except_orm( @@ -213,17 +213,17 @@ class banking_export_sdd_wizard(orm.TransientModel): "'%s' has type set to 'One-Off' and it has a " "last debit date set to '%s', so we can't use " "it.") - % (line.sdd_mandate_id.unique_mandate_reference, - line.sdd_mandate_id.partner_id.name, - line.sdd_mandate_id.last_debit_date)) - elif line.sdd_mandate_id.type == 'recurrent': + % (line.mandate_id.unique_mandate_reference, + line.mandate_id.partner_id.name, + line.mandate_id.last_debit_date)) + elif line.mandate_id.type == 'recurrent': seq_type_map = { 'recurring': 'RCUR', 'first': 'FRST', 'final': 'FNAL', } seq_type_label = \ - line.sdd_mandate_id.recurrent_sequence_type + line.mandate_id.recurrent_sequence_type assert seq_type_label is not False seq_type = seq_type_map[seq_type_label] key = (requested_date, priority, seq_type, scheme) @@ -306,22 +306,22 @@ class banking_export_sdd_wizard(orm.TransientModel): mandate_related_info_2_47, 'MndtId') mandate_identification_2_48.text = self._prepare_field( cr, uid, 'Unique Mandate Reference', - 'line.sdd_mandate_id.unique_mandate_reference', + 'line.mandate_id.unique_mandate_reference', {'line': line}, 35, gen_args=gen_args, context=context) mandate_signature_date_2_49 = etree.SubElement( mandate_related_info_2_47, 'DtOfSgntr') mandate_signature_date_2_49.text = self._prepare_field( cr, uid, 'Mandate Signature Date', - 'line.sdd_mandate_id.signature_date', + 'line.mandate_id.signature_date', {'line': line}, 10, gen_args=gen_args, context=context) if sequence_type == 'FRST' and ( - line.sdd_mandate_id.last_debit_date or - not line.sdd_mandate_id.sepa_migrated): + line.mandate_id.last_debit_date or + not line.mandate_id.sepa_migrated): previous_bank = self._get_previous_bank( cr, uid, line, context=context) - if previous_bank or not line.sdd_mandate_id.sepa_migrated: + if previous_bank or not line.mandate_id.sepa_migrated: amendment_indicator_2_50 = etree.SubElement( mandate_related_info_2_47, 'AmdmntInd') amendment_indicator_2_50.text = 'true' @@ -362,13 +362,13 @@ class banking_export_sdd_wizard(orm.TransientModel): ori_debtor_agent_other, 'Id') ori_debtor_agent_other_id.text = 'SMNDA' # SMNDA = Same Mandate New Debtor Agent - elif not line.sdd_mandate_id.sepa_migrated: + elif not line.mandate_id.sepa_migrated: ori_mandate_identification_2_52 = etree.SubElement( amendment_info_details_2_51, 'OrgnlMndtId') ori_mandate_identification_2_52.text = \ self._prepare_field( cr, uid, 'Original Mandate Identification', - 'line.sdd_mandate_id.' + 'line.mandate_id.' 'original_mandate_identification', {'line': line}, gen_args=gen_args, @@ -424,25 +424,25 @@ class banking_export_sdd_wizard(orm.TransientModel): context=context) for order in sepa_export.payment_order_ids: workflow.trg_validate(uid, 'payment.order', order.id, 'done', cr) - mandate_ids = [line.sdd_mandate_id.id for line in order.line_ids] - self.pool['sdd.mandate'].write( + mandate_ids = [line.mandate_id.id for line in order.line_ids] + self.pool['account.banking.mandate'].write( cr, uid, mandate_ids, {'last_debit_date': datetime.today().strftime('%Y-%m-%d')}, context=context) to_expire_ids = [] first_mandate_ids = [] for line in order.line_ids: - if line.sdd_mandate_id.type == 'oneoff': - to_expire_ids.append(line.sdd_mandate_id.id) - elif line.sdd_mandate_id.type == 'recurrent': - seq_type = line.sdd_mandate_id.recurrent_sequence_type + if line.mandate_id.type == 'oneoff': + to_expire_ids.append(line.mandate_id.id) + elif line.mandate_id.type == 'recurrent': + seq_type = line.mandate_id.recurrent_sequence_type if seq_type == 'final': - to_expire_ids.append(line.sdd_mandate_id.id) + to_expire_ids.append(line.mandate_id.id) elif seq_type == 'first': - first_mandate_ids.append(line.sdd_mandate_id.id) - self.pool['sdd.mandate'].write( + first_mandate_ids.append(line.mandate_id.id) + self.pool['account.banking.mandate'].write( cr, uid, to_expire_ids, {'state': 'expired'}, context=context) - self.pool['sdd.mandate'].write( + self.pool['account.banking.mandate'].write( cr, uid, first_mandate_ids, { 'recurrent_sequence_type': 'recurring', 'sepa_migrated': True, diff --git a/account_direct_debit/__init__.py b/account_direct_debit/__init__.py index 0650744f6..9b4296142 100644 --- a/account_direct_debit/__init__.py +++ b/account_direct_debit/__init__.py @@ -1 +1,2 @@ from . import models +from . import wizard diff --git a/account_direct_debit/wizard/payment_order_create.py b/account_direct_debit/wizard/payment_order_create.py index d69a4eb78..046860ab7 100644 --- a/account_direct_debit/wizard/payment_order_create.py +++ b/account_direct_debit/wizard/payment_order_create.py @@ -22,18 +22,20 @@ # ############################################################################## -from openerp.osv import orm +from openerp import models, api -class PaymentOrderCreate(orm.TransientModel): +class PaymentOrderCreate(models.TransientModel): _inherit = 'payment.order.create' - def extend_payment_order_domain( - self, cr, uid, payment_order, domain, context=None): + @api.model + def extend_payment_order_domain(self, payment_order, domain): super(PaymentOrderCreate, self).extend_payment_order_domain( - cr, uid, payment_order, domain, context=context) + payment_order, domain) if payment_order.payment_order_type == 'debit': - domain += [('account_id.type', '=', 'receivable'), + domain += ['|', + ('invoice', '=', False), ('invoice.state', '!=', 'debit_denied'), + ('account_id.type', '=', 'receivable'), ('amount_to_receive', '>', 0)] return True From dbdb02ef6eafdc52ea5fb28d9f9f1e2b1422d0ed Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 13 Oct 2014 12:16:16 +0200 Subject: [PATCH 11/21] [FIX] account_banking_mandate: Fix id get from Recordset --- account_banking_mandate/models/payment_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_banking_mandate/models/payment_line.py b/account_banking_mandate/models/payment_line.py index 43e0c07a9..5a975869f 100644 --- a/account_banking_mandate/models/payment_line.py +++ b/account_banking_mandate/models/payment_line.py @@ -55,7 +55,7 @@ class PaymentLine(models.Model): [('partner_bank_id', '=', partner_bank_id), ('state', '=', 'valid')]) if mandates: - vals['mandate_id'] = mandates.id + vals['mandate_id'] = mandates[0].id return super(PaymentLine, self).create(vals) @api.one From 9670136f6a9ac91d4db78a6e03dc267b012848e4 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 15 Oct 2014 01:24:09 +0200 Subject: [PATCH 12/21] [DEL] Remove unused files --- .../migrations/7.0.0.1.165/pre-migration.py | 33 ------------ .../migrations/7.0.2/post-migration.py | 39 -------------- .../migrations/7.0.2/pre-migration.py | 53 ------------------- account_payment_partner/models/partner.py | 44 --------------- 4 files changed, 169 deletions(-) delete mode 100644 account_banking_payment_export/migrations/7.0.0.1.165/pre-migration.py delete mode 100644 account_direct_debit/migrations/7.0.2/post-migration.py delete mode 100644 account_direct_debit/migrations/7.0.2/pre-migration.py delete mode 100644 account_payment_partner/models/partner.py diff --git a/account_banking_payment_export/migrations/7.0.0.1.165/pre-migration.py b/account_banking_payment_export/migrations/7.0.0.1.165/pre-migration.py deleted file mode 100644 index a420f05fd..000000000 --- a/account_banking_payment_export/migrations/7.0.0.1.165/pre-migration.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2014 Akretion (http://www.akretion.com/) -# @author: Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -def migrate(cr, version): - if not version: - return - cr.execute( - "UPDATE payment_line SET communication = communication2, " - "communication2 = null " - "FROM payment_order " - "WHERE payment_line.order_id = payment_order.id " - "AND payment_order.state in ('draft', 'open') " - "AND payment_line.state = 'normal' " - "AND communication2 is not null") diff --git a/account_direct_debit/migrations/7.0.2/post-migration.py b/account_direct_debit/migrations/7.0.2/post-migration.py deleted file mode 100644 index f5c72c672..000000000 --- a/account_direct_debit/migrations/7.0.2/post-migration.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2013 Therp BV (). -# -# All other contributions are (C) by their respective contributors -# -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -def migrate(cr, version): - if not version: - return - cr.execute( - """ - UPDATE payment_line - SET transit_move_line_id = banking_addons_61_debit_move_line_id - """) - cr.execute( - """ - ALTER TABLE "payment_line" - DROP COLUMN "banking_addons_61_debit_move_line_id" - """ - ) diff --git a/account_direct_debit/migrations/7.0.2/pre-migration.py b/account_direct_debit/migrations/7.0.2/pre-migration.py deleted file mode 100644 index 49c0db52f..000000000 --- a/account_direct_debit/migrations/7.0.2/pre-migration.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2013 Therp BV (). -# -# All other contributions are (C) by their respective contributors -# -# All Rights Reserved -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import logging -logger = logging.getLogger() - - -def rename_columns(cr, column_spec): - """ - Rename table columns. Taken from OpenUpgrade. - - :param column_spec: a hash with table keys, with lists of tuples as \ - values. Tuples consist of (old_name, new_name). - - """ - for table in column_spec.keys(): - for (old, new) in column_spec[table]: - logger.info("table %s, column %s: renaming to %s", table, old, new) - cr.execute('ALTER TABLE %s RENAME %s TO %s', (table, old, new,)) - cr.execute('DROP INDEX IF EXISTS "%s_%s_index"' % (table, old)) - - -def migrate(cr, version): - if not version: - return - - # rename field debit_move_line_id - rename_columns(cr, { - 'payment_line': [ - ('debit_move_line_id', 'banking_addons_61_debit_move_line_id'), - ] - }) diff --git a/account_payment_partner/models/partner.py b/account_payment_partner/models/partner.py deleted file mode 100644 index 4bfe4c787..000000000 --- a/account_payment_partner/models/partner.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Payment Partner module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields - - -class res_partner(orm.Model): - _inherit = 'res.partner' - - _columns = { - 'supplier_payment_mode': fields.property( - 'payment.mode', type='many2one', relation='payment.mode', - string='Supplier Payment Mode', view_load=True, - help="Select the default payment mode for this supplier."), - 'customer_payment_mode': fields.property( - 'payment.mode', type='many2one', relation='payment.mode', - string='Customer Payment Mode', view_load=True, - help="Select the default payment mode for this customer."), - } - - def _commercial_fields(self, cr, uid, context=None): - res = super(res_partner, self)._commercial_fields( - cr, uid, context=context) - res += ['supplier_payment_mode', 'customer_payment_mode'] - return res From 039e7f7de6cdf34ddff68be7b31a377a6f2df1ad Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 21 Oct 2014 01:53:12 +0200 Subject: [PATCH 13/21] [FIX] account_banking_sepa_direct_debit: Restore scheme field in mandate view --- .../views/account_banking_mandate_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/account_banking_sepa_direct_debit/views/account_banking_mandate_view.xml b/account_banking_sepa_direct_debit/views/account_banking_mandate_view.xml index eba8ae28b..a2065dc75 100644 --- a/account_banking_sepa_direct_debit/views/account_banking_mandate_view.xml +++ b/account_banking_sepa_direct_debit/views/account_banking_mandate_view.xml @@ -18,6 +18,7 @@ + From 2a4bf7d859e04e6a28d86ef7c3a7dee0d65df9dd Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 21 Oct 2014 01:57:33 +0200 Subject: [PATCH 14/21] [FIX] account_banking_mandate: partner_id field correctly related --- account_banking_mandate/models/account_banking_mandate.py | 4 ++-- .../views/account_banking_mandate_view.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/account_banking_mandate/models/account_banking_mandate.py b/account_banking_mandate/models/account_banking_mandate.py index f372f1192..e8aaa89d9 100644 --- a/account_banking_mandate/models/account_banking_mandate.py +++ b/account_banking_mandate/models/account_banking_mandate.py @@ -56,8 +56,8 @@ class AccountBankingMandate(models.Model): comodel_name='res.partner.bank', string='Bank Account', track_visibility='onchange') partner_id = fields.Many2one( - comodel_name='res.partner', relation='partner_bank_id.partner_id', - string='Partner', readonly=True, store=True) + comodel_name='res.partner', related='partner_bank_id.partner_id', + string='Partner', store=True) company_id = fields.Many2one( comodel_name='res.company', string='Company', required=True, default=lambda self: self.env['res.company']._company_default_get( diff --git a/account_banking_mandate/views/account_banking_mandate_view.xml b/account_banking_mandate/views/account_banking_mandate_view.xml index fbb942b10..6435da6b0 100644 --- a/account_banking_mandate/views/account_banking_mandate_view.xml +++ b/account_banking_mandate/views/account_banking_mandate_view.xml @@ -31,7 +31,7 @@ - + From 10757d8ab492ebf1c084ad84320172f616f1a0a3 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 21 Oct 2014 09:51:40 +0200 Subject: [PATCH 15/21] [FIX] Uncaught flake8 errors --- account_banking_pain_base/__openerp__.py | 2 +- .../models/banking_export_pain.py | 21 ++-- .../models/payment_line.py | 11 +-- account_banking_payment_export/__openerp__.py | 4 +- .../wizard/payment_order_create.py | 2 +- .../__openerp__.py | 2 +- .../wizard/export_sepa.py | 43 ++++---- .../models/res_company.py | 2 +- .../wizard/export_sdd.py | 97 ++++++++----------- .../models/account_move_line.py | 3 +- account_direct_debit/models/payment_line.py | 44 ++++----- .../models/payment_order_create.py | 7 +- 12 files changed, 107 insertions(+), 131 deletions(-) diff --git a/account_banking_pain_base/__openerp__.py b/account_banking_pain_base/__openerp__.py index e7b199213..0d8030dc6 100644 --- a/account_banking_pain_base/__openerp__.py +++ b/account_banking_pain_base/__openerp__.py @@ -31,7 +31,7 @@ 'depends': ['account_banking_payment_export'], 'external_dependencies': { 'python': ['unidecode', 'lxml'], - }, + }, 'data': [ 'views/payment_line_view.xml', 'views/payment_mode_view.xml', diff --git a/account_banking_pain_base/models/banking_export_pain.py b/account_banking_pain_base/models/banking_export_pain.py index 17961a29a..0a9e3713a 100644 --- a/account_banking_pain_base/models/banking_export_pain.py +++ b/account_banking_pain_base/models/banking_export_pain.py @@ -37,8 +37,8 @@ class BankingExportPain(orm.AbstractModel): _name = 'banking.export.pain' def _validate_iban(self, cr, uid, iban, context=None): - '''if IBAN is valid, returns IBAN - if IBAN is NOT valid, raises an error message''' + """if IBAN is valid, returns IBAN + if IBAN is NOT valid, raises an error message""" partner_bank_obj = self.pool.get('res.partner.bank') if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context): return iban.replace(' ', '') @@ -162,7 +162,7 @@ class BankingExportPain(orm.AbstractModel): 'res_model': self._name, 'res_id': ids[0], 'target': 'new', - } + } return action def generate_group_header_block( @@ -283,8 +283,8 @@ class BankingExportPain(orm.AbstractModel): def generate_party_agent( self, cr, uid, parent_node, party_type, party_type_label, order, party_name, iban, bic, eval_ctx, gen_args, context=None): - '''Generate the piece of the XML file corresponding to BIC - This code is mutualized between TRF and DD''' + """Generate the piece of the XML file corresponding to BIC + This code is mutualized between TRF and DD""" assert order in ('B', 'C'), "Order can be 'B' or 'C'" try: bic = self._prepare_field( @@ -324,8 +324,8 @@ class BankingExportPain(orm.AbstractModel): def generate_party_block( self, cr, uid, parent_node, party_type, order, name, iban, bic, eval_ctx, gen_args, context=None): - '''Generate the piece of the XML file corresponding to Name+IBAN+BIC - This code is mutualized between TRF and DD''' + """Generate the piece of the XML file corresponding to Name+IBAN+BIC + This code is mutualized between TRF and DD""" assert order in ('B', 'C'), "Order can be 'B' or 'C'" if party_type == 'Cdtr': party_type_label = 'Creditor' @@ -385,7 +385,7 @@ class BankingExportPain(orm.AbstractModel): _('Error:'), _("Missing 'Structured Communication Type' on payment " "line with reference '%s'.") - % (line.name)) + % line.name) remittance_info_structured_2_100 = etree.SubElement( remittance_info_2_91, 'Strd') creditor_ref_information_2_120 = etree.SubElement( @@ -425,9 +425,8 @@ class BankingExportPain(orm.AbstractModel): def generate_creditor_scheme_identification( self, cr, uid, parent_node, identification, identification_label, eval_ctx, scheme_name_proprietary, gen_args, context=None): - csi_id = etree.SubElement( - parent_node, 'Id') - csi_privateid = csi_id = etree.SubElement(csi_id, 'PrvtId') + csi_id = etree.SubElement(parent_node, 'Id') + csi_privateid = etree.SubElement(csi_id, 'PrvtId') csi_other = etree.SubElement(csi_privateid, 'Othr') csi_other_id = etree.SubElement(csi_other, 'Id') csi_other_id.text = self._prepare_field( diff --git a/account_banking_pain_base/models/payment_line.py b/account_banking_pain_base/models/payment_line.py index 0dffbcf42..0598710e1 100644 --- a/account_banking_pain_base/models/payment_line.py +++ b/account_banking_pain_base/models/payment_line.py @@ -23,19 +23,18 @@ from openerp.osv import orm, fields -class payment_line(orm.Model): +class PaymentLine(orm.Model): _inherit = 'payment.line' def _get_struct_communication_types(self, cr, uid, context=None): return [('ISO', 'ISO')] _columns = { - 'priority': fields.selection([ - ('NORM', 'Normal'), - ('HIGH', 'High'), - ], 'Priority', + 'priority': fields.selection( + [('NORM', 'Normal'), + ('HIGH', 'High')], 'Priority', help="This field will be used as the 'Instruction Priority' in " - "the generated PAIN file."), + "the generated PAIN file."), # Update size from 64 to 140, because PAIN allows 140 caracters 'communication': fields.char( 'Communication', size=140, required=True, diff --git a/account_banking_payment_export/__openerp__.py b/account_banking_payment_export/__openerp__.py index bde925e2c..e7a10cc13 100644 --- a/account_banking_payment_export/__openerp__.py +++ b/account_banking_payment_export/__openerp__.py @@ -34,7 +34,7 @@ 'depends': [ 'account_payment', 'base_iban', # for manual_bank_tranfer - ], + ], 'conflicts': [ # lp:account-payment/account_payment_extension also adds # a type field to payment.mode, with a very similar purpose. @@ -44,7 +44,7 @@ # Proposal to resolve: make account_payment_extension depend # on the present account_banking_payment_export module. 'account_payment_extension', - ], + ], 'data': [ 'view/account_payment.xml', 'view/payment_mode.xml', diff --git a/account_banking_payment_export/wizard/payment_order_create.py b/account_banking_payment_export/wizard/payment_order_create.py index 0a34c021f..5843dd08b 100644 --- a/account_banking_payment_export/wizard/payment_order_create.py +++ b/account_banking_payment_export/wizard/payment_order_create.py @@ -38,7 +38,7 @@ class PaymentOrderCreate(models.TransientModel): context = self.env.context if ('entries' in fields and context.get('line_ids') and context.get('populate_results')): - res.update({'entries': context['line_ids']}) + res.update({'entries': context['line_ids']}) return res @api.model diff --git a/account_banking_sepa_credit_transfer/__openerp__.py b/account_banking_sepa_credit_transfer/__openerp__.py index 89b56c189..9a4f4b0af 100644 --- a/account_banking_sepa_credit_transfer/__openerp__.py +++ b/account_banking_sepa_credit_transfer/__openerp__.py @@ -31,7 +31,7 @@ 'depends': ['account_banking_pain_base'], 'external_dependencies': { 'python': ['unidecode', 'lxml'], - }, + }, 'data': [ 'views/account_banking_sepa_view.xml', 'wizard/export_sepa_view.xml', diff --git a/account_banking_sepa_credit_transfer/wizard/export_sepa.py b/account_banking_sepa_credit_transfer/wizard/export_sepa.py index f5d3324c1..94b2004a3 100644 --- a/account_banking_sepa_credit_transfer/wizard/export_sepa.py +++ b/account_banking_sepa_credit_transfer/wizard/export_sepa.py @@ -27,36 +27,35 @@ from openerp import workflow from lxml import etree -class banking_export_sepa_wizard(orm.TransientModel): +class BankingExportSepaWizard(orm.TransientModel): _name = 'banking.export.sepa.wizard' _inherit = ['banking.export.pain'] _description = 'Export SEPA Credit Transfer File' _columns = { - 'state': fields.selection([ - ('create', 'Create'), - ('finish', 'Finish'), - ], 'State', readonly=True), + 'state': fields.selection([('create', 'Create'), + ('finish', 'Finish')], 'State', + readonly=True), 'batch_booking': fields.boolean( 'Batch Booking', help="If true, the bank statement will display only one debit " "line for all the wire transfers of the SEPA XML file ; if " "false, the bank statement will display one debit line per wire " "transfer of the SEPA XML file."), - 'charge_bearer': fields.selection([ - ('SLEV', 'Following Service Level'), - ('SHAR', 'Shared'), - ('CRED', 'Borne by Creditor'), - ('DEBT', 'Borne by Debtor'), - ], 'Charge Bearer', required=True, + 'charge_bearer': fields.selection( + [('SLEV', 'Following Service Level'), + ('SHAR', 'Shared'), + ('CRED', 'Borne by Creditor'), + ('DEBT', 'Borne by Debtor')], 'Charge Bearer', required=True, help="Following service level : transaction charges are to be " - "applied following the rules agreed in the service level and/or " - "scheme (SEPA Core messages must use this). Shared : transaction " - "charges on the debtor side are to be borne by the debtor, " - "transaction charges on the creditor side are to be borne by " - "the creditor. Borne by creditor : all transaction charges are " - "to be borne by the creditor. Borne by debtor : all transaction " - "charges are to be borne by the debtor."), + "applied following the rules agreed in the service level " + "and/or scheme (SEPA Core messages must use this). Shared : " + "transaction charges on the debtor side are to be borne by " + "the debtor, transaction charges on the creditor side are to " + "be borne by the creditor. Borne by creditor : all " + "transaction charges are to be borne by the creditor. Borne " + "by debtor : all transaction charges are to be borne by the " + "debtor."), 'nb_transactions': fields.related( 'file_id', 'nb_transactions', type='integer', string='Number of Transactions', readonly=True), @@ -73,19 +72,19 @@ class banking_export_sepa_wizard(orm.TransientModel): 'payment_order_ids': fields.many2many( 'payment.order', 'wiz_sepa_payorders_rel', 'wizard_id', 'payment_order_id', 'Payment Orders', readonly=True), - } + } _defaults = { 'charge_bearer': 'SLEV', 'state': 'create', - } + } def create(self, cr, uid, vals, context=None): payment_order_ids = context.get('active_ids', []) vals.update({ 'payment_order_ids': [[6, 0, payment_order_ids]], }) - return super(banking_export_sepa_wizard, self).create( + return super(BankingExportSepaWizard, self).create( cr, uid, vals, context=context) def create_sepa(self, cr, uid, ids, context=None): @@ -143,7 +142,7 @@ class banking_export_sepa_wizard(orm.TransientModel): pain_ns = { 'xsi': 'http://www.w3.org/2001/XMLSchema-instance', None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor, - } + } xml_root = etree.Element('Document', nsmap=pain_ns) pain_root = etree.SubElement(xml_root, root_xml_tag) pain_03_to_05 = \ diff --git a/account_banking_sepa_direct_debit/models/res_company.py b/account_banking_sepa_direct_debit/models/res_company.py index 327edc401..46f98bbc2 100644 --- a/account_banking_sepa_direct_debit/models/res_company.py +++ b/account_banking_sepa_direct_debit/models/res_company.py @@ -62,7 +62,7 @@ class ResCompany(models.Model): after_replacement = '' for char in before_replacement: if char.isalpha(): - after_replacement += str(ord(char)-87) + after_replacement += str(ord(char) - 87) else: after_replacement += char logger.debug( diff --git a/account_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py index 79ead28b8..aa46ff8b1 100644 --- a/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -28,35 +28,34 @@ from datetime import datetime from lxml import etree -class banking_export_sdd_wizard(orm.TransientModel): +class BankingExportSddWizard(orm.TransientModel): _name = 'banking.export.sdd.wizard' _inherit = ['banking.export.pain'] _description = 'Export SEPA Direct Debit File' _columns = { - 'state': fields.selection([ - ('create', 'Create'), - ('finish', 'Finish'), - ], 'State', readonly=True), + 'state': fields.selection( + [('create', 'Create'), + ('finish', 'Finish')], 'State', readonly=True), 'batch_booking': fields.boolean( 'Batch Booking', help="If true, the bank statement will display only one credit " "line for all the direct debits of the SEPA file ; if false, " "the bank statement will display one credit line per direct " "debit of the SEPA file."), - 'charge_bearer': fields.selection([ - ('SLEV', 'Following Service Level'), - ('SHAR', 'Shared'), - ('CRED', 'Borne by Creditor'), - ('DEBT', 'Borne by Debtor'), - ], 'Charge Bearer', required=True, + 'charge_bearer': fields.selection( + [('SLEV', 'Following Service Level'), + ('SHAR', 'Shared'), + ('CRED', 'Borne by Creditor'), + ('DEBT', 'Borne by Debtor')], 'Charge Bearer', required=True, help="Following service level : transaction charges are to be " - "applied following the rules agreed in the service level and/or " - "scheme (SEPA Core messages must use this). Shared : transaction " - "charges on the creditor side are to be borne by the creditor, " - "transaction charges on the debtor side are to be borne by the " - "debtor. Borne by creditor : all transaction charges are to be " - "borne by the creditor. Borne by debtor : all transaction " - "charges are to be borne by the debtor."), + "applied following the rules agreed in the service level " + "and/or scheme (SEPA Core messages must use this). Shared : " + "transaction charges on the creditor side are to be borne " + "by the creditor, transaction charges on the debtor side are " + "to be borne by the debtor. Borne by creditor : all " + "transaction charges are to be borne by the creditor. Borne " + "by debtor : all transaction charges are to be borne by the " + "debtor."), 'nb_transactions': fields.related( 'file_id', 'nb_transactions', type='integer', string='Number of Transactions', readonly=True), @@ -73,19 +72,19 @@ class banking_export_sdd_wizard(orm.TransientModel): 'payment_order_ids': fields.many2many( 'payment.order', 'wiz_sdd_payorders_rel', 'wizard_id', 'payment_order_id', 'Payment Orders', readonly=True), - } + } _defaults = { 'charge_bearer': 'SLEV', 'state': 'create', - } + } def create(self, cr, uid, vals, context=None): payment_order_ids = context.get('active_ids', []) vals.update({ 'payment_order_ids': [[6, 0, payment_order_ids]], }) - return super(banking_export_sdd_wizard, self).create( + return super(BankingExportSddWizard, self).create( cr, uid, vals, context=context) def _get_previous_bank(self, cr, uid, payline, context=None): @@ -115,9 +114,7 @@ class banking_export_sdd_wizard(orm.TransientModel): return previous_bank def create_sepa(self, cr, uid, ids, context=None): - ''' - Creates the SEPA Direct Debit file. That's the important code ! - ''' + """Creates the SEPA Direct Debit file. That's the important code !""" sepa_export = self.browse(cr, uid, ids[0], context=context) pain_flavor = sepa_export.payment_order_ids[0].mode.type.code @@ -139,10 +136,9 @@ class banking_export_sdd_wizard(orm.TransientModel): raise orm.except_orm( _('Error:'), _("Payment Type Code '%s' is not supported. The only " - "Payment Type Code supported for SEPA Direct Debit " - "are 'pain.008.001.02', 'pain.008.001.03' and " - "'pain.008.001.04'.") % pain_flavor) - + "Payment Type Code supported for SEPA Direct Debit are " + "'pain.008.001.02', 'pain.008.001.03' and " + "'pain.008.001.04'.") % pain_flavor) gen_args = { 'bic_xml_tag': bic_xml_tag, 'name_maxsize': name_maxsize, @@ -154,20 +150,16 @@ class banking_export_sdd_wizard(orm.TransientModel): 'pain_xsd_file': 'account_banking_sepa_direct_debit/data/%s.xsd' % pain_flavor, } - pain_ns = { 'xsi': 'http://www.w3.org/2001/XMLSchema-instance', None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor, - } - + } xml_root = etree.Element('Document', nsmap=pain_ns) pain_root = etree.SubElement(xml_root, root_xml_tag) - # A. Group header group_header_1_0, nb_of_transactions_1_6, control_sum_1_7 = \ self.generate_group_header_block( cr, uid, pain_root, gen_args, context=context) - transactions_count_1_6 = 0 total_amount = 0.0 amount_control_sum_1_7 = 0.0 @@ -192,36 +184,35 @@ class banking_export_sdd_wizard(orm.TransientModel): raise orm.except_orm( _('Error:'), _("Missing SEPA Direct Debit mandate on the payment " - "line with partner '%s' and Invoice ref '%s'.") + "line with partner '%s' and Invoice ref '%s'.") % (line.partner_id.name, - line.ml_inv_ref.number)) + line.ml_inv_ref.number)) scheme = line.mandate_id.scheme if line.mandate_id.state != 'valid': raise orm.except_orm( _('Error:'), _("The SEPA Direct Debit mandate with reference '%s' " - "for partner '%s' has expired.") + "for partner '%s' has expired.") % (line.mandate_id.unique_mandate_reference, - line.mandate_id.partner_id.name)) + line.mandate_id.partner_id.name)) if line.mandate_id.type == 'oneoff': - if not line.mandate_id.last_debit_date: - seq_type = 'OOFF' - else: + seq_type = 'OOFF' + if line.mandate_id.last_debit_date: raise orm.except_orm( _('Error:'), _("The mandate with reference '%s' for partner " - "'%s' has type set to 'One-Off' and it has a " - "last debit date set to '%s', so we can't use " - "it.") + "'%s' has type set to 'One-Off' and it has a " + "last debit date set to '%s', so we can't use " + "it.") % (line.mandate_id.unique_mandate_reference, - line.mandate_id.partner_id.name, - line.mandate_id.last_debit_date)) + line.mandate_id.partner_id.name, + line.mandate_id.last_debit_date)) elif line.mandate_id.type == 'recurrent': seq_type_map = { 'recurring': 'RCUR', 'first': 'FRST', 'final': 'FNAL', - } + } seq_type_label = \ line.mandate_id.recurrent_sequence_type assert seq_type_label is not False @@ -261,10 +252,8 @@ class banking_export_sdd_wizard(orm.TransientModel): 'sepa_export.payment_order_ids[0].mode.bank_id.bank.bic', {'sepa_export': sepa_export}, gen_args, context=context) - charge_bearer_2_24 = etree.SubElement(payment_info_2_0, 'ChrgBr') charge_bearer_2_24.text = sepa_export.charge_bearer - creditor_scheme_identification_2_27 = etree.SubElement( payment_info_2_0, 'CdtrSchmeId') self.generate_creditor_scheme_identification( @@ -273,7 +262,6 @@ class banking_export_sdd_wizard(orm.TransientModel): 'sepa_creditor_identifier', 'SEPA Creditor Identifier', {'sepa_export': sepa_export}, 'SEPA', gen_args, context=context) - transactions_count_2_4 = 0 amount_control_sum_2_5 = 0.0 for line in lines: @@ -404,20 +392,17 @@ class banking_export_sdd_wizard(orm.TransientModel): gen_args, context=context) def cancel_sepa(self, cr, uid, ids, context=None): - ''' - Cancel the SEPA file: just drop the file - ''' + """Cancel the SEPA file: just drop the file""" sepa_export = self.browse(cr, uid, ids[0], context=context) self.pool.get('banking.export.sdd').unlink( cr, uid, sepa_export.file_id.id, context=context) return {'type': 'ir.actions.act_window_close'} def save_sepa(self, cr, uid, ids, context=None): - ''' - Save the SEPA Direct Debit file: mark all payments in the file + """Save the SEPA Direct Debit file: mark all payments in the file as 'sent'. Write 'last debit date' on mandate and set oneoff - mandate to expired - ''' + mandate to expired. + """ sepa_export = self.browse(cr, uid, ids[0], context=context) self.pool.get('banking.export.sdd').write( cr, uid, sepa_export.file_id.id, {'state': 'sent'}, diff --git a/account_direct_debit/models/account_move_line.py b/account_direct_debit/models/account_move_line.py index cc475b2c6..88b73f84f 100644 --- a/account_direct_debit/models/account_move_line.py +++ b/account_direct_debit/models/account_move_line.py @@ -80,7 +80,6 @@ class AccountMoveLine(orm.Model): AND reconcile_id IS null AND debit > 0 AND ''' + where + ' and ' + query), ('receivable',) + sql_args) - res = cr.fetchall() if not res: return [('id', '=', '0')] @@ -118,4 +117,4 @@ class AccountMoveLine(orm.Model): _amount_to_receive, method=True, type='float', string='Amount to receive', fnct_search=_to_receive_search), - } + } diff --git a/account_direct_debit/models/payment_line.py b/account_direct_debit/models/payment_line.py index da0a839cf..c5fbe1898 100644 --- a/account_direct_debit/models/payment_line.py +++ b/account_direct_debit/models/payment_line.py @@ -48,10 +48,9 @@ class PaymentLine(orm.Model): if len(reconcile.line_partial_ids) == 2: # reuse the simple reconcile for the storno transfer reconcile_obj.write( - cr, uid, reconcile_id, { - 'line_id': [(6, 0, line.transit_move_line_id.id)], - 'line_partial_ids': [(6, 0, [])], - }, context=context) + cr, uid, reconcile_id, + {'line_id': [(6, 0, line.transit_move_line_id.id)], + 'line_partial_ids': [(6, 0, [])]}, context=context) else: # split up the original reconcile in a partial one # and a new one for reconciling the storno transfer @@ -61,36 +60,33 @@ class PaymentLine(orm.Model): reconcile_obj.write( cr, uid, reconcile_id, reconcile, context=context) reconcile_id = reconcile_obj.create( - cr, uid, { - 'type': 'auto', - 'line_id': [(6, 0, line.transit_move_line_id.id)], - }, context=context) + cr, uid, + {'type': 'auto', + 'line_id': [(6, 0, line.transit_move_line_id.id)]}, + context=context) elif line.transit_move_line_id.reconcile_id: reconcile_id = line.transit_move_line_id.reconcile_id.id if len(line.transit_move_line_id.reconcile_id.line_id) == 2: # reuse the simple reconcile for the storno transfer reconcile_obj.write( - cr, uid, reconcile_id, { - 'line_id': [(6, 0, [line.transit_move_line_id.id])] - }, context=context) + cr, uid, reconcile_id, + {'line_id': [(6, 0, [line.transit_move_line_id.id])]}, + context=context) else: # split up the original reconcile in a partial one # and a new one for reconciling the storno transfer reconcile = line.transit_move_line_id.reconcile_id - partial_ids = [ - x.id for x in reconcile.line_id - if x.id != line.transit_move_line_id.id - ] + partial_ids = [x.id for x in reconcile.line_id + if x.id != line.transit_move_line_id.id] reconcile_obj.write( - cr, uid, reconcile_id, { - 'line_partial_ids': [(6, 0, partial_ids)], - 'line_id': [(6, 0, [])], - }, context=context) + cr, uid, reconcile_id, + {'line_partial_ids': [(6, 0, partial_ids)], + 'line_id': [(6, 0, [])]}, context=context) reconcile_id = reconcile_obj.create( - cr, uid, { - 'type': 'auto', - 'line_id': [(6, 0, line.transit_move_line_id.id)], - }, context=context) + cr, uid, + {'type': 'auto', + 'line_id': [(6, 0, line.transit_move_line_id.id)]}, + context=context) # mark the payment line for storno processed if reconcile_id: self.write(cr, uid, [payment_line_id], @@ -146,4 +142,4 @@ class PaymentLine(orm.Model): readonly=True, help=("If this is true, the debit order has been canceled " "by the bank or by the customer")), - } + } diff --git a/account_payment_partner/models/payment_order_create.py b/account_payment_partner/models/payment_order_create.py index ea8b1ccb3..3b9b536a7 100644 --- a/account_payment_partner/models/payment_order_create.py +++ b/account_payment_partner/models/payment_order_create.py @@ -23,17 +23,16 @@ from openerp.osv import orm -class payment_order_create(orm.TransientModel): +class PaymentOrderCreate(orm.TransientModel): _inherit = 'payment.order.create' def extend_payment_order_domain( self, cr, uid, payment_order, domain, context=None): - super(payment_order_create, self).extend_payment_order_domain( + super(PaymentOrderCreate, self).extend_payment_order_domain( cr, uid, payment_order, domain, context=context) domain += [ '|', '|', ('invoice', '=', False), ('invoice.payment_mode_id', '=', False), - ('invoice.payment_mode_id', '=', payment_order.mode.id) - ] + ('invoice.payment_mode_id', '=', payment_order.mode.id)] return True From 7ba7113051b64e3309d9a073b952ae87cb91767a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 22 Oct 2014 20:13:23 +0200 Subject: [PATCH 16/21] [FIX] account_banking_sepa_direct_debit: Set args correctly for cron job --- account_banking_sepa_direct_debit/data/mandate_expire_cron.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml b/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml index 79aa05689..48fe6fc63 100644 --- a/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml +++ b/account_banking_sepa_direct_debit/data/mandate_expire_cron.xml @@ -18,7 +18,7 @@ - +
From 4f2fb49e4804582f993784e3ef2dd1c9b8184c38 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 31 Oct 2014 23:54:24 +0100 Subject: [PATCH 17/21] [FIX] account_payment_sale_stock: Split for removing stock dependency on sale [DEL] Remove old translations templates [IMP] More reorder on folder structure --- .../account_payment_sale_stock/model/stock.py | 43 -- .../i18n/account_banking_pain_base.pot | 146 ---- account_banking_payment_export/__openerp__.py | 6 +- .../data/payment_mode_type.xml | 1 + .../i18n/account_banking_payment_export.pot | 145 ---- .../models/payment_mode_type.py | 6 +- .../{view => views}/account_payment.xml | 0 .../{view => views}/bank_payment_manual.xml | 0 .../{view => views}/payment_mode.xml | 0 .../{view => views}/payment_mode_type.xml | 0 .../payment_order_create_view.xml | 0 .../account_banking_sepa_credit_transfer.pot | 207 ------ .../account_banking_sepa_direct_debit.pot | 633 ------------------ .../models/banking_export_sdd.py | 3 +- .../i18n/account_direct_debit.pot | 133 ---- .../i18n/account_payment_partner.pot | 57 -- .../models/account_invoice.py | 5 +- account_payment_partner/models/res_partner.py | 6 +- .../views/account_invoice_view.xml | 4 +- account_payment_purchase/__openerp__.py | 9 +- .../i18n/account_payment_purchase.pot | 42 -- .../models/purchase_order.py | 3 +- account_payment_purchase/view/purchase.xml | 26 - account_payment_sale/__openerp__.py | 10 +- account_payment_sale/models/__init__.py | 5 - account_payment_sale/models/sale_order.py | 3 +- account_payment_sale/view/sale.xml | 24 - .../__init__.py | 2 +- .../__openerp__.py | 15 +- .../models}/__init__.py | 2 +- .../models/stock_picking.py | 4 - 31 files changed, 39 insertions(+), 1501 deletions(-) delete mode 100644 __unported__/account_payment_sale_stock/model/stock.py delete mode 100644 account_banking_pain_base/i18n/account_banking_pain_base.pot delete mode 100644 account_banking_payment_export/i18n/account_banking_payment_export.pot rename account_banking_payment_export/{view => views}/account_payment.xml (100%) rename account_banking_payment_export/{view => views}/bank_payment_manual.xml (100%) rename account_banking_payment_export/{view => views}/payment_mode.xml (100%) rename account_banking_payment_export/{view => views}/payment_mode_type.xml (100%) rename account_banking_payment_export/{view => views}/payment_order_create_view.xml (100%) delete mode 100644 account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot delete mode 100644 account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot delete mode 100644 account_direct_debit/i18n/account_direct_debit.pot delete mode 100644 account_payment_partner/i18n/account_payment_partner.pot delete mode 100644 account_payment_purchase/i18n/account_payment_purchase.pot delete mode 100644 account_payment_purchase/view/purchase.xml delete mode 100644 account_payment_sale/view/sale.xml rename {__unported__/account_payment_sale_stock => account_payment_sale_stock}/__init__.py (98%) rename {__unported__/account_payment_sale_stock => account_payment_sale_stock}/__openerp__.py (78%) rename {__unported__/account_payment_sale_stock/model => account_payment_sale_stock/models}/__init__.py (97%) rename {account_payment_sale => account_payment_sale_stock}/models/stock_picking.py (90%) diff --git a/__unported__/account_payment_sale_stock/model/stock.py b/__unported__/account_payment_sale_stock/model/stock.py deleted file mode 100644 index 5ed4fbd4f..000000000 --- a/__unported__/account_payment_sale_stock/model/stock.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Payment Sale Stock module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm - - -class stock_picking(orm.Model): - _inherit = "stock.picking" - - def _prepare_invoice( - self, cr, uid, picking, partner, inv_type, journal_id, - context=None): - """Copy payment mode from sale order to invoice""" - invoice_vals = super(stock_picking, self)._prepare_invoice( - cr, uid, picking, partner, inv_type, journal_id, context=context) - if picking.sale_id: - invoice_vals.update({ - 'partner_bank_id': - picking.sale_id.payment_mode_id and - picking.sale_id.payment_mode_id.bank_id.id or False, - 'payment_mode_id': - picking.sale_id.payment_mode_id.id or False, - }) - return invoice_vals diff --git a/account_banking_pain_base/i18n/account_banking_pain_base.pot b/account_banking_pain_base/i18n/account_banking_pain_base.pot deleted file mode 100644 index d4a7dbac5..000000000 --- a/account_banking_pain_base/i18n/account_banking_pain_base.pot +++ /dev/null @@ -1,146 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_banking_pain_base -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-23 21:26+0000\n" -"PO-Revision-Date: 2013-12-23 21:26+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_banking_pain_base -#: field:res.company,initiating_party_issuer:0 -msgid "Initiating Party Issuer" -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:122 -#, python-format -msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s" -msgstr "" - -#. module: account_banking_pain_base -#: field:payment.line,priority:0 -msgid "Priority" -msgstr "" - -#. module: account_banking_pain_base -#: model:ir.model,name:account_banking_pain_base.model_payment_line -msgid "Payment Line" -msgstr "" - -#. module: account_banking_pain_base -#: model:ir.model,name:account_banking_pain_base.model_payment_mode -msgid "Payment Mode" -msgstr "" - -#. module: account_banking_pain_base -#: help:res.company,initiating_party_issuer:0 -msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP." -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:351 -#, python-format -msgid "Missing 'Structured Communication Type' on payment line with reference '%s'." -msgstr "" - -#. module: account_banking_pain_base -#: selection:payment.line,priority:0 -msgid "Normal" -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:70 -#, python-format -msgid "Cannot compute the '%s' of the Payment Line with reference '%s'." -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:77 -#, python-format -msgid "Cannot compute the '%s'." -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:81 -#, python-format -msgid "The type of the field '%s' is %s. It should be a string or unicode." -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:47 -#: code:addons/account_banking_pain_base/banking_export_pain.py:69 -#: code:addons/account_banking_pain_base/banking_export_pain.py:76 -#: code:addons/account_banking_pain_base/banking_export_pain.py:86 -#: code:addons/account_banking_pain_base/banking_export_pain.py:121 -#: code:addons/account_banking_pain_base/banking_export_pain.py:350 -#, python-format -msgid "Error:" -msgstr "" - -#. module: account_banking_pain_base -#: model:ir.model,name:account_banking_pain_base.model_res_company -msgid "Companies" -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:47 -#, python-format -msgid "This IBAN is not valid : %s" -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:80 -#, python-format -msgid "Field type error:" -msgstr "" - -#. module: account_banking_pain_base -#: field:payment.line,struct_communication_type:0 -msgid "Structured Communication Type" -msgstr "" - -#. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/banking_export_pain.py:87 -#, python-format -msgid "The '%s' is empty or 0. It should have a non-null value." -msgstr "" - -#. module: account_banking_pain_base -#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain -msgid "banking.export.pain" -msgstr "" - -#. module: account_banking_pain_base -#: help:payment.mode,convert_to_ascii:0 -msgid "If active, OpenERP will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file." -msgstr "" - -#. module: account_banking_pain_base -#: help:payment.line,priority:0 -msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file." -msgstr "" - -#. module: account_banking_pain_base -#: view:res.company:0 -msgid "Payment Initiation" -msgstr "" - -#. module: account_banking_pain_base -#: selection:payment.line,priority:0 -msgid "High" -msgstr "" - -#. module: account_banking_pain_base -#: field:payment.mode,convert_to_ascii:0 -msgid "Convert to ASCII" -msgstr "" - diff --git a/account_banking_payment_export/__openerp__.py b/account_banking_payment_export/__openerp__.py index e7a10cc13..8b8369136 100644 --- a/account_banking_payment_export/__openerp__.py +++ b/account_banking_payment_export/__openerp__.py @@ -46,9 +46,9 @@ 'account_payment_extension', ], 'data': [ - 'view/account_payment.xml', - 'view/payment_mode.xml', - 'view/payment_mode_type.xml', + 'views/account_payment.xml', + 'views/payment_mode.xml', + 'views/payment_mode_type.xml', 'wizard/bank_payment_manual.xml', 'wizard/payment_order_create_view.xml', 'data/payment_mode_type.xml', diff --git a/account_banking_payment_export/data/payment_mode_type.xml b/account_banking_payment_export/data/payment_mode_type.xml index c1e4a4abd..acf807e8c 100644 --- a/account_banking_payment_export/data/payment_mode_type.xml +++ b/account_banking_payment_export/data/payment_mode_type.xml @@ -9,6 +9,7 @@ eval="[(6,0,[ref('base.bank_normal'),ref('base_iban.bank_iban'),])]" /> + both
diff --git a/account_banking_payment_export/i18n/account_banking_payment_export.pot b/account_banking_payment_export/i18n/account_banking_payment_export.pot deleted file mode 100644 index bb2ac6301..000000000 --- a/account_banking_payment_export/i18n/account_banking_payment_export.pot +++ /dev/null @@ -1,145 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_banking_payment_export -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-10-25 15:58+0000\n" -"PO-Revision-Date: 2013-10-25 15:58+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_banking_payment_export -#: help:payment.mode.type,name:0 -msgid "Payment Type" -msgstr "" - -#. module: account_banking_payment_export -#: model:ir.model,name:account_banking_payment_export.model_payment_order -msgid "Payment Order" -msgstr "" - -#. module: account_banking_payment_export -#: view:payment.manual:0 -msgid "Please execute payment order manually, and click OK when succesfully sent." -msgstr "" - -#. module: account_banking_payment_export -#: model:ir.model,name:account_banking_payment_export.model_payment_mode -msgid "Payment Mode" -msgstr "" - -#. module: account_banking_payment_export -#: code:addons/account_banking_payment_export/model/account_payment.py:69 -#, python-format -msgid "You can only combine payment orders of the same type" -msgstr "" - -#. module: account_banking_payment_export -#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type -msgid "Payment Mode Type" -msgstr "" - -#. module: account_banking_payment_export -#: model:ir.model,name:account_banking_payment_export.model_account_move_line -msgid "Journal Items" -msgstr "" - -#. module: account_banking_payment_export -#: model:ir.model,name:account_banking_payment_export.model_payment_manual -msgid "Send payment order(s) manually" -msgstr "" - -#. module: account_banking_payment_export -#: field:payment.mode.type,name:0 -msgid "Name" -msgstr "" - -#. module: account_banking_payment_export -#: help:payment.mode.type,ir_model_id:0 -msgid "Select the Payment Wizard for payments of this type. Leave empty for manual processing" -msgstr "" - -#. module: account_banking_payment_export -#: view:payment.manual:0 -msgid "Manual payment" -msgstr "" - -#. module: account_banking_payment_export -#: field:payment.manual,payment_order_ids:0 -msgid "Payment orders" -msgstr "" - -#. module: account_banking_payment_export -#: code:addons/account_banking_payment_export/model/account_payment.py:52 -#, python-format -msgid "Payment Order Export" -msgstr "" - -#. module: account_banking_payment_export -#: help:payment.mode,type:0 -msgid "Select the Payment Type for the Payment Mode." -msgstr "" - -#. module: account_banking_payment_export -#: view:payment.order:0 -msgid "launch_wizard" -msgstr "" - -#. module: account_banking_payment_export -#: help:payment.mode.type,code:0 -msgid "Specify the Code for Payment Type" -msgstr "" - -#. module: account_banking_payment_export -#: model:ir.model,name:account_banking_payment_export.model_payment_order_create -msgid "payment.order.create" -msgstr "" - -#. module: account_banking_payment_export -#: code:addons/account_banking_payment_export/model/account_payment.py:68 -#, python-format -msgid "Error" -msgstr "" - -#. module: account_banking_payment_export -#: field:payment.mode.type,ir_model_id:0 -msgid "Payment wizard" -msgstr "" - -#. module: account_banking_payment_export -#: field:payment.mode,type:0 -msgid "Payment type" -msgstr "" - -#. module: account_banking_payment_export -#: field:payment.mode.type,code:0 -msgid "Code" -msgstr "" - -#. module: account_banking_payment_export -#: view:payment.manual:0 -msgid "OK" -msgstr "" - -#. module: account_banking_payment_export -#: view:payment.mode.type:0 -msgid "Payment mode" -msgstr "" - -#. module: account_banking_payment_export -#: view:payment.manual:0 -msgid "Cancel" -msgstr "" - -#. module: account_banking_payment_export -#: field:payment.mode.type,suitable_bank_types:0 -msgid "Suitable bank types" -msgstr "" - diff --git a/account_banking_payment_export/models/payment_mode_type.py b/account_banking_payment_export/models/payment_mode_type.py index 4093da765..9d2362bdf 100644 --- a/account_banking_payment_export/models/payment_mode_type.py +++ b/account_banking_payment_export/models/payment_mode_type.py @@ -43,8 +43,10 @@ class PaymentModeType(models.Model): 'empty for manual processing', domain=[('osv_memory', '=', True)]) payment_order_type = fields.Selection( - [('payment', 'Payment'), ('debit', 'Debit')], - string='Order type', required=True, default='payment', + [('payment', 'Payment'), + ('debit', 'Debit'), + ('both', 'Both')], + string='Order type', required=True, default='both', help="This field determines if this type applies to customers " "(Debit) or suppliers (Payment)") active = fields.Boolean(string='Active', default=True) diff --git a/account_banking_payment_export/view/account_payment.xml b/account_banking_payment_export/views/account_payment.xml similarity index 100% rename from account_banking_payment_export/view/account_payment.xml rename to account_banking_payment_export/views/account_payment.xml diff --git a/account_banking_payment_export/view/bank_payment_manual.xml b/account_banking_payment_export/views/bank_payment_manual.xml similarity index 100% rename from account_banking_payment_export/view/bank_payment_manual.xml rename to account_banking_payment_export/views/bank_payment_manual.xml diff --git a/account_banking_payment_export/view/payment_mode.xml b/account_banking_payment_export/views/payment_mode.xml similarity index 100% rename from account_banking_payment_export/view/payment_mode.xml rename to account_banking_payment_export/views/payment_mode.xml diff --git a/account_banking_payment_export/view/payment_mode_type.xml b/account_banking_payment_export/views/payment_mode_type.xml similarity index 100% rename from account_banking_payment_export/view/payment_mode_type.xml rename to account_banking_payment_export/views/payment_mode_type.xml diff --git a/account_banking_payment_export/view/payment_order_create_view.xml b/account_banking_payment_export/views/payment_order_create_view.xml similarity index 100% rename from account_banking_payment_export/view/payment_order_create_view.xml rename to account_banking_payment_export/views/payment_order_create_view.xml diff --git a/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot b/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot deleted file mode 100644 index 38feaadd4..000000000 --- a/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot +++ /dev/null @@ -1,207 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_banking_sepa_credit_transfer -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-23 22:49+0000\n" -"PO-Revision-Date: 2013-12-23 22:49+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa.wizard,state:0 -msgid "Create" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,nb_transactions:0 -#: field:banking.export.sepa.wizard,nb_transactions:0 -msgid "Number of Transactions" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,filename:0 -#: field:banking.export.sepa.wizard,filename:0 -msgid "Filename" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,state:0 -#: field:banking.export.sepa.wizard,state:0 -msgid "State" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa,state:0 -msgid "Draft" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: help:banking.export.sepa.wizard,charge_bearer:0 -msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa,charge_bearer:0 -#: selection:banking.export.sepa.wizard,charge_bearer:0 -msgid "Shared" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,batch_booking:0 -#: field:banking.export.sepa.wizard,batch_booking:0 -msgid "Batch Booking" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa,state:0 -msgid "Sent" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard -msgid "Export SEPA Credit Transfer File" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: view:banking.export.sepa:0 -msgid "SEPA Credit Transfer" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa.wizard,state:0 -msgid "Finish" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa,state:0 -msgid "Reconciled" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa,charge_bearer:0 -#: selection:banking.export.sepa.wizard,charge_bearer:0 -msgid "Following Service Level" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa,charge_bearer:0 -#: selection:banking.export.sepa.wizard,charge_bearer:0 -msgid "Borne by Creditor" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: view:banking.export.sepa.wizard:0 -msgid "Validate" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: view:banking.export.sepa.wizard:0 -msgid "Generate" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:banking.export.sepa,charge_bearer:0 -#: selection:banking.export.sepa.wizard,charge_bearer:0 -msgid "Borne by Debtor" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:128 -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:245 -#, python-format -msgid "Error:" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,total_amount:0 -#: field:banking.export.sepa.wizard,total_amount:0 -msgid "Total Amount" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,charge_bearer:0 -#: field:banking.export.sepa.wizard,charge_bearer:0 -msgid "Charge Bearer" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: view:banking.export.sepa.wizard:0 -msgid "SEPA File Generation" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa -msgid "SEPA export" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:246 -#, python-format -msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')." -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,file:0 -#: field:banking.export.sepa.wizard,file_id:0 -msgid "SEPA XML File" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: help:banking.export.sepa,charge_bearer:0 -msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:129 -#, python-format -msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'." -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: view:banking.export.sepa:0 -#: field:banking.export.sepa,payment_order_ids:0 -#: field:banking.export.sepa.wizard,payment_order_ids:0 -msgid "Payment Orders" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: view:banking.export.sepa:0 -msgid "General Information" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order -#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa -#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa -msgid "SEPA Credit Transfer Files" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: help:banking.export.sepa,batch_booking:0 -#: help:banking.export.sepa.wizard,batch_booking:0 -msgid "If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file." -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa.wizard,file:0 -msgid "File" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: view:banking.export.sepa.wizard:0 -msgid "Cancel" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,create_date:0 -msgid "Generation Date" -msgstr "" - diff --git a/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot b/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot deleted file mode 100644 index 0db576726..000000000 --- a/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot +++ /dev/null @@ -1,633 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_banking_sepa_direct_debit -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-23 22:24+0000\n" -"PO-Revision-Date: 2013-12-23 22:24+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_valid -msgid "SEPA Direct Debit Mandate Validated" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd,filename:0 -#: field:banking.export.sdd.wizard,filename:0 -msgid "Filename" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:200 -#, python-format -msgid "The SEPA Direct Debit mandate with reference '%s' for partner '%s' has expired." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:219 -#, python-format -msgid "Cannot validate the mandate '%s' without a date of signature." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:sdd.mandate,recurrent_sequence_type:0 -msgid "Final" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd.wizard,state:0 -msgid "Finish" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:res.partner:0 -#: view:res.partner.bank:0 -msgid "SDD Mandates" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: constraint:payment.line:0 -#: constraint:sdd.mandate:0 -msgid "Error msg in raise" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd,state:0 -msgid "Reconciled" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,recurrent_sequence_type:0 -msgid "Sequence Type for Next Debit" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd,charge_bearer:0 -#: selection:banking.export.sdd.wizard,charge_bearer:0 -msgid "Borne by Creditor" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.sdd_mandate_action -#: model:ir.ui.menu,name:account_banking_sepa_direct_debit.sdd_mandate_menu -#: view:res.partner.bank:0 -#: field:res.partner.bank,sdd_mandate_ids:0 -msgid "SEPA Direct Debit Mandates" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:banking.export.sdd.wizard:0 -#: view:sdd.mandate:0 -msgid "Validate" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring -#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring -msgid "Sequence Type set to Recurring" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:banking.export.sdd.wizard:0 -msgid "Generate" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_cancel -msgid "SEPA Direct Debit Mandate Cancelled" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd,charge_bearer:0 -#: selection:banking.export.sdd.wizard,charge_bearer:0 -msgid "Borne by Debtor" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:212 -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:218 -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:224 -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:232 -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:239 -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:245 -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:253 -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:395 -#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:140 -#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:192 -#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:199 -#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:209 -#, python-format -msgid "Error:" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,message_ids:0 -msgid "Messages" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,unique_mandate_reference:0 -msgid "Unique Mandate Reference" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -#: selection:sdd.mandate,state:0 -msgid "Cancelled" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:141 -#, python-format -msgid "Payment Type Code '%s' is not supported. The only Payment Type Code supported for SEPA Direct Debit are 'pain.008.001.02', 'pain.008.001.03' and 'pain.008.001.04'." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:sdd.mandate,message_unread:0 -msgid "If checked new messages require your attention." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd.wizard,file_id:0 -msgid "SDD File" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_expired -msgid "SEPA Direct Debit Mandate has Expired" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:246 -#, python-format -msgid "The recurrent mandate '%s' which is not marked as 'Migrated to SEPA' must have its recurrent sequence type set to 'First'." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:banking.export.sdd,charge_bearer:0 -#: help:banking.export.sdd.wizard,charge_bearer:0 -msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -msgid "Reference" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:banking.export.sdd:0 -msgid "SEPA Direct Debit" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:banking.export.sdd.wizard:0 -msgid "SEPA Direct Debit XML file generation" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:sdd.mandate,message_summary:0 -msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.model,name:account_banking_sepa_direct_debit.model_payment_line -msgid "Payment Line" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd,create_date:0 -msgid "Generation Date" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:396 -#, python-format -msgid "The payment line with reference '%s' has the bank account '%s' which is not attached to the mandate '%s' (this mandate is attached to the bank account '%s')." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd.wizard,state:0 -msgid "Create" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd,nb_transactions:0 -#: field:banking.export.sdd.wizard,nb_transactions:0 -msgid "Number of Transactions" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -#: selection:sdd.mandate,type:0 -msgid "One-Off" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd,state:0 -#: field:banking.export.sdd.wizard,state:0 -msgid "State" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:240 -#, python-format -msgid "The recurrent mandate '%s' must have a sequence type." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,message_follower_ids:0 -msgid "Followers" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,message_unread:0 -msgid "Unread Messages" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:banking.export.sdd:0 -#: field:banking.export.sdd,payment_order_ids:0 -#: field:banking.export.sdd.wizard,payment_order_ids:0 -msgid "Payment Orders" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -msgid "Type" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd,state:0 -msgid "Sent" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:res.company,original_creditor_identifier:0 -msgid "Original Creditor Identifier" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:sdd.mandate,recurrent_sequence_type:0 -msgid "Recurring" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:res.company,sepa_creditor_identifier:0 -msgid "Enter the Creditor Identifier that has been attributed to your company to make SEPA Direct Debits. This identifier is composed of :\n" -"- your country ISO code (2 letters)\n" -"- a 2-digits checkum\n" -"- a 3-letters business code\n" -"- a country-specific identifier" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: sql_constraint:sdd.mandate:0 -msgid "A Mandate with the same reference already exists for this company !" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:sdd.mandate,state:0 -msgid "Only valid mandates can be used in a payment line. A cancelled mandate is a mandate that has been cancelled by the customer. A one-off mandate expires after its first use. A recurrent mandate expires after it's final use or if it hasn't been used for 36 months." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:sdd.mandate,recurrent_sequence_type:0 -msgid "This field is only used for Recurrent mandates, not for One-Off mandates." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:213 -#, python-format -msgid "The date of signature of mandate '%s' is in the future !" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -msgid "Signature Date" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd,charge_bearer:0 -#: field:banking.export.sdd.wizard,charge_bearer:0 -msgid "Charge Bearer" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,partner_id:0 -msgid "Partner" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:sdd.mandate,recurrent_sequence_type:0 -msgid "First" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,signature_date:0 -msgid "Date of Signature of the Mandate" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_cancel -msgid "Mandate Cancelled" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.act_banking_export_sdd_payment_order -msgid "Generated SEPA Direct Debit Files" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:sdd.mandate,sepa_migrated:0 -msgid "If this field is not active, the mandate section of the next direct debit file that include this mandate will contain the 'Original Mandate Identification' and the 'Original Creditor Scheme Identification'. This is required in a few countries (Belgium for instance), but not in all countries. If this is not required in your country, you should keep this field always active." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,company_id:0 -msgid "Company" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd_wizard -msgid "Export SEPA Direct Debit File" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:banking.export.sdd,batch_booking:0 -#: help:banking.export.sdd.wizard,batch_booking:0 -msgid "If true, the bank statement will display only one credit line for all the direct debits of the SEPA file ; if false, the bank statement will display one credit line per direct debit of the SEPA file." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:225 -#, python-format -msgid "Cannot validate the mandate '%s' because it is not attached to a bank account." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd,state:0 -#: view:sdd.mandate:0 -#: selection:sdd.mandate,state:0 -msgid "Draft" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:290 -#, python-format -msgid "Mandate update" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd,charge_bearer:0 -#: selection:banking.export.sdd.wizard,charge_bearer:0 -msgid "Shared" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd,batch_booking:0 -#: field:banking.export.sdd.wizard,batch_booking:0 -msgid "Batch Booking" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,sepa_migrated:0 -msgid "Migrated to SEPA" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,state:0 -msgid "Status" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd,total_amount:0 -#: field:banking.export.sdd.wizard,total_amount:0 -msgid "Total Amount" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.action_account_banking_sdd -#: model:ir.ui.menu,name:account_banking_sepa_direct_debit.menu_account_banking_sdd -msgid "SEPA Direct Debit Files" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: selection:banking.export.sdd,charge_bearer:0 -#: selection:banking.export.sdd.wizard,charge_bearer:0 -msgid "Following Service Level" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:233 -#, python-format -msgid "The mandate '%s' can't have a date of last debit before the date of signature." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_final -#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_final -msgid "Sequence Type set to Final" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,message_is_follower:0 -msgid "Is a Follower" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:sdd.mandate,original_mandate_identification:0 -msgid "When the field 'Migrated to SEPA' is not active, this field will be used as the Original Mandate Identification in the Direct Debit file." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:payment.order:0 -msgid "SDD Mandate" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,original_mandate_identification:0 -msgid "Original Mandate Identification" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.model,name:account_banking_sepa_direct_debit.model_res_company -msgid "Companies" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,message_summary:0 -msgid "Summary" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:res.groups,name:account_banking_sepa_direct_debit.group_original_mandate_required -msgid "Original Mandate Required (SEPA)" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:account.invoice,sdd_mandate_id:0 -#: model:ir.model,name:account_banking_sepa_direct_debit.model_sdd_mandate -#: field:payment.line,sdd_mandate_id:0 -#: view:sdd.mandate:0 -msgid "SEPA Direct Debit Mandate" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:193 -#, python-format -msgid "Missing SEPA Direct Debit mandate on the payment line with partner '%s' and Invoice ref '%s'." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:210 -#, python-format -msgid "The mandate with reference '%s' for partner '%s' has type set to 'One-Off' and it has a last debit date set to '%s', so we can't use it." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,scan:0 -msgid "Scan of the Mandate" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,last_debit_date:0 -msgid "Date of the Last Debit" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_expired -msgid "Mandate Expired" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: constraint:res.company:0 -msgid "Invalid SEPA Creditor Identifier." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.model,name:account_banking_sepa_direct_debit.model_res_partner_bank -msgid "Bank Accounts" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.actions.act_window,help:account_banking_sepa_direct_debit.sdd_mandate_action -msgid "

\n" -" Click to create a new SEPA Direct Debit Mandate.\n" -"

\n" -" A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account.\n" -"

\n" -" " -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:banking.export.sdd:0 -msgid "General Information" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -#: selection:sdd.mandate,state:0 -msgid "Valid" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.model,name:account_banking_sepa_direct_debit.model_account_invoice -msgid "Invoice" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:banking.export.sdd.wizard:0 -#: view:sdd.mandate:0 -msgid "Cancel" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -#: field:sdd.mandate,payment_line_ids:0 -msgid "Related Payment Lines" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -#: selection:sdd.mandate,type:0 -msgid "Recurrent" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,type:0 -msgid "Type of Mandate" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_valid -msgid "Mandate Validated" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd,file:0 -msgid "SEPA File" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:res.company,sepa_creditor_identifier:0 -msgid "SEPA Creditor Identifier" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd -msgid "SEPA Direct Debit export" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -#: selection:sdd.mandate,state:0 -msgid "Expired" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:sdd.mandate,partner_bank_id:0 -msgid "Bank Account" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:254 -#, python-format -msgid "You must set the 'Original Mandate Identification' on the recurrent mandate '%s' which is not marked as 'Migrated to SEPA'." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_first -#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_first -msgid "Sequence Type set to First" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:291 -#, python-format -msgid "As you changed the bank account attached to this mandate, the 'Sequence Type' has been set back to 'First'." -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: help:sdd.mandate,message_ids:0 -msgid "Messages and communication history" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: view:sdd.mandate:0 -msgid "Search SEPA Direct Debit Mandates" -msgstr "" - -#. module: account_banking_sepa_direct_debit -#: field:banking.export.sdd.wizard,file:0 -msgid "File" -msgstr "" - diff --git a/account_banking_sepa_direct_debit/models/banking_export_sdd.py b/account_banking_sepa_direct_debit/models/banking_export_sdd.py index 4bcd49367..c80cebf6e 100644 --- a/account_banking_sepa_direct_debit/models/banking_export_sdd.py +++ b/account_banking_sepa_direct_debit/models/banking_export_sdd.py @@ -32,9 +32,8 @@ class BankingExportSdd(models.Model): _rec_name = 'filename' @api.one + @api.depends('payment_order_ids', 'payment_order_ids.reference') def _generate_filename(self): - filename = '' - # FIXME : we never enter inside the IF to give a good filename if self.payment_order_ids: ref = self.payment_order_ids[0].reference label = unidecode(ref.replace('/', '-')) if ref else 'error' diff --git a/account_direct_debit/i18n/account_direct_debit.pot b/account_direct_debit/i18n/account_direct_debit.pot deleted file mode 100644 index c5e80375a..000000000 --- a/account_direct_debit/i18n/account_direct_debit.pot +++ /dev/null @@ -1,133 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_direct_debit -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-10-25 16:01+0000\n" -"PO-Revision-Date: 2013-10-25 16:01+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_direct_debit -#: model:account.payment.term,note:account_direct_debit.payment_term_direct_debit -msgid "Direct debit in 14 days" -msgstr "" - -#. module: account_direct_debit -#: model:ir.model,name:account_direct_debit.model_payment_order -msgid "Payment Order" -msgstr "" - -#. module: account_direct_debit -#: view:payment.order:0 -msgid "Select Invoices to Collect" -msgstr "" - -#. module: account_direct_debit -#: model:ir.model,name:account_direct_debit.model_payment_line -msgid "Payment Line" -msgstr "" - -#. module: account_direct_debit -#: code:addons/account_direct_debit/model/payment_line.py:140 -#, python-format -msgid "Can not reconcile" -msgstr "" - -#. module: account_direct_debit -#: view:account.invoice:0 -msgid "Debit Denied" -msgstr "" - -#. module: account_direct_debit -#: code:addons/account_direct_debit/model/account_invoice.py:147 -#, python-format -msgid "Error !" -msgstr "" - -#. module: account_direct_debit -#: view:account.invoice:0 -msgid "Show only invoices with state Debit denied" -msgstr "" - -#. module: account_direct_debit -#: view:payment.order:0 -msgid "{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'payment')]}" -msgstr "" - -#. module: account_direct_debit -#: model:ir.model,name:account_direct_debit.model_account_move_line -msgid "Journal Items" -msgstr "" - -#. module: account_direct_debit -#: view:account.invoice:0 -msgid "Debit denied" -msgstr "" - -#. module: account_direct_debit -#: model:ir.actions.act_window,name:account_direct_debit.action_debit_order_tree -#: model:ir.ui.menu,name:account_direct_debit.menu_action_debit_order_form -msgid "Direct Debit Orders" -msgstr "" - -#. module: account_direct_debit -#: model:account.payment.term,name:account_direct_debit.payment_term_direct_debit -msgid "Direct debit" -msgstr "" - -#. module: account_direct_debit -#: code:addons/account_direct_debit/model/account_invoice.py:148 -#, python-format -msgid "You cannot set invoice '%s' to state 'debit denied', as it is still reconciled." -msgstr "" - -#. module: account_direct_debit -#: code:addons/account_direct_debit/model/account_invoice.py:152 -#, python-format -msgid "Invoice '%s': direct debit is denied." -msgstr "" - -#. module: account_direct_debit -#: code:addons/account_direct_debit/model/payment_line.py:141 -#, python-format -msgid "Cancelation of payment line '%s' has already been processed" -msgstr "" - -#. module: account_direct_debit -#: model:ir.model,name:account_direct_debit.model_payment_order_create -msgid "payment.order.create" -msgstr "" - -#. module: account_direct_debit -#: field:payment.line,storno:0 -msgid "Storno" -msgstr "" - -#. module: account_direct_debit -#: help:payment.line,storno:0 -msgid "If this is true, the debit order has been canceled by the bank or by the customer" -msgstr "" - -#. module: account_direct_debit -#: model:ir.actions.act_window,help:account_direct_debit.action_debit_order_tree -msgid "A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for." -msgstr "" - -#. module: account_direct_debit -#: field:account.move.line,amount_to_receive:0 -msgid "Amount to receive" -msgstr "" - -#. module: account_direct_debit -#: model:ir.model,name:account_direct_debit.model_account_invoice -msgid "Invoice" -msgstr "" - diff --git a/account_payment_partner/i18n/account_payment_partner.pot b/account_payment_partner/i18n/account_payment_partner.pot deleted file mode 100644 index ca26e532d..000000000 --- a/account_payment_partner/i18n/account_payment_partner.pot +++ /dev/null @@ -1,57 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_payment_partner -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-09 23:22+0000\n" -"PO-Revision-Date: 2014-06-09 23:22+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_payment_partner -#: field:res.partner,customer_payment_mode:0 -msgid "Customer Payment Mode" -msgstr "" - -#. module: account_payment_partner -#: model:ir.model,name:account_payment_partner.model_account_invoice -msgid "Invoice" -msgstr "" - -#. module: account_payment_partner -#: model:ir.model,name:account_payment_partner.model_res_partner -msgid "Partner" -msgstr "" - -#. module: account_payment_partner -#: field:account.invoice,payment_mode_id:0 -msgid "Payment Mode" -msgstr "" - -#. module: account_payment_partner -#: help:res.partner,customer_payment_mode:0 -msgid "Select the default payment mode for this customer." -msgstr "" - -#. module: account_payment_partner -#: help:res.partner,supplier_payment_mode:0 -msgid "Select the default payment mode for this supplier." -msgstr "" - -#. module: account_payment_partner -#: field:res.partner,supplier_payment_mode:0 -msgid "Supplier Payment Mode" -msgstr "" - -#. module: account_payment_partner -#: model:ir.model,name:account_payment_partner.model_payment_order_create -msgid "payment.order.create" -msgstr "" - diff --git a/account_payment_partner/models/account_invoice.py b/account_payment_partner/models/account_invoice.py index 9c95f4cda..e14c0d956 100644 --- a/account_payment_partner/models/account_invoice.py +++ b/account_payment_partner/models/account_invoice.py @@ -26,8 +26,9 @@ from openerp import models, fields, api class AccountInvoice(models.Model): _inherit = 'account.invoice' - payment_mode_id = fields.Many2one('payment.mode', string="Payment Mode", - domain="[('type', '=', type)]") + payment_mode_id = fields.Many2one( + comodel_name='payment.mode', string="Payment Mode", + domain="[('type', '=', type)]") @api.multi def onchange_partner_id( diff --git a/account_payment_partner/models/res_partner.py b/account_payment_partner/models/res_partner.py index c8762f7d5..d5dded203 100644 --- a/account_payment_partner/models/res_partner.py +++ b/account_payment_partner/models/res_partner.py @@ -28,11 +28,13 @@ class ResPartner(models.Model): supplier_payment_mode = fields.Many2one( 'payment.mode', string='Supplier Payment Mode', company_dependent=True, - domain="[('payment_order_type', '=', 'payment')]", + domain="['|', ('payment_order_type', '=', 'payment'), " + "('payment_order_type', '=', 'both')]", help="Select the default payment mode for this supplier.") customer_payment_mode = fields.Many2one( 'payment.mode', string='Customer Payment Mode', company_dependent=True, - domain="[('payment_order_type', '=', 'debit')]", + domain="['|', ('payment_order_type', '=', 'debit'), " + "('payment_order_type', '=', 'both')]", help="Select the default payment mode for this customer.") @api.model diff --git a/account_payment_partner/views/account_invoice_view.xml b/account_payment_partner/views/account_invoice_view.xml index f4805fa89..aabddcd49 100644 --- a/account_payment_partner/views/account_invoice_view.xml +++ b/account_payment_partner/views/account_invoice_view.xml @@ -17,7 +17,7 @@ + domain="['|', ('payment_order_type', '=', 'debit'), ('payment_order_type', '=', 'both')]"/>
@@ -30,7 +30,7 @@ + domain="['|', ('payment_order_type', '=', 'payment'), ('payment_order_type', '=', 'both')]"/>
diff --git a/account_payment_purchase/__openerp__.py b/account_payment_purchase/__openerp__.py index e7c258f73..283d67477 100644 --- a/account_payment_purchase/__openerp__.py +++ b/account_payment_purchase/__openerp__.py @@ -30,13 +30,13 @@ Account Payment Purchase ======================== -This module adds 2 fields on purchase orders : *Bank Account* and *Payment +This module adds 2 fields on purchase orders: *Bank Account* and *Payment Mode*. These fields are copied from partner to purchase order and then from purchase order to supplier invoice. -This module is similar to the *purchase_payment* module ; the main difference +This module is similar to the *purchase_payment* module; the main difference is that it doesn't depend on the *account_payment_extension* module (it's not -the only module to conflict with *account_payment_extension* ; all the SEPA +the only module to conflict with *account_payment_extension*; all the SEPA modules in the banking addons conflict with *account_payment_extension*). """, 'author': 'Akretion', @@ -44,7 +44,6 @@ modules in the banking addons conflict with *account_payment_extension*). 'contributors': ['Pedro M. Baeza '], 'depends': [ 'purchase', - 'stock_account', 'account_payment_partner' ], 'conflicts': ['purchase_payment'], @@ -52,5 +51,5 @@ modules in the banking addons conflict with *account_payment_extension*). 'views/purchase_order_view.xml', ], 'installable': True, - 'active': False, + 'auto_install': True, } diff --git a/account_payment_purchase/i18n/account_payment_purchase.pot b/account_payment_purchase/i18n/account_payment_purchase.pot deleted file mode 100644 index 17ed963d5..000000000 --- a/account_payment_purchase/i18n/account_payment_purchase.pot +++ /dev/null @@ -1,42 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_payment_purchase -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-09 23:23+0000\n" -"PO-Revision-Date: 2014-06-09 23:23+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_payment_purchase -#: field:purchase.order,payment_mode_id:0 -msgid "Payment Mode" -msgstr "" - -#. module: account_payment_purchase -#: model:ir.model,name:account_payment_purchase.model_stock_picking -msgid "Picking List" -msgstr "" - -#. module: account_payment_purchase -#: model:ir.model,name:account_payment_purchase.model_purchase_order -msgid "Purchase Order" -msgstr "" - -#. module: account_payment_purchase -#: help:purchase.order,supplier_partner_bank_id:0 -msgid "Select the bank account of your supplier on which your company should send the payment. This field is copied from the partner and will be copied to the supplier invoice." -msgstr "" - -#. module: account_payment_purchase -#: field:purchase.order,supplier_partner_bank_id:0 -msgid "Supplier Bank Account" -msgstr "" - diff --git a/account_payment_purchase/models/purchase_order.py b/account_payment_purchase/models/purchase_order.py index e1ca139ff..a8d73c235 100644 --- a/account_payment_purchase/models/purchase_order.py +++ b/account_payment_purchase/models/purchase_order.py @@ -34,7 +34,8 @@ class PurchaseOrder(models.Model): "and will be copied to the supplier invoice.") payment_mode_id = fields.Many2one( 'payment.mode', string='Payment Mode', - domain="[('payment_order_type', '=', 'payment')]") + domain="['|', ('payment_order_type', '=', 'payment'), " + "('payment_order_type', '=', 'both')]") @api.model def _get_default_supplier_partner_bank(self, partner): diff --git a/account_payment_purchase/view/purchase.xml b/account_payment_purchase/view/purchase.xml deleted file mode 100644 index f6b2cffec..000000000 --- a/account_payment_purchase/view/purchase.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - account_payment_purchase.purchase_order.form - purchase.order - - - - - - - - - - - diff --git a/account_payment_sale/__openerp__.py b/account_payment_sale/__openerp__.py index 99266a10a..84d1c9d96 100644 --- a/account_payment_sale/__openerp__.py +++ b/account_payment_sale/__openerp__.py @@ -25,18 +25,18 @@ 'version': '1.0', 'category': 'Banking addons', 'license': 'AGPL-3', - 'summary': "Adds Payment Mode on Sale Orders", + 'summary': "Adds payment mode on sale orders", 'description': """ Account Payment Sale ==================== -This modules adds one field on sale orders : *Payment Mode*. +This modules adds one field on sale orders: *Payment Mode*. This field is copied from partner to sale order and then from sale order to customer invoice. -This module is similar to the *sale_payment* module ; the main difference is +This module is similar to the *sale_payment* module; the main difference is that it doesn't depend on the *account_payment_extension* module (it's not the -only module to conflict with *account_payment_extension* ; all the SEPA +only module to conflict with *account_payment_extension*; all the SEPA modules in the banking addons conflict with *account_payment_extension*. """, 'author': 'Akretion', @@ -44,7 +44,6 @@ modules in the banking addons conflict with *account_payment_extension*. 'contributors': ['Pedro M. Baeza '], 'depends': [ 'sale', - 'stock_account', 'account_payment_partner' ], 'conflicts': ['sale_payment'], @@ -52,4 +51,5 @@ modules in the banking addons conflict with *account_payment_extension*. 'views/sale_order_view.xml', ], 'installable': True, + 'auto_install': True, } diff --git a/account_payment_sale/models/__init__.py b/account_payment_sale/models/__init__.py index 9de52dd65..814479106 100644 --- a/account_payment_sale/models/__init__.py +++ b/account_payment_sale/models/__init__.py @@ -1,10 +1,6 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Account Payment Sale module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -21,4 +17,3 @@ ############################################################################## from . import sale_order -from . import stock_picking diff --git a/account_payment_sale/models/sale_order.py b/account_payment_sale/models/sale_order.py index 0906beae0..e1b6a4aad 100644 --- a/account_payment_sale/models/sale_order.py +++ b/account_payment_sale/models/sale_order.py @@ -28,7 +28,8 @@ class SaleOrder(models.Model): payment_mode_id = fields.Many2one( 'payment.mode', string='Payment Mode', - domain="[('payment_order_type', '=', 'debit')]") + domain="['|', ('payment_order_type', '=', 'debit'), " + "('payment_order_type', '=', 'both')]") @api.multi def onchange_partner_id(self, partner_id): diff --git a/account_payment_sale/view/sale.xml b/account_payment_sale/view/sale.xml deleted file mode 100644 index 016598e09..000000000 --- a/account_payment_sale/view/sale.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - account_payment_sale.sale_order.form - sale.order - - - - - - - - - - diff --git a/__unported__/account_payment_sale_stock/__init__.py b/account_payment_sale_stock/__init__.py similarity index 98% rename from __unported__/account_payment_sale_stock/__init__.py rename to account_payment_sale_stock/__init__.py index c98702b99..b5fc83a16 100644 --- a/__unported__/account_payment_sale_stock/__init__.py +++ b/account_payment_sale_stock/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -from . import model +from . import models diff --git a/__unported__/account_payment_sale_stock/__openerp__.py b/account_payment_sale_stock/__openerp__.py similarity index 78% rename from __unported__/account_payment_sale_stock/__openerp__.py rename to account_payment_sale_stock/__openerp__.py index 9fc4b5e17..d44871550 100644 --- a/__unported__/account_payment_sale_stock/__openerp__.py +++ b/account_payment_sale_stock/__openerp__.py @@ -25,23 +25,20 @@ 'version': '1.0', 'category': 'Banking addons', 'license': 'AGPL-3', - 'summary': "Manage Payment Mode when invoicing from picking", + 'summary': "Manage payment mode when invoicing a sale from picking", 'description': """ Account Payment Sale Stock ========================== -This modules copies *Payment Mode* from Sale Order to Invoice when the -Invoice is generated from the Picking. - -Please contact Alexis de Lattre from Akretion -for any help or question about this module. +This module copies *Payment Mode* from sale order to invoice when it is +generated from the picking. """, 'author': 'Akretion', 'website': 'http://www.akretion.com', - 'depends': ['sale_stock', 'account_payment_sale'], + 'contributors': ['Pedro M. Baeza '], + 'depends': ['sale_stock', + 'account_payment_sale'], 'conflicts': ['account_payment_extension'], - 'data': [], 'auto_install': True, - 'active': False, 'installable': False, } diff --git a/__unported__/account_payment_sale_stock/model/__init__.py b/account_payment_sale_stock/models/__init__.py similarity index 97% rename from __unported__/account_payment_sale_stock/model/__init__.py rename to account_payment_sale_stock/models/__init__.py index 251e4ac06..66edd9dbe 100644 --- a/__unported__/account_payment_sale_stock/model/__init__.py +++ b/account_payment_sale_stock/models/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## -from . import stock +from . import stock_picking diff --git a/account_payment_sale/models/stock_picking.py b/account_payment_sale_stock/models/stock_picking.py similarity index 90% rename from account_payment_sale/models/stock_picking.py rename to account_payment_sale_stock/models/stock_picking.py index 320952ac5..befa523a9 100644 --- a/account_payment_sale/models/stock_picking.py +++ b/account_payment_sale_stock/models/stock_picking.py @@ -1,10 +1,6 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Account Payment Purchase module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the From 3d9175fae54b87664a2e186fdd12d10e1e58954e Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 1 Nov 2014 01:48:26 +0100 Subject: [PATCH 18/21] [IMP] Translation template files [IMP] Translations to spanish --- .../i18n/account_banking_mandate.pot | 355 ++++++++++++++ account_banking_mandate/i18n/es.po | 360 ++++++++++++++ .../i18n/account_banking_pain_base.pot | 153 ++++++ account_banking_pain_base/i18n/es.po | 153 ++++++ .../models/payment_mode.py | 2 +- .../models/res_company.py | 2 +- .../i18n/account_banking_payment_export.pot | 231 +++++++++ account_banking_payment_export/i18n/es.po | 231 +++++++++ .../models/payment_mode_type.py | 2 +- .../account_banking_sepa_credit_transfer.pot | 231 +++++++++ .../i18n/es.po | 231 +++++++++ .../account_banking_sepa_direct_debit.pot | 447 +++++++++++++++++ account_banking_sepa_direct_debit/i18n/es.po | 456 ++++++++++++++++++ .../i18n/account_direct_debit.pot | 127 +++++ account_direct_debit/i18n/es.po | 127 +++++ .../i18n/account_payment_partner.pot | 52 ++ account_payment_partner/i18n/es.po | 52 ++ .../i18n/account_payment_purchase.pot | 42 ++ account_payment_purchase/i18n/es.po | 42 ++ .../i18n/account_payment_sale.pot | 8 +- account_payment_sale/i18n/es.po | 27 ++ account_payment_sale_stock/__openerp__.py | 2 +- .../i18n/account_payment_sale_stock.pot | 21 + account_payment_sale_stock/i18n/es.po | 21 + 24 files changed, 3367 insertions(+), 8 deletions(-) create mode 100644 account_banking_mandate/i18n/account_banking_mandate.pot create mode 100644 account_banking_mandate/i18n/es.po create mode 100644 account_banking_pain_base/i18n/account_banking_pain_base.pot create mode 100644 account_banking_pain_base/i18n/es.po create mode 100644 account_banking_payment_export/i18n/account_banking_payment_export.pot create mode 100644 account_banking_payment_export/i18n/es.po create mode 100644 account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot create mode 100644 account_banking_sepa_credit_transfer/i18n/es.po create mode 100644 account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot create mode 100644 account_banking_sepa_direct_debit/i18n/es.po create mode 100644 account_direct_debit/i18n/account_direct_debit.pot create mode 100644 account_direct_debit/i18n/es.po create mode 100644 account_payment_partner/i18n/account_payment_partner.pot create mode 100644 account_payment_partner/i18n/es.po create mode 100644 account_payment_purchase/i18n/account_payment_purchase.pot create mode 100644 account_payment_purchase/i18n/es.po create mode 100644 account_payment_sale/i18n/es.po create mode 100644 account_payment_sale_stock/i18n/account_payment_sale_stock.pot create mode 100644 account_payment_sale_stock/i18n/es.po diff --git a/account_banking_mandate/i18n/account_banking_mandate.pot b/account_banking_mandate/i18n/account_banking_mandate.pot new file mode 100644 index 000000000..6be1594d5 --- /dev/null +++ b/account_banking_mandate/i18n/account_banking_mandate.pot @@ -0,0 +1,355 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 23:00+0000\n" +"PO-Revision-Date: 2014-10-31 23:00+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_mandate +#: model:ir.actions.act_window,help:account_banking_mandate.mandate_action +msgid "

\n" +" Click to create a new Banking Mandate.\n" +"

\n" +" A Banking Mandate is a document signed by your customer that gives you the autorization to do one or several operations on his bank account.\n" +"

\n" +" " +msgstr "" + +#. module: account_banking_mandate +#: sql_constraint:account.banking.mandate:0 +msgid "A Mandate with the same reference already exists for this company !" +msgstr "" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_account_banking_mandate +msgid "A generic banking mandate" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +msgid "Back to Draft" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,partner_bank_id:0 +msgid "Bank Account" +msgstr "" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_res_partner_bank +msgid "Bank Accounts" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +#: view:account.banking.mandate:account_banking_mandate.view_mandate_tree +msgid "Banking Mandate" +msgstr "" + +#. module: account_banking_mandate +#: model:mail.message.subtype,description:account_banking_mandate.mandate_cancel +msgid "Banking Mandate Cancelled" +msgstr "" + +#. module: account_banking_mandate +#: model:mail.message.subtype,description:account_banking_mandate.mandate_valid +msgid "Banking Mandate Validated" +msgstr "" + +#. module: account_banking_mandate +#: model:mail.message.subtype,description:account_banking_mandate.mandate_expired +msgid "Banking Mandate has Expired" +msgstr "" + +#. module: account_banking_mandate +#: model:ir.actions.act_window,name:account_banking_mandate.mandate_action +msgid "Banking Mandates" +msgstr "" + +#. module: account_banking_mandate +#: help:res.partner.bank,mandate_ids:0 +msgid "Banking mandates represents an authorization that the bank account owner gives to a company for a specific operation" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +msgid "Cancel" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Cancelled" +msgstr "" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:110 +#, python-format +msgid "Cannot validate the mandate '%s' because it is not attached to a bank account." +msgstr "" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:106 +#, python-format +msgid "Cannot validate the mandate '%s' without a date of signature." +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,company_id:0 +msgid "Company" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,create_date:0 +msgid "Created on" +msgstr "" + +#. module: account_banking_mandate +#: view:payment.order:account_banking_mandate.view_mandate_payment_order_form +msgid "DD Mandate" +msgstr "" + +#. module: account_banking_mandate +#: view:res.partner:account_banking_mandate.mandate_partner_form +#: view:res.partner.bank:account_banking_mandate.mandate_partner_bank_tree +msgid "DD Mandates" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,signature_date:0 +msgid "Date of Signature of the Mandate" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,last_debit_date:0 +msgid "Date of the Last Debit" +msgstr "" + +#. module: account_banking_mandate +#: help:account.banking.mandate,message_last_post:0 +msgid "Date of the last message posted on the record." +msgstr "" + +#. module: account_banking_mandate +#: field:account.invoice,mandate_id:0 +#: field:payment.line,mandate_id:0 +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate +#: view:res.partner.bank:account_banking_mandate.mandate_partner_bank_form +#: field:res.partner.bank,mandate_ids:0 +msgid "Direct Debit Mandates" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Draft" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Expired" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_follower_ids:0 +msgid "Followers" +msgstr "" + +#. module: account_banking_mandate +#: help:account.banking.mandate,message_summary:0 +msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views." +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,id:0 +msgid "ID" +msgstr "" + +#. module: account_banking_mandate +#: help:account.banking.mandate,message_unread:0 +msgid "If checked new messages require your attention." +msgstr "" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_is_follower:0 +msgid "Is a Follower" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_last_post:0 +msgid "Last Message Date" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: account_banking_mandate +#: model:mail.message.subtype,name:account_banking_mandate.mandate_cancel +msgid "Mandate Cancelled" +msgstr "" + +#. module: account_banking_mandate +#: model:mail.message.subtype,name:account_banking_mandate.mandate_expired +msgid "Mandate Expired" +msgstr "" + +#. module: account_banking_mandate +#: model:mail.message.subtype,name:account_banking_mandate.mandate_valid +msgid "Mandate Validated" +msgstr "" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:152 +#, python-format +msgid "Mandate should be in cancel state" +msgstr "" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:140 +#, python-format +msgid "Mandate should be in draft or valid state" +msgstr "" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:131 +#, python-format +msgid "Mandate should be in draft state" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_ids:0 +msgid "Messages" +msgstr "" + +#. module: account_banking_mandate +#: help:account.banking.mandate,message_ids:0 +msgid "Messages and communication history" +msgstr "" + +#. module: account_banking_mandate +#: help:account.banking.mandate,state:0 +msgid "Only valid mandates can be used in a payment line. A cancelled mandate is a mandate that has been cancelled by the customer." +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,partner_id:0 +msgid "Partner" +msgstr "" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_payment_line +msgid "Payment Line" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_tree +msgid "Reference" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +#: field:account.banking.mandate,payment_line_ids:0 +msgid "Related Payment Lines" +msgstr "" + +#. module: account_banking_mandate +#: model:ir.ui.menu,name:account_banking_mandate.mandate_menu +msgid "SEPA Direct Debit Mandates" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,scan:0 +msgid "Scan of the Mandate" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Search Banking Mandates" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_tree +msgid "Signature Date" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,state:0 +msgid "Status" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_summary:0 +msgid "Summary" +msgstr "" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:92 +#, python-format +msgid "The date of signature of mandate '%s' is in the future !" +msgstr "" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:97 +#, python-format +msgid "The mandate '%s' can't have a date of last debit before the date of signature." +msgstr "" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/payment_line.py:68 +#, python-format +msgid "The payment line with reference '%s' has the bank account '%s' which is not attached to the mandate '%s' (this mandate is attached to the bank account '%s')." +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,unique_mandate_reference:0 +msgid "Unique Mandate Reference" +msgstr "" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_unread:0 +msgid "Unread Messages" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Valid" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +msgid "Validate" +msgstr "" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +msgid "You should set a mandate back to draft only if you cancelled it by mistake. Do you want to continue?" +msgstr "" + diff --git a/account_banking_mandate/i18n/es.po b/account_banking_mandate/i18n/es.po new file mode 100644 index 000000000..567f167bd --- /dev/null +++ b/account_banking_mandate/i18n/es.po @@ -0,0 +1,360 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 23:00+0000\n" +"PO-Revision-Date: 2014-10-31 23:00+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_mandate +#: model:ir.actions.act_window,help:account_banking_mandate.mandate_action +msgid "

\n" +" Click to create a new Banking Mandate.\n" +"

\n" +" A Banking Mandate is a document signed by your customer that gives you the autorization to do one or several operations on his bank account.\n" +"

\n" +" " +msgstr "

\n" +" Pulse para crear un nuevo mandato bancario.\n" +"

\n" +" Un mandato bancario es un documento firmado por su cliente que le da autorización a hacer una o varias operaciones en su cuenta bancaria.\n" +"

\n" +" " + +#. module: account_banking_mandate +#: sql_constraint:account.banking.mandate:0 +msgid "A Mandate with the same reference already exists for this company !" +msgstr "Ya existe un mandato con la misma referencia para esta compañía" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_account_banking_mandate +msgid "A generic banking mandate" +msgstr "Un mandato bancario genérico" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +msgid "Back to Draft" +msgstr "Volver a borrador" + +#. module: account_banking_mandate +#: field:account.banking.mandate,partner_bank_id:0 +msgid "Bank Account" +msgstr "Cuenta bancaria" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_res_partner_bank +msgid "Bank Accounts" +msgstr "Cuentas bancarias" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +#: view:account.banking.mandate:account_banking_mandate.view_mandate_tree +msgid "Banking Mandate" +msgstr "Mandato bancario" + +#. module: account_banking_mandate +#: model:mail.message.subtype,description:account_banking_mandate.mandate_cancel +msgid "Banking Mandate Cancelled" +msgstr "Mandato bancario cancelado" + +#. module: account_banking_mandate +#: model:mail.message.subtype,description:account_banking_mandate.mandate_valid +msgid "Banking Mandate Validated" +msgstr "Mandato bancario validado" + +#. module: account_banking_mandate +#: model:mail.message.subtype,description:account_banking_mandate.mandate_expired +msgid "Banking Mandate has Expired" +msgstr "El mandato bancario ha expirado" + +#. module: account_banking_mandate +#: model:ir.actions.act_window,name:account_banking_mandate.mandate_action +msgid "Banking Mandates" +msgstr "Mandatos bancarios" + +#. module: account_banking_mandate +#: help:res.partner.bank,mandate_ids:0 +msgid "Banking mandates represents an authorization that the bank account owner gives to a company for a specific operation" +msgstr "Los mandatos bancarios representan una autorización que el propietario de la cuenta bancaria da a la compañía para un operación específica" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +msgid "Cancel" +msgstr "Cancelar" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Cancelled" +msgstr "Cancelado" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:110 +#, python-format +msgid "Cannot validate the mandate '%s' because it is not attached to a bank account." +msgstr "No se puede validar el mandato '%s' porque no tiene ninguna cuenta bancaria asociada." + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:106 +#, python-format +msgid "Cannot validate the mandate '%s' without a date of signature." +msgstr "No se puede validar el mandato '%s' sin una fecha de firma." + +#. module: account_banking_mandate +#: field:account.banking.mandate,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: account_banking_mandate +#: field:account.banking.mandate,create_uid:0 +msgid "Created by" +msgstr "Creado por" + +#. module: account_banking_mandate +#: field:account.banking.mandate,create_date:0 +msgid "Created on" +msgstr "Creado en" + +#. module: account_banking_mandate +#: view:payment.order:account_banking_mandate.view_mandate_payment_order_form +msgid "DD Mandate" +msgstr "Mandato bancario" + +#. module: account_banking_mandate +#: view:res.partner:account_banking_mandate.mandate_partner_form +#: view:res.partner.bank:account_banking_mandate.mandate_partner_bank_tree +msgid "DD Mandates" +msgstr "Mandatos bancarios" + +#. module: account_banking_mandate +#: field:account.banking.mandate,signature_date:0 +msgid "Date of Signature of the Mandate" +msgstr "Fecha de la firma del mandato" + +#. module: account_banking_mandate +#: field:account.banking.mandate,last_debit_date:0 +msgid "Date of the Last Debit" +msgstr "Fecha del último cobro" + +#. module: account_banking_mandate +#: help:account.banking.mandate,message_last_post:0 +msgid "Date of the last message posted on the record." +msgstr "Fecha del último mensaje publicado en el registro." + +#. module: account_banking_mandate +#: field:account.invoice,mandate_id:0 +#: field:payment.line,mandate_id:0 +msgid "Direct Debit Mandate" +msgstr "Mandato de adeudo directo" + +#. module: account_banking_mandate +#: view:res.partner.bank:account_banking_mandate.mandate_partner_bank_form +#: field:res.partner.bank,mandate_ids:0 +msgid "Direct Debit Mandates" +msgstr "Mandatos de adeudo directo" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Draft" +msgstr "Borrador" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Expired" +msgstr "Expirado" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_follower_ids:0 +msgid "Followers" +msgstr "Seguidores" + +#. module: account_banking_mandate +#: help:account.banking.mandate,message_summary:0 +msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views." +msgstr "Contiene el resumen del chatter (nº de mensajes, ...). Este resumen está directamente en formato html para ser insertado en vistas kanban." + +#. module: account_banking_mandate +#: field:account.banking.mandate,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_banking_mandate +#: help:account.banking.mandate,message_unread:0 +msgid "If checked new messages require your attention." +msgstr "Si está marcado, hay nuevos mensajes que requieren su atención" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_is_follower:0 +msgid "Is a Follower" +msgstr "Es un seguidor" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_last_post:0 +msgid "Last Message Date" +msgstr "Fecha del último mensaje" + +#. module: account_banking_mandate +#: field:account.banking.mandate,write_uid:0 +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: account_banking_mandate +#: field:account.banking.mandate,write_date:0 +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: account_banking_mandate +#: model:mail.message.subtype,name:account_banking_mandate.mandate_cancel +msgid "Mandate Cancelled" +msgstr "Mandato cancelado" + +#. module: account_banking_mandate +#: model:mail.message.subtype,name:account_banking_mandate.mandate_expired +msgid "Mandate Expired" +msgstr "Mandato expirado" + +#. module: account_banking_mandate +#: model:mail.message.subtype,name:account_banking_mandate.mandate_valid +msgid "Mandate Validated" +msgstr "Mandato validado" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:152 +#, python-format +msgid "Mandate should be in cancel state" +msgstr "El mandato debe estar en estado cancelado" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:140 +#, python-format +msgid "Mandate should be in draft or valid state" +msgstr "El mandato debe estar en estado borrador o validado" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:131 +#, python-format +msgid "Mandate should be in draft state" +msgstr "El mandato debe estar en estado borrador" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_ids:0 +msgid "Messages" +msgstr "Mensajes" + +#. module: account_banking_mandate +#: help:account.banking.mandate,message_ids:0 +msgid "Messages and communication history" +msgstr "Mensajes e historial de comunicación" + +#. module: account_banking_mandate +#: help:account.banking.mandate,state:0 +msgid "Only valid mandates can be used in a payment line. A cancelled mandate is a mandate that has been cancelled by the customer." +msgstr "Sólo se pueden usar mandatos validados en una línea de pago. Un mandato cancelado en un mandato que ha sido invalidado por el cliente." + +#. module: account_banking_mandate +#: field:account.banking.mandate,partner_id:0 +msgid "Partner" +msgstr "Empresa" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_payment_line +msgid "Payment Line" +msgstr "Línea de pago" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_tree +msgid "Reference" +msgstr "Referencia" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +#: field:account.banking.mandate,payment_line_ids:0 +msgid "Related Payment Lines" +msgstr "Líneas de pago relacionadas" + +#. module: account_banking_mandate +#: model:ir.ui.menu,name:account_banking_mandate.mandate_menu +msgid "SEPA Direct Debit Mandates" +msgstr "Mandatos de adeudo directo SEPA" + +#. module: account_banking_mandate +#: field:account.banking.mandate,scan:0 +msgid "Scan of the Mandate" +msgstr "Escaneado del mandato" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Search Banking Mandates" +msgstr "Buscar mandatos bancarios" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_tree +msgid "Signature Date" +msgstr "Fecha de firma" + +#. module: account_banking_mandate +#: field:account.banking.mandate,state:0 +msgid "Status" +msgstr "Estado" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_summary:0 +msgid "Summary" +msgstr "Resumen" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:92 +#, python-format +msgid "The date of signature of mandate '%s' is in the future !" +msgstr "La fecha de firma del mandato '%s' no puede ser superior a la actual" + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:97 +#, python-format +msgid "The mandate '%s' can't have a date of last debit before the date of signature." +msgstr "El mandato '%s' no puede tener una fecha de último cobro antes de la fecha de firma." + +#. module: account_banking_mandate +#: code:addons/account_banking_mandate/models/payment_line.py:68 +#, python-format +msgid "The payment line with reference '%s' has the bank account '%s' which is not attached to the mandate '%s' (this mandate is attached to the bank account '%s')." +msgstr "La línea de pago con referencia '%s' tiene la cuenta bancaria '%s', que no está puesta en el mandato '%s' (este mandato tiene como cuenta bancaria '%s')." + +#. module: account_banking_mandate +#: field:account.banking.mandate,unique_mandate_reference:0 +msgid "Unique Mandate Reference" +msgstr "Referencia única del mandato" + +#. module: account_banking_mandate +#: field:account.banking.mandate,message_unread:0 +msgid "Unread Messages" +msgstr "Mensajes sin leer" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_search +msgid "Valid" +msgstr "Válido" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +msgid "Validate" +msgstr "Validar" + +#. module: account_banking_mandate +#: view:account.banking.mandate:account_banking_mandate.view_mandate_form +msgid "You should set a mandate back to draft only if you cancelled it by mistake. Do you want to continue?" +msgstr "Debe establecer un mandato de vuelta a borrador sólo si lo cancelo por error. ¿Desea continuar?" + diff --git a/account_banking_pain_base/i18n/account_banking_pain_base.pot b/account_banking_pain_base/i18n/account_banking_pain_base.pot new file mode 100644 index 000000000..3430bda2b --- /dev/null +++ b/account_banking_pain_base/i18n/account_banking_pain_base.pot @@ -0,0 +1,153 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_pain_base +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:52+0000\n" +"PO-Revision-Date: 2014-10-31 22:52+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:74 +#, python-format +msgid "Cannot compute the '%s' of the Payment Line with reference '%s'." +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:80 +#, python-format +msgid "Cannot compute the '%s'." +msgstr "" + +#. module: account_banking_pain_base +#: model:ir.model,name:account_banking_pain_base.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_banking_pain_base +#: field:payment.mode,convert_to_ascii:0 +msgid "Convert to ASCII" +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:47 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:73 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:79 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:89 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:124 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:303 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:385 +#, python-format +msgid "Error:" +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:83 +#, python-format +msgid "Field type error:" +msgstr "" + +#. module: account_banking_pain_base +#: selection:payment.line,priority:0 +msgid "High" +msgstr "" + +#. module: account_banking_pain_base +#: field:banking.export.pain,id:0 +msgid "ID" +msgstr "" + +#. module: account_banking_pain_base +#: help:payment.mode,convert_to_ascii:0 +msgid "If active, Odoo will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file." +msgstr "" + +#. module: account_banking_pain_base +#: field:res.company,initiating_party_issuer:0 +msgid "Initiating Party Issuer" +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:386 +#, python-format +msgid "Missing 'Structured Communication Type' on payment line with reference '%s'." +msgstr "" + +#. module: account_banking_pain_base +#: selection:payment.line,priority:0 +msgid "Normal" +msgstr "" + +#. module: account_banking_pain_base +#: view:res.company:account_banking_pain_base.view_company_form +msgid "Payment Initiation" +msgstr "" + +#. module: account_banking_pain_base +#: model:ir.model,name:account_banking_pain_base.model_payment_line +msgid "Payment Line" +msgstr "" + +#. module: account_banking_pain_base +#: model:ir.model,name:account_banking_pain_base.model_payment_mode +msgid "Payment Mode" +msgstr "" + +#. module: account_banking_pain_base +#: field:payment.line,priority:0 +msgid "Priority" +msgstr "" + +#. module: account_banking_pain_base +#: field:payment.line,struct_communication_type:0 +msgid "Structured Communication Type" +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:90 +#, python-format +msgid "The '%s' is empty or 0. It should have a non-null value." +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:304 +#, python-format +msgid "The bank account with IBAN '%s' of partner '%s' must have an associated BIC because it is a cross-border SEPA operation." +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:125 +#, python-format +msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s" +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:84 +#, python-format +msgid "The type of the field '%s' is %s. It should be a string or unicode." +msgstr "" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:47 +#, python-format +msgid "This IBAN is not valid : %s" +msgstr "" + +#. module: account_banking_pain_base +#: help:payment.line,priority:0 +msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file." +msgstr "" + +#. module: account_banking_pain_base +#: help:res.company,initiating_party_issuer:0 +msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by Odoo." +msgstr "" + diff --git a/account_banking_pain_base/i18n/es.po b/account_banking_pain_base/i18n/es.po new file mode 100644 index 000000000..61fa1e0ba --- /dev/null +++ b/account_banking_pain_base/i18n/es.po @@ -0,0 +1,153 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_pain_base +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:52+0000\n" +"PO-Revision-Date: 2014-10-31 22:52+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:74 +#, python-format +msgid "Cannot compute the '%s' of the Payment Line with reference '%s'." +msgstr "No se puede procesar el campo '%s' de la línea de pago con referencia '%s'." + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:80 +#, python-format +msgid "Cannot compute the '%s'." +msgstr "No se puede procesar el campo '%s'." + +#. module: account_banking_pain_base +#: model:ir.model,name:account_banking_pain_base.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: account_banking_pain_base +#: field:payment.mode,convert_to_ascii:0 +msgid "Convert to ASCII" +msgstr "Convertir a ASCII" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:47 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:73 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:79 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:89 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:124 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:303 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:385 +#, python-format +msgid "Error:" +msgstr "Error:" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:83 +#, python-format +msgid "Field type error:" +msgstr "" + +#. module: account_banking_pain_base +#: selection:payment.line,priority:0 +msgid "High" +msgstr "Alta" + +#. module: account_banking_pain_base +#: field:banking.export.pain,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_banking_pain_base +#: help:payment.mode,convert_to_ascii:0 +msgid "If active, Odoo will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file." +msgstr "Si está marcado, Odoo convertirá cada carácter acentuado en el correspondiente carácter no acentuado, para que sólo se usen caracteres ASCII en el archivo PAIN generado." + +#. module: account_banking_pain_base +#: field:res.company,initiating_party_issuer:0 +msgid "Initiating Party Issuer" +msgstr "Emisor de la transacción" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:386 +#, python-format +msgid "Missing 'Structured Communication Type' on payment line with reference '%s'." +msgstr "Falta el campo 'Tipo de comunicación estructurada' en la línea de pago con referencia '%s'." + +#. module: account_banking_pain_base +#: selection:payment.line,priority:0 +msgid "Normal" +msgstr "Normal" + +#. module: account_banking_pain_base +#: view:res.company:account_banking_pain_base.view_company_form +msgid "Payment Initiation" +msgstr "Iniciación del pago" + +#. module: account_banking_pain_base +#: model:ir.model,name:account_banking_pain_base.model_payment_line +msgid "Payment Line" +msgstr "Línea de pago" + +#. module: account_banking_pain_base +#: model:ir.model,name:account_banking_pain_base.model_payment_mode +msgid "Payment Mode" +msgstr "Modo de pago" + +#. module: account_banking_pain_base +#: field:payment.line,priority:0 +msgid "Priority" +msgstr "Prioridad" + +#. module: account_banking_pain_base +#: field:payment.line,struct_communication_type:0 +msgid "Structured Communication Type" +msgstr "Tipo de comunicación estructurada" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:90 +#, python-format +msgid "The '%s' is empty or 0. It should have a non-null value." +msgstr "'%s' está vacío o es 0. Debería tener un valor no nulo." + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:304 +#, python-format +msgid "The bank account with IBAN '%s' of partner '%s' must have an associated BIC because it is a cross-border SEPA operation." +msgstr "La cuenta bancaria con IBAN '%s' de la empresa '%s' debe tener un BIC asociado, porque es una operación SEPA transfronteriza." + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:125 +#, python-format +msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s" +msgstr "El archivo XML generado no se puede validar contra la definición de esquema XML oficial. El archivo XML generado el error completo se ha escrito en los registros del servidor. Aquí está el error, que le puede dar una idea de la causa del problema : %s" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:84 +#, python-format +msgid "The type of the field '%s' is %s. It should be a string or unicode." +msgstr "El tipo del campo '%s' es %s. Debería ser una cadena o unicode." + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:47 +#, python-format +msgid "This IBAN is not valid : %s" +msgstr "Este IBAN no es válido: %s" + +#. module: account_banking_pain_base +#: help:payment.line,priority:0 +msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file." +msgstr "Este campo se usará como 'Prioridad de instrucción' en el archivo PAIN generado." + +#. module: account_banking_pain_base +#: help:res.company,initiating_party_issuer:0 +msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by Odoo." +msgstr "Este campo se usará como 'Emisor de la transacción' en los archivos PAIN generados por Odoo." + diff --git a/account_banking_pain_base/models/payment_mode.py b/account_banking_pain_base/models/payment_mode.py index 540d01b67..ff9254ca0 100644 --- a/account_banking_pain_base/models/payment_mode.py +++ b/account_banking_pain_base/models/payment_mode.py @@ -29,7 +29,7 @@ class payment_mode(orm.Model): _columns = { 'convert_to_ascii': fields.boolean( 'Convert to ASCII', - help="If active, OpenERP will convert each accented caracter to " + help="If active, Odoo will convert each accented caracter to " "the corresponding unaccented caracter, so that only ASCII " "caracters are used in the generated PAIN file."), } diff --git a/account_banking_pain_base/models/res_company.py b/account_banking_pain_base/models/res_company.py index f63efc29e..182327f8a 100644 --- a/account_banking_pain_base/models/res_company.py +++ b/account_banking_pain_base/models/res_company.py @@ -32,7 +32,7 @@ class ResCompany(orm.Model): 'initiating_party_issuer': fields.char( 'Initiating Party Issuer', size=35, help="This will be used as the 'Initiating Party Issuer' in the " - "PAIN files generated by OpenERP."), + "PAIN files generated by Odoo."), } def _get_initiating_party_identifier( diff --git a/account_banking_payment_export/i18n/account_banking_payment_export.pot b/account_banking_payment_export/i18n/account_banking_payment_export.pot new file mode 100644 index 000000000..700e68d4a --- /dev/null +++ b/account_banking_payment_export/i18n/account_banking_payment_export.pot @@ -0,0 +1,231 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_payment_export +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:52+0000\n" +"PO-Revision-Date: 2014-10-31 22:52+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_payment_export +#: field:payment.mode,active:0 +#: field:payment.mode.type,active:0 +msgid "Active" +msgstr "" + +#. module: account_banking_payment_export +#: field:account.move.line,amount_to_pay:0 +msgid "Amount to pay" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Both" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Cancel" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,code:0 +msgid "Code" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.manual,create_uid:0 +#: field:payment.mode.type,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.manual,create_date:0 +#: field:payment.mode.type,create_date:0 +msgid "Created on" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Debit" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.order,payment_order_type:0 +msgid "Direct debit" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:77 +#, python-format +msgid "Entry Lines" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:68 +#, python-format +msgid "Error" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode,type:0 +msgid "Export type" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.manual,id:0 +#: field:payment.mode.type,id:0 +msgid "ID" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_account_move_line +msgid "Journal Items" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.manual,write_uid:0 +#: field:payment.mode.type,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.manual,write_date:0 +#: field:payment.mode.type,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Manual payment" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,name:0 +msgid "Name" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,payment_order_type:0 +msgid "Order type" +msgstr "" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +#: selection:payment.order,payment_order_type:0 +msgid "Payment" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.actions.act_window,name:account_banking_payment_export.action_payment_mode_type +#: model:ir.ui.menu,name:account_banking_payment_export.menu_payment_mode_type +msgid "Payment Export Types" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode +msgid "Payment Mode" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type +msgid "Payment Mode Type" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_order +msgid "Payment Order" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:53 +#, python-format +msgid "Payment Order Export" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:169 +#, python-format +msgid "Payment Orders" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: help:payment.mode.type,name:0 +msgid "Payment Type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_tree +msgid "Payment Types" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.order,payment_order_type:0 +msgid "Payment order type" +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.mode.type,ir_model_id:0 +msgid "Payment wizard" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Please execute payment order manually, and click OK when succesfully sent." +msgstr "" + +#. module: account_banking_payment_export +#: field:payment.order.create,populate_results:0 +msgid "Populate results directly" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode,type:0 +msgid "Select the Export Payment Type for the Payment Mode." +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode.type,ir_model_id:0 +msgid "Select the Payment Wizard for payments of this type. Leave empty for manual processing" +msgstr "" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_manual +msgid "Send payment order(s) manually" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode.type,code:0 +msgid "Specify the Code for Payment Type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: field:payment.mode.type,suitable_bank_types:0 +msgid "Suitable bank types" +msgstr "" + +#. module: account_banking_payment_export +#: help:payment.mode.type,payment_order_type:0 +msgid "This field determines if this type applies to customers (Debit), suppliers (Payment), or both" +msgstr "" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:69 +#, python-format +msgid "You can only combine payment orders of the same type" +msgstr "" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_banking_payment_order_form_1 +msgid "launch_wizard" +msgstr "" diff --git a/account_banking_payment_export/i18n/es.po b/account_banking_payment_export/i18n/es.po new file mode 100644 index 000000000..80270bb46 --- /dev/null +++ b/account_banking_payment_export/i18n/es.po @@ -0,0 +1,231 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_payment_export +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:52+0000\n" +"PO-Revision-Date: 2014-10-31 22:52+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_payment_export +#: field:payment.mode,active:0 +#: field:payment.mode.type,active:0 +msgid "Active" +msgstr "Activo" + +#. module: account_banking_payment_export +#: field:account.move.line,amount_to_pay:0 +msgid "Amount to pay" +msgstr "Importe a pagar" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Both" +msgstr "Ambos" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Cancel" +msgstr "Cancelar" + +#. module: account_banking_payment_export +#: field:payment.mode.type,code:0 +msgid "Code" +msgstr "Código" + +#. module: account_banking_payment_export +#: field:payment.manual,create_uid:0 +#: field:payment.mode.type,create_uid:0 +msgid "Created by" +msgstr "Creado por" + +#. module: account_banking_payment_export +#: field:payment.manual,create_date:0 +#: field:payment.mode.type,create_date:0 +msgid "Created on" +msgstr "Creado en" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +msgid "Debit" +msgstr "Cobro" + +#. module: account_banking_payment_export +#: selection:payment.order,payment_order_type:0 +msgid "Direct debit" +msgstr "Adeudo directo (cobro)" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:77 +#, python-format +msgid "Entry Lines" +msgstr "Líneas de pago" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:68 +#, python-format +msgid "Error" +msgstr "Error" + +#. module: account_banking_payment_export +#: field:payment.mode,type:0 +msgid "Export type" +msgstr "Tipo de exportación" + +#. module: account_banking_payment_export +#: field:payment.manual,id:0 +#: field:payment.mode.type,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_account_move_line +msgid "Journal Items" +msgstr "Asientos contables" + +#. module: account_banking_payment_export +#: field:payment.manual,write_uid:0 +#: field:payment.mode.type,write_uid:0 +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: account_banking_payment_export +#: field:payment.manual,write_date:0 +#: field:payment.mode.type,write_date:0 +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Manual payment" +msgstr "Pago manual" + +#. module: account_banking_payment_export +#: field:payment.mode.type,name:0 +msgid "Name" +msgstr "Nombre" + +#. module: account_banking_payment_export +#: field:payment.mode.type,payment_order_type:0 +msgid "Order type" +msgstr "Tipo de orden" + +#. module: account_banking_payment_export +#: selection:payment.mode.type,payment_order_type:0 +#: selection:payment.order,payment_order_type:0 +msgid "Payment" +msgstr "Pago" + +#. module: account_banking_payment_export +#: model:ir.actions.act_window,name:account_banking_payment_export.action_payment_mode_type +#: model:ir.ui.menu,name:account_banking_payment_export.menu_payment_mode_type +msgid "Payment Export Types" +msgstr "Tipos de exportación de pagos" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode +msgid "Payment Mode" +msgstr "Modo de pago" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type +msgid "Payment Mode Type" +msgstr "Tipo del modo de pago" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_order +msgid "Payment Order" +msgstr "Orden de pago" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:53 +#, python-format +msgid "Payment Order Export" +msgstr "Exportación de la orden de pago" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:169 +#, python-format +msgid "Payment Orders" +msgstr "Órdenes de pago" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: help:payment.mode.type,name:0 +msgid "Payment Type" +msgstr "Tipo de pago" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_tree +msgid "Payment Types" +msgstr "Tipos de pago" + +#. module: account_banking_payment_export +#: field:payment.order,payment_order_type:0 +msgid "Payment order type" +msgstr "Tipo de la orden de pago" + +#. module: account_banking_payment_export +#: field:payment.mode.type,ir_model_id:0 +msgid "Payment wizard" +msgstr "Asistente de pago" + +#. module: account_banking_payment_export +#: view:payment.manual:account_banking_payment_export.view_payment_manual_form +msgid "Please execute payment order manually, and click OK when succesfully sent." +msgstr "Ejecute la orden de pago manualmente (fuera del sistema), y pulse en Aceptar cuando la haya tramitado correctamente." + +#. module: account_banking_payment_export +#: field:payment.order.create,populate_results:0 +msgid "Populate results directly" +msgstr "Incluir directamente los resultados" + +#. module: account_banking_payment_export +#: help:payment.mode,type:0 +msgid "Select the Export Payment Type for the Payment Mode." +msgstr "Seleccione el tipo de exportación de pago para el modo de pago." + +#. module: account_banking_payment_export +#: help:payment.mode.type,ir_model_id:0 +msgid "Select the Payment Wizard for payments of this type. Leave empty for manual processing" +msgstr "Seleccione el asistente de pago para los pagos de este tipo. Déjelo vacío para un procesado manual." + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_payment_manual +msgid "Send payment order(s) manually" +msgstr "Enviar la(s) orden(es) de pago manualmente" + +#. module: account_banking_payment_export +#: help:payment.mode.type,code:0 +msgid "Specify the Code for Payment Type" +msgstr "Especifica el código para el tipo de pago" + +#. module: account_banking_payment_export +#: view:payment.mode.type:account_banking_payment_export.view_payment_mode_type_form +#: field:payment.mode.type,suitable_bank_types:0 +msgid "Suitable bank types" +msgstr "Tipos de cuentas bancarias adecuadas" + +#. module: account_banking_payment_export +#: help:payment.mode.type,payment_order_type:0 +msgid "This field determines if this type applies to customers (Debit), suppliers (Payment), or both" +msgstr "Este campo determina si este tipo aplica a clientes (Cobro), a proveedores (Pago), o a ambos" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:69 +#, python-format +msgid "You can only combine payment orders of the same type" +msgstr "Sólo puede combinar órdenes de pago del mismo tipo" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_banking_payment_order_form_1 +msgid "launch_wizard" +msgstr "Asistente" diff --git a/account_banking_payment_export/models/payment_mode_type.py b/account_banking_payment_export/models/payment_mode_type.py index 9d2362bdf..3386d11d5 100644 --- a/account_banking_payment_export/models/payment_mode_type.py +++ b/account_banking_payment_export/models/payment_mode_type.py @@ -48,7 +48,7 @@ class PaymentModeType(models.Model): ('both', 'Both')], string='Order type', required=True, default='both', help="This field determines if this type applies to customers " - "(Debit) or suppliers (Payment)") + "(Debit), suppliers (Payment), or both") active = fields.Boolean(string='Active', default=True) def _auto_init(self, cr, context=None): diff --git a/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot b/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot new file mode 100644 index 000000000..ae9645ceb --- /dev/null +++ b/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot @@ -0,0 +1,231 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_sepa_credit_transfer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:52+0000\n" +"PO-Revision-Date: 2014-10-31 22:52+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,batch_booking:0 +#: field:banking.export.sepa.wizard,batch_booking:0 +msgid "Batch Booking" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,charge_bearer:0 +#: selection:banking.export.sepa.wizard,charge_bearer:0 +msgid "Borne by Creditor" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,charge_bearer:0 +#: selection:banking.export.sepa.wizard,charge_bearer:0 +msgid "Borne by Debtor" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view +msgid "Cancel" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,charge_bearer:0 +#: field:banking.export.sepa.wizard,charge_bearer:0 +msgid "Charge Bearer" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa.wizard,state:0 +msgid "Create" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,create_uid:0 +#: field:banking.export.sepa.wizard,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa.wizard,create_date:0 +msgid "Created on" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,state:0 +msgid "Draft" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:124 +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:232 +#, python-format +msgid "Error:" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard +msgid "Export SEPA Credit Transfer File" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa.wizard,file:0 +msgid "File" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa.wizard,filename:0 +msgid "Filename" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa.wizard,state:0 +msgid "Finish" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,charge_bearer:0 +#: selection:banking.export.sepa.wizard,charge_bearer:0 +msgid "Following Service Level" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: help:banking.export.sepa,charge_bearer:0 +msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: help:banking.export.sepa.wizard,charge_bearer:0 +msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa:account_banking_sepa_credit_transfer.view_banking_export_sepa_form +msgid "General Information" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view +msgid "Generate" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,create_date:0 +msgid "Generation Date" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,id:0 +#: field:banking.export.sepa.wizard,id:0 +msgid "ID" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: help:banking.export.sepa,batch_booking:0 +#: help:banking.export.sepa.wizard,batch_booking:0 +msgid "If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file." +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,write_uid:0 +#: field:banking.export.sepa.wizard,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,write_date:0 +#: field:banking.export.sepa.wizard,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:233 +#, python-format +msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')." +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,nb_transactions:0 +#: field:banking.export.sepa.wizard,nb_transactions:0 +msgid "Number of Transactions" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa:account_banking_sepa_credit_transfer.view_banking_export_sepa_form +#: field:banking.export.sepa,payment_order_ids:0 +#: field:banking.export.sepa.wizard,payment_order_ids:0 +msgid "Payment Orders" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:125 +#, python-format +msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'." +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa:account_banking_sepa_credit_transfer.view_banking_export_sepa_form +#: view:banking.export.sepa:account_banking_sepa_credit_transfer.view_banking_export_sepa_tree +msgid "SEPA Credit Transfer" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order +#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa +#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa +msgid "SEPA Credit Transfer Files" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view +msgid "SEPA File Generation" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,file:0 +#: field:banking.export.sepa.wizard,file_id:0 +msgid "SEPA XML File" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa +msgid "SEPA export" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,state:0 +msgid "Sent" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,charge_bearer:0 +#: selection:banking.export.sepa.wizard,charge_bearer:0 +msgid "Shared" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,state:0 +#: field:banking.export.sepa.wizard,state:0 +msgid "State" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,total_amount:0 +#: field:banking.export.sepa.wizard,total_amount:0 +msgid "Total Amount" +msgstr "" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view +msgid "Validate" +msgstr "" + diff --git a/account_banking_sepa_credit_transfer/i18n/es.po b/account_banking_sepa_credit_transfer/i18n/es.po new file mode 100644 index 000000000..5d7b1057b --- /dev/null +++ b/account_banking_sepa_credit_transfer/i18n/es.po @@ -0,0 +1,231 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_sepa_credit_transfer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:52+0000\n" +"PO-Revision-Date: 2014-10-31 22:52+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,batch_booking:0 +#: field:banking.export.sepa.wizard,batch_booking:0 +msgid "Batch Booking" +msgstr "Registro en lote" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,charge_bearer:0 +#: selection:banking.export.sepa.wizard,charge_bearer:0 +msgid "Borne by Creditor" +msgstr "A cargo del acreedor" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,charge_bearer:0 +#: selection:banking.export.sepa.wizard,charge_bearer:0 +msgid "Borne by Debtor" +msgstr "A cargo del deudor" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view +msgid "Cancel" +msgstr "Cancelar" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,charge_bearer:0 +#: field:banking.export.sepa.wizard,charge_bearer:0 +msgid "Charge Bearer" +msgstr "A cargo del portador" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa.wizard,state:0 +msgid "Create" +msgstr "Crear" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,create_uid:0 +#: field:banking.export.sepa.wizard,create_uid:0 +msgid "Created by" +msgstr "Creado por" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa.wizard,create_date:0 +msgid "Created on" +msgstr "Creado en" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,state:0 +msgid "Draft" +msgstr "Borrador" + +#. module: account_banking_sepa_credit_transfer +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:124 +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:232 +#, python-format +msgid "Error:" +msgstr "Error:" + +#. module: account_banking_sepa_credit_transfer +#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard +msgid "Export SEPA Credit Transfer File" +msgstr "Exportar archivo de transferencia SEPA" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa.wizard,file:0 +msgid "File" +msgstr "Archivo" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa.wizard,filename:0 +msgid "Filename" +msgstr "Nombre de archivo" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa.wizard,state:0 +msgid "Finish" +msgstr "Finalizar" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,charge_bearer:0 +#: selection:banking.export.sepa.wizard,charge_bearer:0 +msgid "Following Service Level" +msgstr "Según el acuerdo de servicio" + +#. module: account_banking_sepa_credit_transfer +#: help:banking.export.sepa,charge_bearer:0 +msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." +msgstr "Según el acuerdo de servicio: los costes de la transacción se aplicarán siguiendo las reglas acordadas en el nivel de servicio y/o en el esquema (las remesas SEPA Core deben usar esta opción). Compartidos: los costes de la transacción en la parte del acreedor están a cargo del acreedor, y los costes de la transacción del lado del deudor estarán a cargo del deudor. A cargo del acreedor: todos los costes de la transacción estarán a cargo del acreedor. A cargo del deudor: Todos los costes de la transacción estarán a cargo del deudor." + +#. module: account_banking_sepa_credit_transfer +#: help:banking.export.sepa.wizard,charge_bearer:0 +msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." +msgstr "Según el acuerdo de servicio: los costes de la transacción se aplicarán siguiendo las reglas acordadas en el nivel de servicio y/o en el esquema (las remesas SEPA Core deben usar esta opción). Compartidos: los costes de la transacción en la parte del acreedor están a cargo del acreedor, y los costes de la transacción del lado del deudor estarán a cargo del deudor. A cargo del acreedor: todos los costes de la transacción estarán a cargo del acreedor. A cargo del deudor: Todos los costes de la transacción estarán a cargo del deudor." + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa:account_banking_sepa_credit_transfer.view_banking_export_sepa_form +msgid "General Information" +msgstr "Información general" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view +msgid "Generate" +msgstr "Generar" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,create_date:0 +msgid "Generation Date" +msgstr "Fecha de generación" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,id:0 +#: field:banking.export.sepa.wizard,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_banking_sepa_credit_transfer +#: help:banking.export.sepa,batch_booking:0 +#: help:banking.export.sepa.wizard,batch_booking:0 +msgid "If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file." +msgstr "Si está marcado, el extracto bancario mostrará sólo una línea del haber para todos los adeudos directos del archivo SEPA; si no está marcado, entonces el extracto bancario mostrará una línea por cada adeudo directo del archivo SEPA." + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,write_uid:0 +#: field:banking.export.sepa.wizard,write_uid:0 +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,write_date:0 +#: field:banking.export.sepa.wizard,write_date:0 +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: account_banking_sepa_credit_transfer +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:233 +#, python-format +msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')." +msgstr "Falta la cuenta bancaria en la factura '%s' (línea de pago con referencia '%s')." + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,nb_transactions:0 +#: field:banking.export.sepa.wizard,nb_transactions:0 +msgid "Number of Transactions" +msgstr "Nº de transacciones" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa:account_banking_sepa_credit_transfer.view_banking_export_sepa_form +#: field:banking.export.sepa,payment_order_ids:0 +#: field:banking.export.sepa.wizard,payment_order_ids:0 +msgid "Payment Orders" +msgstr "Órdenes de pago" + +#. module: account_banking_sepa_credit_transfer +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:125 +#, python-format +msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'." +msgstr "El código de tipo de pago '%s' no está soportado. Los únicos código de tipo de pago soportados por las transferencias SEPA son 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' y 'pain.001.001.05'." + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa:account_banking_sepa_credit_transfer.view_banking_export_sepa_form +#: view:banking.export.sepa:account_banking_sepa_credit_transfer.view_banking_export_sepa_tree +msgid "SEPA Credit Transfer" +msgstr "Transferencia SEPA" + +#. module: account_banking_sepa_credit_transfer +#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order +#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa +#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa +msgid "SEPA Credit Transfer Files" +msgstr "Archivos de transferencias SEPA" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view +msgid "SEPA File Generation" +msgstr "Generación de archivo SEPA" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,file:0 +#: field:banking.export.sepa.wizard,file_id:0 +msgid "SEPA XML File" +msgstr "Archivo SEPA XML" + +#. module: account_banking_sepa_credit_transfer +#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa +msgid "SEPA export" +msgstr "Exportación de SEPA" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,state:0 +msgid "Sent" +msgstr "Enviado" + +#. module: account_banking_sepa_credit_transfer +#: selection:banking.export.sepa,charge_bearer:0 +#: selection:banking.export.sepa.wizard,charge_bearer:0 +msgid "Shared" +msgstr "Compartidos" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,state:0 +#: field:banking.export.sepa.wizard,state:0 +msgid "State" +msgstr "Estado" + +#. module: account_banking_sepa_credit_transfer +#: field:banking.export.sepa,total_amount:0 +#: field:banking.export.sepa.wizard,total_amount:0 +msgid "Total Amount" +msgstr "Importe total" + +#. module: account_banking_sepa_credit_transfer +#: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view +msgid "Validate" +msgstr "Validar" + diff --git a/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot b/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot new file mode 100644 index 000000000..a39fa750a --- /dev/null +++ b/account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot @@ -0,0 +1,447 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_sepa_direct_debit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:53+0000\n" +"PO-Revision-Date: 2014-10-31 22:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_sepa_direct_debit +#: model:ir.actions.act_window,help:account_banking_sepa_direct_debit.mandate_action +msgid "

\n" +" Click to create a new SEPA Direct Debit Mandate.\n" +"

\n" +" A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account.\n" +"

\n" +" " +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_account_banking_mandate +msgid "A generic banking mandate" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:120 +#, python-format +msgid "As you changed the bank account attached to this mandate, the 'Sequence Type' has been set back to 'First'." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,scheme:0 +msgid "Basic (CORE)" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,batch_booking:0 +#: field:banking.export.sdd.wizard,batch_booking:0 +msgid "Batch Booking" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,charge_bearer:0 +#: selection:banking.export.sdd.wizard,charge_bearer:0 +msgid "Borne by Creditor" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,charge_bearer:0 +#: selection:banking.export.sdd.wizard,charge_bearer:0 +msgid "Borne by Debtor" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd.wizard:account_banking_sepa_direct_debit.banking_export_sdd_wizard_view +msgid "Cancel" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,charge_bearer:0 +#: field:banking.export.sdd.wizard,charge_bearer:0 +msgid "Charge Bearer" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd.wizard,state:0 +msgid "Create" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,create_uid:0 +#: field:banking.export.sdd.wizard,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd.wizard,create_date:0 +msgid "Created on" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,state:0 +msgid "Draft" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: help:res.company,sepa_creditor_identifier:0 +msgid "Enter the Creditor Identifier that has been attributed to your company to make SEPA Direct Debits. This identifier is composed of :\n" +"- your country ISO code (2 letters)\n" +"- a 2-digits checkum\n" +"- a 3-letters business code\n" +"- a country-specific identifier" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,scheme:0 +msgid "Enterprise (B2B)" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/res_company.py:79 +#, python-format +msgid "Error" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:137 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:185 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:193 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:202 +#, python-format +msgid "Error:" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd_wizard +msgid "Export SEPA Direct Debit File" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd.wizard,file:0 +msgid "File" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,filename:0 +#: field:banking.export.sdd.wizard,filename:0 +msgid "Filename" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,recurrent_sequence_type:0 +msgid "Final" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd.wizard,state:0 +msgid "Finish" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,recurrent_sequence_type:0 +msgid "First" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,charge_bearer:0 +#: selection:banking.export.sdd.wizard,charge_bearer:0 +msgid "Following Service Level" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: help:banking.export.sdd,charge_bearer:0 +#: help:banking.export.sdd.wizard,charge_bearer:0 +msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd:account_banking_sepa_direct_debit.view_banking_export_sdd_form +msgid "General Information" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd.wizard:account_banking_sepa_direct_debit.banking_export_sdd_wizard_view +msgid "Generate" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.act_banking_export_sdd_payment_order +msgid "Generated SEPA Direct Debit Files" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,create_date:0 +msgid "Generation Date" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,id:0 +#: field:banking.export.sdd.wizard,id:0 +msgid "ID" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: help:account.banking.mandate,sepa_migrated:0 +msgid "If this field is not active, the mandate section of the next direct debit file that include this mandate will contain the 'Original Mandate Identification' and the 'Original Creditor Scheme Identification'. This is required in a few countries (Belgium for instance), but not in all countries. If this is not required in your country, you should keep this field always active." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: help:banking.export.sdd,batch_booking:0 +#: help:banking.export.sdd.wizard,batch_booking:0 +msgid "If true, the bank statement will display only one credit line for all the direct debits of the SEPA file ; if false, the bank statement will display one credit line per direct debit of the SEPA file." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/res_company.py:80 +#, python-format +msgid "Invalid SEPA Creditor Identifier." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,write_uid:0 +#: field:banking.export.sdd.wizard,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,write_date:0 +#: field:banking.export.sdd.wizard,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:119 +#, python-format +msgid "Mandate update" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,sepa_migrated:0 +msgid "Migrated to SEPA" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:186 +#, python-format +msgid "Missing SEPA Direct Debit mandate on the payment line with partner '%s' and Invoice ref '%s'." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,nb_transactions:0 +#: field:banking.export.sdd.wizard,nb_transactions:0 +msgid "Number of Transactions" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_search +#: selection:account.banking.mandate,type:0 +msgid "One-Off" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:res.company,original_creditor_identifier:0 +msgid "Original Creditor Identifier" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,original_mandate_identification:0 +msgid "Original Mandate Identification" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:res.groups,name:account_banking_sepa_direct_debit.group_original_mandate_required +msgid "Original Mandate Required (SEPA)" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd:account_banking_sepa_direct_debit.view_banking_export_sdd_form +#: field:banking.export.sdd,payment_order_ids:0 +#: field:banking.export.sdd.wizard,payment_order_ids:0 +msgid "Payment Orders" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:138 +#, python-format +msgid "Payment Type Code '%s' is not supported. The only Payment Type Code supported for SEPA Direct Debit are 'pain.008.001.02', 'pain.008.001.03' and 'pain.008.001.04'." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_search +#: selection:account.banking.mandate,type:0 +msgid "Recurrent" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,recurrent_sequence_type:0 +msgid "Recurring" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd.wizard,file_id:0 +msgid "SDD File" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:res.partner:account_banking_sepa_direct_debit.sdd_mandate_partner_form +#: view:res.partner.bank:account_banking_sepa_direct_debit.sdd_mandate_partner_bank_tree +msgid "SDD Mandates" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:res.company,sepa_creditor_identifier:0 +msgid "SEPA Creditor Identifier" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd:account_banking_sepa_direct_debit.view_banking_export_sdd_form +#: view:banking.export.sdd:account_banking_sepa_direct_debit.view_banking_export_sdd_tree +msgid "SEPA Direct Debit" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.action_account_banking_sdd +#: model:ir.ui.menu,name:account_banking_sepa_direct_debit.menu_account_banking_sdd +msgid "SEPA Direct Debit Files" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.mandate_action +msgid "SEPA Direct Debit Mandates" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd.wizard:account_banking_sepa_direct_debit.banking_export_sdd_wizard_view +msgid "SEPA Direct Debit XML file generation" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd +msgid "SEPA Direct Debit export" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,file:0 +msgid "SEPA File" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,scheme:0 +msgid "Scheme" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,state:0 +msgid "Sent" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,recurrent_sequence_type:0 +msgid "Sequence Type for Next Debit" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_final +#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_final +msgid "Sequence Type set to Final" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_first +#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_first +msgid "Sequence Type set to First" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring +#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring +msgid "Sequence Type set to Recurring" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,charge_bearer:0 +#: selection:banking.export.sdd.wizard,charge_bearer:0 +msgid "Shared" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,state:0 +#: field:banking.export.sdd.wizard,state:0 +msgid "State" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:194 +#, python-format +msgid "The SEPA Direct Debit mandate with reference '%s' for partner '%s' has expired." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:203 +#, python-format +msgid "The mandate with reference '%s' for partner '%s' has type set to 'One-Off' and it has a last debit date set to '%s', so we can't use it." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:86 +#, python-format +msgid "The recurrent mandate '%s' must have a sequence type." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:95 +#, python-format +msgid "The recurrent mandate '%s' which is not marked as 'Migrated to SEPA' must have its recurrent sequence type set to 'First'." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: help:account.banking.mandate,recurrent_sequence_type:0 +msgid "This field is only used for Recurrent mandates, not for One-Off mandates." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,total_amount:0 +#: field:banking.export.sdd.wizard,total_amount:0 +msgid "Total Amount" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_tree +msgid "Type" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,type:0 +msgid "Type of Mandate" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd.wizard:account_banking_sepa_direct_debit.banking_export_sdd_wizard_view +msgid "Validate" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: help:account.banking.mandate,original_mandate_identification:0 +msgid "When the field 'Migrated to SEPA' is not active, this field will be used as the Original Mandate Identification in the Direct Debit file." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:105 +#, python-format +msgid "You must set the 'Original Mandate Identification' on the recurrent mandate '%s' which is not marked as 'Migrated to SEPA'." +msgstr "" + diff --git a/account_banking_sepa_direct_debit/i18n/es.po b/account_banking_sepa_direct_debit/i18n/es.po new file mode 100644 index 000000000..98334c842 --- /dev/null +++ b/account_banking_sepa_direct_debit/i18n/es.po @@ -0,0 +1,456 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_sepa_direct_debit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:53+0000\n" +"PO-Revision-Date: 2014-10-31 22:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_sepa_direct_debit +#: model:ir.actions.act_window,help:account_banking_sepa_direct_debit.mandate_action +msgid "

\n" +" Click to create a new SEPA Direct Debit Mandate.\n" +"

\n" +" A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account.\n" +"

\n" +" " +msgstr "

\n" +" Pulse para crear un nuevo mandato de adeudo directo SEPA.\n" +"

\n" +" Un mandato de adeudo directo SEPA es un documento firmado por su cliente que le autoriza a realizar uno o más cobros directos en su cuenta bancaria, también conocidas como domiciliaciones.\n" +"

\n" +" " + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_account_banking_mandate +msgid "A generic banking mandate" +msgstr "Un mandato bancario genérico" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:120 +#, python-format +msgid "As you changed the bank account attached to this mandate, the 'Sequence Type' has been set back to 'First'." +msgstr "Puesto que ha cambiar la cuenta bancaria relacionada con este mandato, el 'Tipo de secuencia' se ha vuelto a 'Inicial'." + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,scheme:0 +msgid "Basic (CORE)" +msgstr "Básico (CORE)" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,batch_booking:0 +#: field:banking.export.sdd.wizard,batch_booking:0 +msgid "Batch Booking" +msgstr "Registro en lote" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,charge_bearer:0 +#: selection:banking.export.sdd.wizard,charge_bearer:0 +msgid "Borne by Creditor" +msgstr "A cargo del acreedor" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,charge_bearer:0 +#: selection:banking.export.sdd.wizard,charge_bearer:0 +msgid "Borne by Debtor" +msgstr "A cargo del deudor" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd.wizard:account_banking_sepa_direct_debit.banking_export_sdd_wizard_view +msgid "Cancel" +msgstr "Cancelar" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,charge_bearer:0 +#: field:banking.export.sdd.wizard,charge_bearer:0 +msgid "Charge Bearer" +msgstr "A cargo del portador" + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd.wizard,state:0 +msgid "Create" +msgstr "Crear" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,create_uid:0 +#: field:banking.export.sdd.wizard,create_uid:0 +msgid "Created by" +msgstr "Creado por" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd.wizard,create_date:0 +msgid "Created on" +msgstr "Creado en" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,state:0 +msgid "Draft" +msgstr "Borrador" + +#. module: account_banking_sepa_direct_debit +#: help:res.company,sepa_creditor_identifier:0 +msgid "Enter the Creditor Identifier that has been attributed to your company to make SEPA Direct Debits. This identifier is composed of :\n" +"- your country ISO code (2 letters)\n" +"- a 2-digits checkum\n" +"- a 3-letters business code\n" +"- a country-specific identifier" +msgstr "Introduzca el identificador de acreedor que se le ha atribuido a su compañía para realizar adeudos directos SEPA. Su banco suele poseer esta información. Este identificador se compone de:\n" +"- el código ISO de 2 letras de su país\n" +"- dos dígitos de comprobación\n" +"- tres letras de código de negocio\n" +"- un identificador específico de país (en España, el NIF)" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,scheme:0 +msgid "Enterprise (B2B)" +msgstr "Empresa (B2B)" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/res_company.py:79 +#, python-format +msgid "Error" +msgstr "Error" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:137 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:185 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:193 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:202 +#, python-format +msgid "Error:" +msgstr "Error:" + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd_wizard +msgid "Export SEPA Direct Debit File" +msgstr "Exportar archivo de adeudo directo SEPA" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd.wizard,file:0 +msgid "File" +msgstr "Archivo" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,filename:0 +#: field:banking.export.sdd.wizard,filename:0 +msgid "Filename" +msgstr "Nombre de archivo" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,recurrent_sequence_type:0 +msgid "Final" +msgstr "Final" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd.wizard,state:0 +msgid "Finish" +msgstr "Finalizar" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,recurrent_sequence_type:0 +msgid "First" +msgstr "Inicial" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,charge_bearer:0 +#: selection:banking.export.sdd.wizard,charge_bearer:0 +msgid "Following Service Level" +msgstr "Según el acuerdo de servicio" + +#. module: account_banking_sepa_direct_debit +#: help:banking.export.sdd,charge_bearer:0 +#: help:banking.export.sdd.wizard,charge_bearer:0 +msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." +msgstr "Según el acuerdo de servicio: los costes de la transacción se aplicarán siguiendo las reglas acordadas en el nivel de servicio y/o en el esquema (las remesas SEPA Core deben usar esta opción). Compartidos: los costes de la transacción en la parte del acreedor están a cargo del acreedor, y los costes de la transacción del lado del deudor estarán a cargo del deudor. A cargo del acreedor: todos los costes de la transacción estarán a cargo del acreedor. A cargo del deudor: Todos los costes de la transacción estarán a cargo del deudor." + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd:account_banking_sepa_direct_debit.view_banking_export_sdd_form +msgid "General Information" +msgstr "Información general" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd.wizard:account_banking_sepa_direct_debit.banking_export_sdd_wizard_view +msgid "Generate" +msgstr "Generar" + +#. module: account_banking_sepa_direct_debit +#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.act_banking_export_sdd_payment_order +msgid "Generated SEPA Direct Debit Files" +msgstr "Archivos de adeudos directos SEPA generados" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,create_date:0 +msgid "Generation Date" +msgstr "Fecha de generación" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,id:0 +#: field:banking.export.sdd.wizard,id:0 +msgid "ID" +msgstr "ID" + +#. module: account_banking_sepa_direct_debit +#: help:account.banking.mandate,sepa_migrated:0 +msgid "If this field is not active, the mandate section of the next direct debit file that include this mandate will contain the 'Original Mandate Identification' and the 'Original Creditor Scheme Identification'. This is required in a few countries (Belgium for instance), but not in all countries. If this is not required in your country, you should keep this field always active." +msgstr "Si este campo no está marcado, la sección 'mandato' del próximo archivo de adeudo directo que lo incluya contendrá el valor de los campos 'Identificación del mandato original' y 'Identificación del esquema original del acreedor'. Esto se requiere en algunos países (Bélgica por ejemplo), pero no en todos ellos. Si no es un requisito en su país, este campo siempre debe estar marcado." + +#. module: account_banking_sepa_direct_debit +#: help:banking.export.sdd,batch_booking:0 +#: help:banking.export.sdd.wizard,batch_booking:0 +msgid "If true, the bank statement will display only one credit line for all the direct debits of the SEPA file ; if false, the bank statement will display one credit line per direct debit of the SEPA file." +msgstr "Si está marcado, el extracto bancario mostrará sólo una línea del haber para todos los adeudos directos del archivo SEPA; si no está marcado, entonces el extracto bancario mostrará una línea por cada adeudo directo del archivo SEPA." + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/res_company.py:80 +#, python-format +msgid "Invalid SEPA Creditor Identifier." +msgstr "Identificador de acreedor SEPA no válido." + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,write_uid:0 +#: field:banking.export.sdd.wizard,write_uid:0 +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,write_date:0 +#: field:banking.export.sdd.wizard,write_date:0 +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:119 +#, python-format +msgid "Mandate update" +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,sepa_migrated:0 +msgid "Migrated to SEPA" +msgstr "Migrado a SEPA" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:186 +#, python-format +msgid "Missing SEPA Direct Debit mandate on the payment line with partner '%s' and Invoice ref '%s'." +msgstr "Falta el mandato de adeudo directo SEPA en la línea con la empresa '%s' y la factura con referencia '%s'" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,nb_transactions:0 +#: field:banking.export.sdd.wizard,nb_transactions:0 +msgid "Number of Transactions" +msgstr "Nº de transacciones" + +#. module: account_banking_sepa_direct_debit +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_search +#: selection:account.banking.mandate,type:0 +msgid "One-Off" +msgstr "Único" + +#. module: account_banking_sepa_direct_debit +#: field:res.company,original_creditor_identifier:0 +msgid "Original Creditor Identifier" +msgstr "Identificador del acreedor original" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,original_mandate_identification:0 +msgid "Original Mandate Identification" +msgstr "Identificación del mandato original" + +#. module: account_banking_sepa_direct_debit +#: model:res.groups,name:account_banking_sepa_direct_debit.group_original_mandate_required +msgid "Original Mandate Required (SEPA)" +msgstr "Mandato original requerido (SEPA)" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd:account_banking_sepa_direct_debit.view_banking_export_sdd_form +#: field:banking.export.sdd,payment_order_ids:0 +#: field:banking.export.sdd.wizard,payment_order_ids:0 +msgid "Payment Orders" +msgstr "Órdenes de pago" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:138 +#, python-format +msgid "Payment Type Code '%s' is not supported. The only Payment Type Code supported for SEPA Direct Debit are 'pain.008.001.02', 'pain.008.001.03' and 'pain.008.001.04'." +msgstr "" + +#. module: account_banking_sepa_direct_debit +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_search +#: selection:account.banking.mandate,type:0 +msgid "Recurrent" +msgstr "Recurrente" + +#. module: account_banking_sepa_direct_debit +#: selection:account.banking.mandate,recurrent_sequence_type:0 +msgid "Recurring" +msgstr "Periódico" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd.wizard,file_id:0 +msgid "SDD File" +msgstr "Archivo SDD" + +#. module: account_banking_sepa_direct_debit +#: view:res.partner:account_banking_sepa_direct_debit.sdd_mandate_partner_form +#: view:res.partner.bank:account_banking_sepa_direct_debit.sdd_mandate_partner_bank_tree +msgid "SDD Mandates" +msgstr "Mandatos SDD" + +#. module: account_banking_sepa_direct_debit +#: field:res.company,sepa_creditor_identifier:0 +msgid "SEPA Creditor Identifier" +msgstr "Identificador de acreedor SEPA" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd:account_banking_sepa_direct_debit.view_banking_export_sdd_form +#: view:banking.export.sdd:account_banking_sepa_direct_debit.view_banking_export_sdd_tree +msgid "SEPA Direct Debit" +msgstr "Adeudo directo SEPA" + +#. module: account_banking_sepa_direct_debit +#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.action_account_banking_sdd +#: model:ir.ui.menu,name:account_banking_sepa_direct_debit.menu_account_banking_sdd +msgid "SEPA Direct Debit Files" +msgstr "Archivos de adeudos directos SEPA" + +#. module: account_banking_sepa_direct_debit +#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.mandate_action +msgid "SEPA Direct Debit Mandates" +msgstr "Mandatos de adeudos directos SEPA" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd.wizard:account_banking_sepa_direct_debit.banking_export_sdd_wizard_view +msgid "SEPA Direct Debit XML file generation" +msgstr "Generación del archivo XML de adeudo directo SEPA" + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd +msgid "SEPA Direct Debit export" +msgstr "Exportación de adeudo directo SEPA" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,file:0 +msgid "SEPA File" +msgstr "Archivo SEPA" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,scheme:0 +msgid "Scheme" +msgstr "Esquema" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,state:0 +msgid "Sent" +msgstr "Enviado" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,recurrent_sequence_type:0 +msgid "Sequence Type for Next Debit" +msgstr "Tipo de secuencia para el próximo cobro" + +#. module: account_banking_sepa_direct_debit +#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_final +#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_final +msgid "Sequence Type set to Final" +msgstr "Tipo de secuencia establecida a 'Final'" + +#. module: account_banking_sepa_direct_debit +#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_first +#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_first +msgid "Sequence Type set to First" +msgstr "Tipo de secuencia establecida a 'Inicial'" + +#. module: account_banking_sepa_direct_debit +#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring +#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring +msgid "Sequence Type set to Recurring" +msgstr "Tipo de secuencia establecida a 'Recurrente'" + +#. module: account_banking_sepa_direct_debit +#: selection:banking.export.sdd,charge_bearer:0 +#: selection:banking.export.sdd.wizard,charge_bearer:0 +msgid "Shared" +msgstr "Compartidos" + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,state:0 +#: field:banking.export.sdd.wizard,state:0 +msgid "State" +msgstr "Estado" + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:194 +#, python-format +msgid "The SEPA Direct Debit mandate with reference '%s' for partner '%s' has expired." +msgstr "El mandato de adeudo directo SEPA con referencia '%s' para la empresa '%s' ha expirado." + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:203 +#, python-format +msgid "The mandate with reference '%s' for partner '%s' has type set to 'One-Off' and it has a last debit date set to '%s', so we can't use it." +msgstr "El mandato con referencia '%s' para la empresa '%s' tipo como 'Único', ya tiene como fecha de último cobro '%s', por lo que no se puede usar." + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:86 +#, python-format +msgid "The recurrent mandate '%s' must have a sequence type." +msgstr "El mandato periódico '%s' debe tener un tipo de secuencia." + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:95 +#, python-format +msgid "The recurrent mandate '%s' which is not marked as 'Migrated to SEPA' must have its recurrent sequence type set to 'First'." +msgstr "El mandato periódico '%s', que no está marcado como 'Migrado a SEPA', debe establecer su tipo de secuencia a 'Inicial'." + +#. module: account_banking_sepa_direct_debit +#: help:account.banking.mandate,recurrent_sequence_type:0 +msgid "This field is only used for Recurrent mandates, not for One-Off mandates." +msgstr "Este campo se utiliza sólo para mandatos periódicos, no para únicos." + +#. module: account_banking_sepa_direct_debit +#: field:banking.export.sdd,total_amount:0 +#: field:banking.export.sdd.wizard,total_amount:0 +msgid "Total Amount" +msgstr "Importe total" + +#. module: account_banking_sepa_direct_debit +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_tree +msgid "Type" +msgstr "Tipo" + +#. module: account_banking_sepa_direct_debit +#: field:account.banking.mandate,type:0 +msgid "Type of Mandate" +msgstr "Tipo de mandato" + +#. module: account_banking_sepa_direct_debit +#: view:banking.export.sdd.wizard:account_banking_sepa_direct_debit.banking_export_sdd_wizard_view +msgid "Validate" +msgstr "Validar" + +#. module: account_banking_sepa_direct_debit +#: help:account.banking.mandate,original_mandate_identification:0 +msgid "When the field 'Migrated to SEPA' is not active, this field will be used as the Original Mandate Identification in the Direct Debit file." +msgstr "Cuando el campo 'Migrado a SEPA' no está marcado, este campo se usa como identificación del mandato original en el archivo de adeudo directo." + +#. module: account_banking_sepa_direct_debit +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:105 +#, python-format +msgid "You must set the 'Original Mandate Identification' on the recurrent mandate '%s' which is not marked as 'Migrated to SEPA'." +msgstr "Debe establecer el campo 'Identificación de mandato original en el mandato periódico '%s', que no está marcado como 'Migrado a SEPA'." + diff --git a/account_direct_debit/i18n/account_direct_debit.pot b/account_direct_debit/i18n/account_direct_debit.pot new file mode 100644 index 000000000..191f17bec --- /dev/null +++ b/account_direct_debit/i18n/account_direct_debit.pot @@ -0,0 +1,127 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_direct_debit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 23:05+0000\n" +"PO-Revision-Date: 2014-10-31 23:05+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_direct_debit +#: model:ir.actions.act_window,help:account_direct_debit.action_debit_order_tree +msgid "A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for." +msgstr "" + +#. module: account_direct_debit +#: field:account.move.line,amount_to_receive:0 +msgid "Amount to receive" +msgstr "" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/payment_line.py:133 +#, python-format +msgid "Can not reconcile" +msgstr "" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/payment_line.py:134 +#, python-format +msgid "Cancelation of payment line '%s' has already been processed" +msgstr "" + +#. module: account_direct_debit +#: view:account.invoice:account_direct_debit.invoice_form +msgid "Debit Denied" +msgstr "" + +#. module: account_direct_debit +#: view:account.invoice:account_direct_debit.view_account_invoice_filter +msgid "Debit denied" +msgstr "" + +#. module: account_direct_debit +#: model:ir.actions.act_window,name:account_direct_debit.action_debit_order_tree +#: model:ir.ui.menu,name:account_direct_debit.menu_action_debit_order_form +msgid "Direct Debit Orders" +msgstr "" + +#. module: account_direct_debit +#: model:account.payment.term,name:account_direct_debit.payment_term_direct_debit +msgid "Direct debit" +msgstr "" + +#. module: account_direct_debit +#: model:account.payment.term,note:account_direct_debit.payment_term_direct_debit +msgid "Direct debit in 14 days" +msgstr "" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/account_invoice.py:149 +#, python-format +msgid "Error !" +msgstr "" + +#. module: account_direct_debit +#: help:payment.line,storno:0 +msgid "If this is true, the debit order has been canceled by the bank or by the customer" +msgstr "" + +#. module: account_direct_debit +#: model:ir.model,name:account_direct_debit.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/account_invoice.py:154 +#, python-format +msgid "Invoice '%s': direct debit is denied." +msgstr "" + +#. module: account_direct_debit +#: view:payment.order:account_direct_debit.view_payment_order_form +msgid "Invoices" +msgstr "" + +#. module: account_direct_debit +#: model:ir.model,name:account_direct_debit.model_account_move_line +msgid "Journal Items" +msgstr "" + +#. module: account_direct_debit +#: model:ir.model,name:account_direct_debit.model_payment_line +msgid "Payment Line" +msgstr "" + +#. module: account_direct_debit +#: model:ir.model,name:account_direct_debit.model_payment_order +msgid "Payment Order" +msgstr "" + +#. module: account_direct_debit +#: view:payment.order:account_direct_debit.view_payment_order_form +msgid "Select invoices to collect" +msgstr "" + +#. module: account_direct_debit +#: view:account.invoice:account_direct_debit.view_account_invoice_filter +msgid "Show only invoices with state Debit denied" +msgstr "" + +#. module: account_direct_debit +#: field:payment.line,storno:0 +msgid "Storno" +msgstr "" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/account_invoice.py:150 +#, python-format +msgid "You cannot set invoice '%s' to state 'debit denied', as it is still reconciled." +msgstr "" diff --git a/account_direct_debit/i18n/es.po b/account_direct_debit/i18n/es.po new file mode 100644 index 000000000..d5aacd581 --- /dev/null +++ b/account_direct_debit/i18n/es.po @@ -0,0 +1,127 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_direct_debit +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 23:05+0000\n" +"PO-Revision-Date: 2014-10-31 23:05+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_direct_debit +#: model:ir.actions.act_window,help:account_direct_debit.action_debit_order_tree +msgid "A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for." +msgstr "Una orden de cobro es una petición de dinero de su compañía para saldar las facturas de cliente. Aquí puede registrar todas las órdenes de cobro que se deban realizar, seguirles el rastro, y apuntar la referencia de factura y de la empresa para la que se debe hacer el cargo." + +#. module: account_direct_debit +#: field:account.move.line,amount_to_receive:0 +msgid "Amount to receive" +msgstr "Importe a cobrar" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/payment_line.py:133 +#, python-format +msgid "Can not reconcile" +msgstr "No puede ser conciliada" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/payment_line.py:134 +#, python-format +msgid "Cancelation of payment line '%s' has already been processed" +msgstr "" + +#. module: account_direct_debit +#: view:account.invoice:account_direct_debit.invoice_form +msgid "Debit Denied" +msgstr "Cobro denegado" + +#. module: account_direct_debit +#: view:account.invoice:account_direct_debit.view_account_invoice_filter +msgid "Debit denied" +msgstr "Cobro denegado" + +#. module: account_direct_debit +#: model:ir.actions.act_window,name:account_direct_debit.action_debit_order_tree +#: model:ir.ui.menu,name:account_direct_debit.menu_action_debit_order_form +msgid "Direct Debit Orders" +msgstr "Órdenes de cobro" + +#. module: account_direct_debit +#: model:account.payment.term,name:account_direct_debit.payment_term_direct_debit +msgid "Direct debit" +msgstr "Cobro" + +#. module: account_direct_debit +#: model:account.payment.term,note:account_direct_debit.payment_term_direct_debit +msgid "Direct debit in 14 days" +msgstr "Adeudo directo en 14 días" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/account_invoice.py:149 +#, python-format +msgid "Error !" +msgstr "Error" + +#. module: account_direct_debit +#: help:payment.line,storno:0 +msgid "If this is true, the debit order has been canceled by the bank or by the customer" +msgstr "Si la casilla está marcada, la orden de cobro ha sido cancelada por el banco o por el cliente" + +#. module: account_direct_debit +#: model:ir.model,name:account_direct_debit.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/account_invoice.py:154 +#, python-format +msgid "Invoice '%s': direct debit is denied." +msgstr "Factura '%s': adeudo directo denegado" + +#. module: account_direct_debit +#: view:payment.order:account_direct_debit.view_payment_order_form +msgid "Invoices" +msgstr "Facturas" + +#. module: account_direct_debit +#: model:ir.model,name:account_direct_debit.model_account_move_line +msgid "Journal Items" +msgstr "Asientos contables" + +#. module: account_direct_debit +#: model:ir.model,name:account_direct_debit.model_payment_line +msgid "Payment Line" +msgstr "Línea de pago" + +#. module: account_direct_debit +#: model:ir.model,name:account_direct_debit.model_payment_order +msgid "Payment Order" +msgstr "Orden de pago" + +#. module: account_direct_debit +#: view:payment.order:account_direct_debit.view_payment_order_form +msgid "Select invoices to collect" +msgstr "Seleccione facturas" + +#. module: account_direct_debit +#: view:account.invoice:account_direct_debit.view_account_invoice_filter +msgid "Show only invoices with state Debit denied" +msgstr "Mostrar sólo facturas con el cobro denegado" + +#. module: account_direct_debit +#: field:payment.line,storno:0 +msgid "Storno" +msgstr "Storno" + +#. module: account_direct_debit +#: code:addons/account_direct_debit/models/account_invoice.py:150 +#, python-format +msgid "You cannot set invoice '%s' to state 'debit denied', as it is still reconciled." +msgstr "No puede establecer la factura '%s' al estado 'cobro denegado', ya que ya se encuentra conciliada." diff --git a/account_payment_partner/i18n/account_payment_partner.pot b/account_payment_partner/i18n/account_payment_partner.pot new file mode 100644 index 000000000..3c5a39686 --- /dev/null +++ b/account_payment_partner/i18n/account_payment_partner.pot @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:53+0000\n" +"PO-Revision-Date: 2014-10-31 22:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_partner +#: field:res.partner,customer_payment_mode:0 +msgid "Customer Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Partner" +msgstr "" + +#. module: account_payment_partner +#: field:account.invoice,payment_mode_id:0 +msgid "Payment Mode" +msgstr "" + +#. module: account_payment_partner +#: help:res.partner,customer_payment_mode:0 +msgid "Select the default payment mode for this customer." +msgstr "" + +#. module: account_payment_partner +#: help:res.partner,supplier_payment_mode:0 +msgid "Select the default payment mode for this supplier." +msgstr "" + +#. module: account_payment_partner +#: field:res.partner,supplier_payment_mode:0 +msgid "Supplier Payment Mode" +msgstr "" + diff --git a/account_payment_partner/i18n/es.po b/account_payment_partner/i18n/es.po new file mode 100644 index 000000000..63748b988 --- /dev/null +++ b/account_payment_partner/i18n/es.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_partner +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:53+0000\n" +"PO-Revision-Date: 2014-10-31 22:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_partner +#: field:res.partner,customer_payment_mode:0 +msgid "Customer Payment Mode" +msgstr "Modo de pago de cliente" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_account_invoice +msgid "Invoice" +msgstr "Factura" + +#. module: account_payment_partner +#: model:ir.model,name:account_payment_partner.model_res_partner +msgid "Partner" +msgstr "Empresa" + +#. module: account_payment_partner +#: field:account.invoice,payment_mode_id:0 +msgid "Payment Mode" +msgstr "Modo de pago" + +#. module: account_payment_partner +#: help:res.partner,customer_payment_mode:0 +msgid "Select the default payment mode for this customer." +msgstr "Seleccione el modo de pago por defecto cuando esta empresa actúa como cliente." + +#. module: account_payment_partner +#: help:res.partner,supplier_payment_mode:0 +msgid "Select the default payment mode for this supplier." +msgstr "Seleccione el modo de pago por defecto cuando esta empresa actúa como proveedor." + +#. module: account_payment_partner +#: field:res.partner,supplier_payment_mode:0 +msgid "Supplier Payment Mode" +msgstr "Modo de pago de proveedor" + diff --git a/account_payment_purchase/i18n/account_payment_purchase.pot b/account_payment_purchase/i18n/account_payment_purchase.pot new file mode 100644 index 000000000..a00a36e87 --- /dev/null +++ b/account_payment_purchase/i18n/account_payment_purchase.pot @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_purchase +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:55+0000\n" +"PO-Revision-Date: 2014-10-31 22:55+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_purchase +#: field:purchase.order,payment_mode_id:0 +msgid "Payment Mode" +msgstr "" + +#. module: account_payment_purchase +#: model:ir.model,name:account_payment_purchase.model_stock_picking +msgid "Picking List" +msgstr "" + +#. module: account_payment_purchase +#: model:ir.model,name:account_payment_purchase.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: account_payment_purchase +#: help:purchase.order,supplier_partner_bank_id:0 +msgid "Select the bank account of your supplier on which your company should send the payment. This field is copied from the partner and will be copied to the supplier invoice." +msgstr "" + +#. module: account_payment_purchase +#: field:purchase.order,supplier_partner_bank_id:0 +msgid "Supplier Bank Account" +msgstr "" + diff --git a/account_payment_purchase/i18n/es.po b/account_payment_purchase/i18n/es.po new file mode 100644 index 000000000..b170125d9 --- /dev/null +++ b/account_payment_purchase/i18n/es.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_purchase +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 22:55+0000\n" +"PO-Revision-Date: 2014-10-31 22:55+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_purchase +#: field:purchase.order,payment_mode_id:0 +msgid "Payment Mode" +msgstr "Modo de pago" + +#. module: account_payment_purchase +#: model:ir.model,name:account_payment_purchase.model_stock_picking +msgid "Picking List" +msgstr "Albarán" + +#. module: account_payment_purchase +#: model:ir.model,name:account_payment_purchase.model_purchase_order +msgid "Purchase Order" +msgstr "Pedido de compra" + +#. module: account_payment_purchase +#: help:purchase.order,supplier_partner_bank_id:0 +msgid "Select the bank account of your supplier on which your company should send the payment. This field is copied from the partner and will be copied to the supplier invoice." +msgstr "Seleccione la cuenta bancaria de su proveedor a la que la compañía debe enviar el pago. Este campo se copia del proveedor si está rellenado, y se trasladará a la factura de proveedor." + +#. module: account_payment_purchase +#: field:purchase.order,supplier_partner_bank_id:0 +msgid "Supplier Bank Account" +msgstr "Cuenta bancaria del proveedor" + diff --git a/account_payment_sale/i18n/account_payment_sale.pot b/account_payment_sale/i18n/account_payment_sale.pot index 75c88ad87..c2d05ec68 100644 --- a/account_payment_sale/i18n/account_payment_sale.pot +++ b/account_payment_sale/i18n/account_payment_sale.pot @@ -1,13 +1,13 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: # * account_payment_sale # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" +"Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-09 23:24+0000\n" -"PO-Revision-Date: 2014-06-09 23:24+0000\n" +"POT-Creation-Date: 2014-10-31 23:00+0000\n" +"PO-Revision-Date: 2014-10-31 23:00+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/account_payment_sale/i18n/es.po b/account_payment_sale/i18n/es.po new file mode 100644 index 000000000..436919b1e --- /dev/null +++ b/account_payment_sale/i18n/es.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_payment_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 23:00+0000\n" +"PO-Revision-Date: 2014-10-31 23:00+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_sale +#: field:sale.order,payment_mode_id:0 +msgid "Payment Mode" +msgstr "Modo de pago" + +#. module: account_payment_sale +#: model:ir.model,name:account_payment_sale.model_sale_order +msgid "Sales Order" +msgstr "Pedido de venta" + diff --git a/account_payment_sale_stock/__openerp__.py b/account_payment_sale_stock/__openerp__.py index d44871550..72f008684 100644 --- a/account_payment_sale_stock/__openerp__.py +++ b/account_payment_sale_stock/__openerp__.py @@ -40,5 +40,5 @@ generated from the picking. 'account_payment_sale'], 'conflicts': ['account_payment_extension'], 'auto_install': True, - 'installable': False, + 'installable': True, } diff --git a/account_payment_sale_stock/i18n/account_payment_sale_stock.pot b/account_payment_sale_stock/i18n/account_payment_sale_stock.pot new file mode 100644 index 000000000..2250652bb --- /dev/null +++ b/account_payment_sale_stock/i18n/account_payment_sale_stock.pot @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 23:01+0000\n" +"PO-Revision-Date: 2014-10-31 23:01+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_sale_stock +#: model:ir.model,name:account_payment_sale_stock.model_stock_picking +msgid "Picking List" +msgstr "" + diff --git a/account_payment_sale_stock/i18n/es.po b/account_payment_sale_stock/i18n/es.po new file mode 100644 index 000000000..69200f01b --- /dev/null +++ b/account_payment_sale_stock/i18n/es.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-31 23:01+0000\n" +"PO-Revision-Date: 2014-10-31 23:01+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_payment_sale_stock +#: model:ir.model,name:account_payment_sale_stock.model_stock_picking +msgid "Picking List" +msgstr "Albarán" + From b7f351262cb1b5b0fb5b79f941364d1782f4f41d Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 7 Nov 2014 14:30:18 +0100 Subject: [PATCH 19/21] [IMP] account_payment_sale_stock: Better code for assign payment mode to invoice from pickings --- account_payment_sale_stock/models/stock_picking.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/account_payment_sale_stock/models/stock_picking.py b/account_payment_sale_stock/models/stock_picking.py index befa523a9..17be3301a 100644 --- a/account_payment_sale_stock/models/stock_picking.py +++ b/account_payment_sale_stock/models/stock_picking.py @@ -24,12 +24,9 @@ class StockPicking(models.Model): @api.model def _create_invoice_from_picking(self, picking, vals): - if picking: - # Search if this picking comes from a sale order - sale_order_obj = self.env['sale.order'] - sale_order = sale_order_obj.search( - [('picking_ids', 'in', picking.id)], limit=1) - if sale_order and sale_order.payment_mode_id: + if picking and picking.sale_id: + sale_order = picking.sale_id + if sale_order.payment_mode_id: vals['partner_bank_id'] = sale_order.payment_mode_id.bank_id.id vals['payment_mode_id'] = sale_order.payment_mode_id.id return super(StockPicking, self)._create_invoice_from_picking(picking, From 7ae3bd44cf288cf40492221a2c44be82cd580cd2 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 7 Nov 2014 23:00:34 +0100 Subject: [PATCH 20/21] Use sale_ok and purchase_ok instead of tweaking payment type --- .../data/payment_mode_type.xml | 2 +- .../i18n/account_banking_payment_export.pot | 15 ++++++++++----- account_banking_payment_export/i18n/es.po | 19 ++++++++++++------- .../models/payment_mode.py | 4 ++++ .../models/payment_mode_type.py | 7 +++---- .../views/payment_mode.xml | 2 ++ account_payment_partner/models/res_partner.py | 6 ++---- .../views/account_invoice_view.xml | 4 ++-- .../models/purchase_order.py | 3 +-- account_payment_sale/models/sale_order.py | 3 +-- 10 files changed, 38 insertions(+), 27 deletions(-) diff --git a/account_banking_payment_export/data/payment_mode_type.xml b/account_banking_payment_export/data/payment_mode_type.xml index acf807e8c..876778e62 100644 --- a/account_banking_payment_export/data/payment_mode_type.xml +++ b/account_banking_payment_export/data/payment_mode_type.xml @@ -9,7 +9,7 @@ eval="[(6,0,[ref('base.bank_normal'),ref('base_iban.bank_iban'),])]" /> - both + payment
diff --git a/account_banking_payment_export/i18n/account_banking_payment_export.pot b/account_banking_payment_export/i18n/account_banking_payment_export.pot index 700e68d4a..a51bcd871 100644 --- a/account_banking_payment_export/i18n/account_banking_payment_export.pot +++ b/account_banking_payment_export/i18n/account_banking_payment_export.pot @@ -22,13 +22,18 @@ msgid "Active" msgstr "" #. module: account_banking_payment_export -#: field:account.move.line,amount_to_pay:0 -msgid "Amount to pay" +#: field:payment.mode,sale_ok:0 +msgid "Selectable on sale operations" msgstr "" #. module: account_banking_payment_export -#: selection:payment.mode.type,payment_order_type:0 -msgid "Both" +#: field:payment.mode,purchase_ok:0 +msgid "Selectable on purchase operations" +msgstr "" + +#. module: account_banking_payment_export +#: field:account.move.line,amount_to_pay:0 +msgid "Amount to pay" msgstr "" #. module: account_banking_payment_export @@ -216,7 +221,7 @@ msgstr "" #. module: account_banking_payment_export #: help:payment.mode.type,payment_order_type:0 -msgid "This field determines if this type applies to customers (Debit), suppliers (Payment), or both" +msgid "This field determines if this type applies to customers (Debit) or suppliers (Payment)" msgstr "" #. module: account_banking_payment_export diff --git a/account_banking_payment_export/i18n/es.po b/account_banking_payment_export/i18n/es.po index 80270bb46..e5e0afdbe 100644 --- a/account_banking_payment_export/i18n/es.po +++ b/account_banking_payment_export/i18n/es.po @@ -21,16 +21,21 @@ msgstr "" msgid "Active" msgstr "Activo" +#. module: account_banking_payment_export +#: field:payment.mode,sale_ok:0 +msgid "Selectable on sale operations" +msgstr "Seleccionable en operaciones de venta" + +#. module: account_banking_payment_export +#: field:payment.mode,purchase_ok:0 +msgid "Selectable on purchase operations" +msgstr "Seleccionable en operaciones de compra" + #. module: account_banking_payment_export #: field:account.move.line,amount_to_pay:0 msgid "Amount to pay" msgstr "Importe a pagar" -#. module: account_banking_payment_export -#: selection:payment.mode.type,payment_order_type:0 -msgid "Both" -msgstr "Ambos" - #. module: account_banking_payment_export #: view:payment.manual:account_banking_payment_export.view_payment_manual_form msgid "Cancel" @@ -216,8 +221,8 @@ msgstr "Tipos de cuentas bancarias adecuadas" #. module: account_banking_payment_export #: help:payment.mode.type,payment_order_type:0 -msgid "This field determines if this type applies to customers (Debit), suppliers (Payment), or both" -msgstr "Este campo determina si este tipo aplica a clientes (Cobro), a proveedores (Pago), o a ambos" +msgid "This field determines if this type applies to customers (Debit) or suppliers (Payment)" +msgstr "Este campo determina si este tipo aplica a clientes (Cobro) o a proveedores (Pago)" #. module: account_banking_payment_export #: code:addons/account_banking_payment_export/models/account_payment.py:69 diff --git a/account_banking_payment_export/models/payment_mode.py b/account_banking_payment_export/models/payment_mode.py index b35a150ba..df59d37c7 100644 --- a/account_banking_payment_export/models/payment_mode.py +++ b/account_banking_payment_export/models/payment_mode.py @@ -52,3 +52,7 @@ class PaymentMode(models.Model): help="This field, that comes from export type, determines if this " "mode can be selected for customers or suppliers.") active = fields.Boolean(string='Active', default=True) + sale_ok = fields.Boolean(string='Selectable on sale operations', + default=True) + purchase_ok = fields.Boolean(string='Selectable on purchase operations', + default=True) diff --git a/account_banking_payment_export/models/payment_mode_type.py b/account_banking_payment_export/models/payment_mode_type.py index 3386d11d5..341fe1063 100644 --- a/account_banking_payment_export/models/payment_mode_type.py +++ b/account_banking_payment_export/models/payment_mode_type.py @@ -44,11 +44,10 @@ class PaymentModeType(models.Model): domain=[('osv_memory', '=', True)]) payment_order_type = fields.Selection( [('payment', 'Payment'), - ('debit', 'Debit'), - ('both', 'Both')], - string='Order type', required=True, default='both', + ('debit', 'Debit')], + string='Order type', required=True, default='payment', help="This field determines if this type applies to customers " - "(Debit), suppliers (Payment), or both") + "(Debit) or suppliers (Payment)") active = fields.Boolean(string='Active', default=True) def _auto_init(self, cr, context=None): diff --git a/account_banking_payment_export/views/payment_mode.xml b/account_banking_payment_export/views/payment_mode.xml index 42b19ca2d..273317bc5 100644 --- a/account_banking_payment_export/views/payment_mode.xml +++ b/account_banking_payment_export/views/payment_mode.xml @@ -13,6 +13,8 @@ + +
diff --git a/account_payment_partner/models/res_partner.py b/account_payment_partner/models/res_partner.py index d5dded203..5726da446 100644 --- a/account_payment_partner/models/res_partner.py +++ b/account_payment_partner/models/res_partner.py @@ -28,13 +28,11 @@ class ResPartner(models.Model): supplier_payment_mode = fields.Many2one( 'payment.mode', string='Supplier Payment Mode', company_dependent=True, - domain="['|', ('payment_order_type', '=', 'payment'), " - "('payment_order_type', '=', 'both')]", + domain="[('purchase_ok', '=', True)]", help="Select the default payment mode for this supplier.") customer_payment_mode = fields.Many2one( 'payment.mode', string='Customer Payment Mode', company_dependent=True, - domain="['|', ('payment_order_type', '=', 'debit'), " - "('payment_order_type', '=', 'both')]", + domain="[('sale_ok', '=', True)]", help="Select the default payment mode for this customer.") @api.model diff --git a/account_payment_partner/views/account_invoice_view.xml b/account_payment_partner/views/account_invoice_view.xml index aabddcd49..534822ea9 100644 --- a/account_payment_partner/views/account_invoice_view.xml +++ b/account_payment_partner/views/account_invoice_view.xml @@ -17,7 +17,7 @@ + domain="[('sale_ok', '=', True)]"/> @@ -30,7 +30,7 @@ + domain="[('purchase_ok', '=', True)]"/> diff --git a/account_payment_purchase/models/purchase_order.py b/account_payment_purchase/models/purchase_order.py index a8d73c235..26d08dd23 100644 --- a/account_payment_purchase/models/purchase_order.py +++ b/account_payment_purchase/models/purchase_order.py @@ -34,8 +34,7 @@ class PurchaseOrder(models.Model): "and will be copied to the supplier invoice.") payment_mode_id = fields.Many2one( 'payment.mode', string='Payment Mode', - domain="['|', ('payment_order_type', '=', 'payment'), " - "('payment_order_type', '=', 'both')]") + domain="[('purchase_ok', '=', True)]") @api.model def _get_default_supplier_partner_bank(self, partner): diff --git a/account_payment_sale/models/sale_order.py b/account_payment_sale/models/sale_order.py index e1b6a4aad..e96b3cd3b 100644 --- a/account_payment_sale/models/sale_order.py +++ b/account_payment_sale/models/sale_order.py @@ -28,8 +28,7 @@ class SaleOrder(models.Model): payment_mode_id = fields.Many2one( 'payment.mode', string='Payment Mode', - domain="['|', ('payment_order_type', '=', 'debit'), " - "('payment_order_type', '=', 'both')]") + domain="[('sale_ok', '=', True)]") @api.multi def onchange_partner_id(self, partner_id): From 87c668eddaadb9374a76effd79bd07b520908373 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 8 Nov 2014 02:46:00 +0100 Subject: [PATCH 21/21] Fix Travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a9a07bb6e..d51e2c078 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ virtualenv: install: - git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} + - sudo pip install unidecode - travis_install_nightly script: