From edcf09147ecc4eb26035287b55f118603c3ae94f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 21 Sep 2015 12:32:45 +0200 Subject: [PATCH 01/28] Add bank.payment.lines object to allow grouping in the payments --- account_banking_mandate/__openerp__.py | 3 +- account_banking_mandate/models/__init__.py | 53 ++++--- .../models/bank_payment_line.py | 38 +++++ .../models/payment_line.py | 150 +++++++++--------- .../views/account_payment_view.xml | 12 +- .../views/bank_payment_line_view.xml | 36 +++++ account_banking_pain_base/__openerp__.py | 1 + account_banking_pain_base/models/__init__.py | 1 + .../models/bank_payment_line.py | 40 +++++ .../views/bank_payment_line_view.xml | 25 +++ .../views/payment_line_view.xml | 17 +- account_banking_payment_export/__openerp__.py | 2 + .../data/bank_payment_line_seq.xml | 26 +++ .../models/__init__.py | 2 + .../models/account_payment.py | 56 +++++++ .../models/bank_payment_line.py | 86 ++++++++++ .../models/payment_line.py | 39 +++++ .../security/ir.model.access.csv | 1 + .../views/account_payment.xml | 112 ++++++++++--- .../views/bank_payment_line.xml | 66 ++++++++ .../workflow/account_payment.xml | 4 + .../wizard/export_sepa.py | 24 ++- .../wizard/export_sdd.py | 26 ++- account_direct_debit/models/payment_line.py | 3 + 24 files changed, 649 insertions(+), 174 deletions(-) create mode 100644 account_banking_mandate/models/bank_payment_line.py create mode 100644 account_banking_mandate/views/bank_payment_line_view.xml create mode 100644 account_banking_pain_base/models/bank_payment_line.py create mode 100644 account_banking_pain_base/views/bank_payment_line_view.xml create mode 100644 account_banking_payment_export/data/bank_payment_line_seq.xml create mode 100644 account_banking_payment_export/models/bank_payment_line.py create mode 100644 account_banking_payment_export/models/payment_line.py create mode 100644 account_banking_payment_export/views/bank_payment_line.xml diff --git a/account_banking_mandate/__openerp__.py b/account_banking_mandate/__openerp__.py index 0309a15d2..abee60c18 100644 --- a/account_banking_mandate/__openerp__.py +++ b/account_banking_mandate/__openerp__.py @@ -32,13 +32,14 @@ 'website': 'https://github.com/OCA/bank-payment', 'category': 'Banking addons', 'depends': [ - 'account_payment', + 'account_banking_payment_export', ], 'data': [ 'views/account_banking_mandate_view.xml', 'views/account_invoice_view.xml', 'views/account_payment_view.xml', 'views/res_partner_bank_view.xml', + 'views/bank_payment_line_view.xml', 'data/mandate_reference_sequence.xml', 'data/report_paperformat.xml', 'security/mandate_security.xml', diff --git a/account_banking_mandate/models/__init__.py b/account_banking_mandate/models/__init__.py index 480270819..4b191f0d1 100644 --- a/account_banking_mandate/models/__init__.py +++ b/account_banking_mandate/models/__init__.py @@ -1,26 +1,27 @@ -# -*- 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 +# -*- 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 +from . import bank_payment_line diff --git a/account_banking_mandate/models/bank_payment_line.py b/account_banking_mandate/models/bank_payment_line.py new file mode 100644 index 000000000..cb268198c --- /dev/null +++ b/account_banking_mandate/models/bank_payment_line.py @@ -0,0 +1,38 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for Odoo +# Copyright (C) 2015 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 BankPaymentLine(models.Model): + _inherit = 'bank.payment.line' + + mandate_id = fields.Many2one( + comodel_name='account.banking.mandate', string='Direct Debit Mandate', + related='payment_line_ids.mandate_id') + + @api.model + def same_fields_payment_line_and_bank_payment_line(self): + res = super(BankPaymentLine, self).\ + same_fields_payment_line_and_bank_payment_line() + res.append('mandate_id') + return res diff --git a/account_banking_mandate/models/payment_line.py b/account_banking_mandate/models/payment_line.py index a8815251d..fa044ea29 100644 --- a/account_banking_mandate/models/payment_line.py +++ b/account_banking_mandate/models/payment_line.py @@ -1,74 +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.model - 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[0].id - return super(PaymentLine, self).create(vals) - - @api.one - @api.constrains('mandate_id', 'bank_id') - 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): - 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.bank_id.name_get()[0][1], - self.mandate_id.unique_mandate_reference, - self.mandate_id.partner_bank_id.name_get()[0][1])) +# -*- encoding: utf-8 -*- +############################################################################## +# +# Mandate module for Odoo +# 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.model + 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[0].id + return super(PaymentLine, self).create(vals) + + @api.one + @api.constrains('mandate_id', 'bank_id') + 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): + 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/views/account_payment_view.xml b/account_banking_mandate/views/account_payment_view.xml index 39ec86953..9d2ced2cf 100644 --- a/account_banking_mandate/views/account_payment_view.xml +++ b/account_banking_mandate/views/account_payment_view.xml @@ -10,14 +10,18 @@ mandate.payment.order.form payment.order - + - - + + - + diff --git a/account_banking_mandate/views/bank_payment_line_view.xml b/account_banking_mandate/views/bank_payment_line_view.xml new file mode 100644 index 000000000..25c8656e5 --- /dev/null +++ b/account_banking_mandate/views/bank_payment_line_view.xml @@ -0,0 +1,36 @@ + + + + + + + banking.mandate.bank.payment.line.form + bank.payment.line + + + + + + + + + + banking.mandate.bank.payment.line.tree + bank.payment.line + + + + + + + + + + + diff --git a/account_banking_pain_base/__openerp__.py b/account_banking_pain_base/__openerp__.py index 191ffb3cd..7d89c69a4 100644 --- a/account_banking_pain_base/__openerp__.py +++ b/account_banking_pain_base/__openerp__.py @@ -37,6 +37,7 @@ }, 'data': [ 'views/payment_line_view.xml', + 'views/bank_payment_line_view.xml', 'views/payment_mode_view.xml', 'views/res_company_view.xml', ], diff --git a/account_banking_pain_base/models/__init__.py b/account_banking_pain_base/models/__init__.py index 8a4154482..829202c43 100644 --- a/account_banking_pain_base/models/__init__.py +++ b/account_banking_pain_base/models/__init__.py @@ -21,6 +21,7 @@ ############################################################################## from . import payment_line +from . import bank_payment_line from . import payment_mode from . import res_company from . import banking_export_pain diff --git a/account_banking_pain_base/models/bank_payment_line.py b/account_banking_pain_base/models/bank_payment_line.py new file mode 100644 index 000000000..c00d9d9d0 --- /dev/null +++ b/account_banking_pain_base/models/bank_payment_line.py @@ -0,0 +1,40 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# PAIN Base module for Odoo +# Copyright (C) 2013-2015 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 BankPaymentLine(models.Model): + _inherit = 'bank.payment.line' + + priority = fields.Selection( + related='payment_line_ids.priority', string='Priority') + struct_communication_type = fields.Selection( + related='payment_line_ids.struct_communication_type', + string='Structured Communication Type') + + @api.model + def same_fields_payment_line_and_bank_payment_line(self): + res = super(BankPaymentLine, self).\ + same_fields_payment_line_and_bank_payment_line() + res += ['priority', 'struct_communication_type'] + return res diff --git a/account_banking_pain_base/views/bank_payment_line_view.xml b/account_banking_pain_base/views/bank_payment_line_view.xml new file mode 100644 index 000000000..65e993ad6 --- /dev/null +++ b/account_banking_pain_base/views/bank_payment_line_view.xml @@ -0,0 +1,25 @@ + + + + + + + pain.base.bank.payment.line.form + bank.payment.line + + + + + + + + + + + + + diff --git a/account_banking_pain_base/views/payment_line_view.xml b/account_banking_pain_base/views/payment_line_view.xml index f92b1bbf5..03759b568 100644 --- a/account_banking_pain_base/views/payment_line_view.xml +++ b/account_banking_pain_base/views/payment_line_view.xml @@ -7,25 +7,10 @@ - - pain.base.payment.line.form - payment.line - - - - - - - - - - - - pain.base.payment.line.inside.order.form payment.order - + diff --git a/account_banking_payment_export/__openerp__.py b/account_banking_payment_export/__openerp__.py index f362e919c..c9beef545 100644 --- a/account_banking_payment_export/__openerp__.py +++ b/account_banking_payment_export/__openerp__.py @@ -41,9 +41,11 @@ 'views/account_payment.xml', 'views/payment_mode.xml', 'views/payment_mode_type.xml', + 'views/bank_payment_line.xml', 'wizard/bank_payment_manual.xml', 'wizard/payment_order_create_view.xml', 'data/payment_mode_type.xml', + 'data/bank_payment_line_seq.xml', 'workflow/account_payment.xml', 'security/ir.model.access.csv', ], diff --git a/account_banking_payment_export/data/bank_payment_line_seq.xml b/account_banking_payment_export/data/bank_payment_line_seq.xml new file mode 100644 index 000000000..37c572bf7 --- /dev/null +++ b/account_banking_payment_export/data/bank_payment_line_seq.xml @@ -0,0 +1,26 @@ + + + + + + + + Bank Payment Line + bank.payment.line + + + + Bank Payment Line + bank.payment.line + L + 5 + 1 + + + + + diff --git a/account_banking_payment_export/models/__init__.py b/account_banking_payment_export/models/__init__.py index 797c1ddf3..738dcdbfd 100644 --- a/account_banking_payment_export/models/__init__.py +++ b/account_banking_payment_export/models/__init__.py @@ -6,3 +6,5 @@ from . import payment_mode_type from . import payment_mode from . import account_move_line from . import account_invoice +from . import bank_payment_line +from . import payment_line diff --git a/account_banking_payment_export/models/account_payment.py b/account_banking_payment_export/models/account_payment.py index 3cad2f4cc..9768644f3 100644 --- a/account_banking_payment_export/models/account_payment.py +++ b/account_banking_payment_export/models/account_payment.py @@ -43,6 +43,9 @@ class PaymentOrder(models.Model): readonly=True, states={'draft': [('readonly', False)]}) mode_type = fields.Many2one('payment.mode.type', related='mode.type', string='Payment Type') + bank_line_ids = fields.One2many( + 'bank.payment.line', 'order_id', string="Bank Payment Lines", + readonly=True) total = fields.Float(compute='_compute_total', store=True) @api.depends('line_ids', 'line_ids.amount') @@ -95,3 +98,56 @@ class PaymentOrder(models.Model): 'state': 'done', }) return True + + @api.multi + def action_cancel(self): + for order in self: + order.write({'state': 'cancel'}) + order.bank_line_ids.unlink() + return True + + @api.model + def _prepare_bank_payment_line(self, paylines): + return { + 'order_id': paylines[0].order_id.id, + 'payment_line_ids': [(6, 0, paylines.ids)], + 'communication': '-'.join( + [line.communication for line in paylines]), + } + + @api.multi + def action_open(self): + """ + Called when you click on the 'Confirm' button + Set the 'date' on payment line depending on the 'date_prefered' + setting of the payment.order + Re-generate the bank payment lines + """ + res = super(PaymentOrder, self).action_open() + bplo = self.env['bank.payment.line'] + today = fields.Date.context_today(self) + for order in self: + # Delete existing bank payment lines + order.bank_line_ids.unlink() + # Create the bank payment lines from the payment lines + group_paylines = {} # id = hashcode, value = payment lines + for payline in order.line_ids: + # Compute requested payment date + if order.date_prefered == 'due': + requested_date = payline.ml_maturity_date or today + elif order.date_prefered == 'fixed': + requested_date = order.date_scheduled or today + else: + requested_date = today + # Write requested_date on 'date' field of payment line + payline.date = requested_date + hashcode = payline.payment_line_hashcode() + if hashcode in group_paylines: + group_paylines[hashcode] += payline + else: + group_paylines[hashcode] = payline + # Create bank payment lines + for paylines in group_paylines.values(): + vals = self._prepare_bank_payment_line(paylines) + bplo.create(vals) + return res diff --git a/account_banking_payment_export/models/bank_payment_line.py b/account_banking_payment_export/models/bank_payment_line.py new file mode 100644 index 000000000..d26e317d5 --- /dev/null +++ b/account_banking_payment_export/models/bank_payment_line.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 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 +import openerp.addons.decimal_precision as dp + + +class BankPaymentLine(models.Model): + _name = 'bank.payment.line' + _description = 'Bank Payment Lines' + + name = fields.Char(string='Bank Payment Line Ref', required=True) + order_id = fields.Many2one( + 'payment.order', string='Order', ondelete='cascade', select=True) + payment_line_ids = fields.One2many( + 'payment.line', 'bank_line_id', string='Payment Lines') + partner_id = fields.Many2one( + 'res.partner', string='Partner', related='payment_line_ids.partner_id') + # Function Float fields are sometimes badly displayed in tree view, + # see bug report https://github.com/odoo/odoo/issues/8632 + amount_currency = fields.Float( + string='Amount', digits=dp.get_precision('Account'), + compute='_compute_amount') + # I would have prefered currency_id, but I need to keep the field names + # similar to the field names of payment.line + currency = fields.Many2one( + 'res.currency', string='Currency', required=True, + related='payment_line_ids.currency') + bank_id = fields.Many2one( + 'res.partner.bank', string='Bank Account', + related='payment_line_ids.bank_id') + date = fields.Date( + string='Payment Date', related='payment_line_ids.date') + state = fields.Selection( + related='payment_line_ids.state', string='Communication Type') + communication = fields.Char(string='Communication', required=True) + company_id = fields.Many2one( + 'res.company', string='Company', readonly=True, + related='order_id.company_id', store=True) + + @api.model + def same_fields_payment_line_and_bank_payment_line(self): + """ + This list of fields is used both to compute the grouping + hashcode and to copy the values from payment line + to bank payment line + The fields must have the same name on the 2 objects + """ + same_fields = [ + 'currency', 'partner_id', + 'bank_id', 'date', 'state'] + return same_fields + + @api.one + @api.depends('payment_line_ids.amount_currency') + def _compute_amount(self): + amount = 0.0 + for payline in self.payment_line_ids: + amount += payline.amount_currency + self.amount_currency = amount + + @api.model + @api.returns('self') + def create(self, vals): + if vals.get('name', '/') == '/': + vals['name'] = self.env['ir.sequence'].next_by_code( + 'bank.payment.line') + return super(BankPaymentLine, self).create(vals) diff --git a/account_banking_payment_export/models/payment_line.py b/account_banking_payment_export/models/payment_line.py new file mode 100644 index 000000000..9ef29e39f --- /dev/null +++ b/account_banking_payment_export/models/payment_line.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 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 PaymentLine(models.Model): + _inherit = 'payment.line' + + bank_line_id = fields.Many2one( + 'bank.payment.line', string='Bank Payment Line') + + @api.multi + def payment_line_hashcode(self): + self.ensure_one() + bplo = self.env['bank.payment.line'] + values = [] + for field in bplo.same_fields_payment_line_and_bank_payment_line(): + values.append(unicode(self[field])) + hashcode = '-'.join(values) + return hashcode diff --git a/account_banking_payment_export/security/ir.model.access.csv b/account_banking_payment_export/security/ir.model.access.csv index 699f2d023..3bcb21020 100644 --- a/account_banking_payment_export/security/ir.model.access.csv +++ b/account_banking_payment_export/security/ir.model.access.csv @@ -1,2 +1,3 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_payment_mode_type","payment.mode.type","model_payment_mode_type","account_payment.group_account_payment",1,1,1,1 +"access_bank_payment_line","Full access on bank.payment.line to Payment Manager","model_bank_payment_line","account_payment.group_account_payment",1,1,1,1 diff --git a/account_banking_payment_export/views/account_payment.xml b/account_banking_payment_export/views/account_payment.xml index 1ad55ce81..20e5cc564 100644 --- a/account_banking_payment_export/views/account_payment.xml +++ b/account_banking_payment_export/views/account_payment.xml @@ -1,27 +1,95 @@ - - + - - account.payment.order.form.banking-1 - - payment.order - - - launch_wizard - - - - - - { - 'invisible': [('state', '!=', 'draft')]} - - - - + + + account.payment.order.form.banking-1 + + payment.order + + + launch_wizard + + + + + + { + 'invisible': [('state', '!=', 'draft')]} + + + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ +
+ + + +
+
+
+
+ + +
diff --git a/account_banking_payment_export/views/bank_payment_line.xml b/account_banking_payment_export/views/bank_payment_line.xml new file mode 100644 index 000000000..df4a308ba --- /dev/null +++ b/account_banking_payment_export/views/bank_payment_line.xml @@ -0,0 +1,66 @@ + + + + + + + bank.payment.line.form + bank.payment.line + +
+ + + + + + + + + + + + + + + +
+
+
+ + + bank.payment.line.tree + bank.payment.line + + + + + + + + + + + + + + + + + Bank Payment Lines + bank.payment.line + tree,form + {'bank_payment_line_main_view': True} + + +
+
diff --git a/account_banking_payment_export/workflow/account_payment.xml b/account_banking_payment_export/workflow/account_payment.xml index ac5cf4a79..7528a75a4 100644 --- a/account_banking_payment_export/workflow/account_payment.xml +++ b/account_banking_payment_export/workflow/account_payment.xml @@ -12,5 +12,9 @@ action_done()
+ + action_cancel() + +
diff --git a/account_banking_sepa_credit_transfer/wizard/export_sepa.py b/account_banking_sepa_credit_transfer/wizard/export_sepa.py index 09768ca5c..bd868009d 100644 --- a/account_banking_sepa_credit_transfer/wizard/export_sepa.py +++ b/account_banking_sepa_credit_transfer/wizard/export_sepa.py @@ -151,25 +151,19 @@ class BankingExportSepaWizard(models.TransientModel): lines_per_group = {} # key = (requested_date, priority) # values = list of lines as object - today = fields.Date.context_today(self) for payment_order in self.payment_order_ids: total_amount = total_amount + payment_order.total - for line in payment_order.line_ids: + for line in payment_order.bank_line_ids: priority = line.priority - if payment_order.date_prefered == 'due': - requested_date = line.ml_maturity_date or today - elif payment_order.date_prefered == 'fixed': - requested_date = payment_order.date_scheduled or today - else: - requested_date = today - key = (requested_date, priority) + # The field line.date is the requested payment date + # taking into account the 'date_prefered' setting + # cf account_banking_payment_export/models/account_payment.py + # in the inherit of action_open() + key = (line.date, priority) if key in lines_per_group: lines_per_group[key].append(line) else: lines_per_group[key] = [line] - # Write requested_date on 'Payment date' of the pay line - if requested_date != line.date: - line.date = requested_date 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 = \ @@ -220,9 +214,9 @@ class BankingExportSepaWizard(models.TransientModel): amount_control_sum_2_5 += line.amount_currency if not line.bank_id: raise Warning( - _("Missing Bank Account on invoice '%s' (payment " - "order line reference '%s').") - % (line.ml_inv_ref.number, line.name)) + _("Bank account is missing on the bank payment line " + "of partner '%s' (reference '%s').") + % (line.partner_id.name, line.name)) self.generate_party_block( credit_transfer_transaction_info_2_27, 'Cdtr', 'C', 'line.partner_id.name', 'line.bank_id.acc_number', diff --git a/account_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py index b76e14050..ff5662c46 100644 --- a/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -144,25 +144,22 @@ class BankingExportSddWizard(models.TransientModel): # key = (requested_date, priority, sequence type) # value = list of lines as objects # Iterate on payment orders - today = fields.Date.context_today(self) for payment_order in self.payment_order_ids: total_amount = total_amount + payment_order.total # Iterate each payment lines - for line in payment_order.line_ids: + for line in payment_order.bank_line_ids: transactions_count_1_6 += 1 priority = line.priority - if payment_order.date_prefered == 'due': - requested_date = line.ml_maturity_date or today - elif payment_order.date_prefered == 'fixed': - requested_date = payment_order.date_scheduled or today - else: - requested_date = today + # The field line.date is the requested payment date + # taking into account the 'date_prefered' setting + # cf account_banking_payment_export/models/account_payment.py + # in the inherit of action_open() if not line.mandate_id: raise Warning( - _("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)) + _("Missing SEPA Direct Debit mandate on the " + "bank payment line with partner '%s' " + "(reference '%s'.") + % (line.partner_id.name, line.name)) scheme = line.mandate_id.scheme if line.mandate_id.state != 'valid': raise Warning( @@ -191,14 +188,11 @@ class BankingExportSddWizard(models.TransientModel): 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) + key = (line.date, priority, seq_type, scheme) if key in lines_per_group: lines_per_group[key].append(line) else: lines_per_group[key] = [line] - # Write requested_exec_date on 'Payment date' of the pay line - if requested_date != line.date: - line.date = requested_date for (requested_date, priority, sequence_type, scheme), lines in \ lines_per_group.items(): diff --git a/account_direct_debit/models/payment_line.py b/account_direct_debit/models/payment_line.py index 0da003002..4fc667daf 100644 --- a/account_direct_debit/models/payment_line.py +++ b/account_direct_debit/models/payment_line.py @@ -129,3 +129,6 @@ class PaymentLine(models.Model): 'Storno', readonly=True, help="If this is true, the debit order has been canceled by the bank " "or by the customer") + # The original string is "Destination Bank Account"... + # but in direct debit this field is the *Source* Bank Account ! + bank_id = fields.Many2one(string='Partner Bank Account') From 212f5f992e232c545fcff9c25abda590b408a53f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 23 Sep 2015 18:18:37 +0200 Subject: [PATCH 02/28] Allow to select customer refunds in direct debit order and supplier refunds in payment order (to reduce the amount to pay) --- .../models/account_payment.py | 21 +++- .../views/account_payment.xml | 3 +- .../wizard/payment_order_create.py | 11 ++- .../model/account_payment.py | 71 ++++++-------- .../model/payment_line.py | 96 ++++++++++--------- .../models/account_move_line.py | 71 +------------- .../views/account_payment.xml | 41 ++++---- .../wizard/payment_order_create.py | 8 +- 8 files changed, 130 insertions(+), 192 deletions(-) diff --git a/account_banking_payment_export/models/account_payment.py b/account_banking_payment_export/models/account_payment.py index 9768644f3..74ea5108c 100644 --- a/account_banking_payment_export/models/account_payment.py +++ b/account_banking_payment_export/models/account_payment.py @@ -130,7 +130,7 @@ class PaymentOrder(models.Model): # Delete existing bank payment lines order.bank_line_ids.unlink() # Create the bank payment lines from the payment lines - group_paylines = {} # id = hashcode, value = payment lines + group_paylines = {} # key = hashcode for payline in order.line_ids: # Compute requested payment date if order.date_prefered == 'due': @@ -143,11 +143,22 @@ class PaymentOrder(models.Model): payline.date = requested_date hashcode = payline.payment_line_hashcode() if hashcode in group_paylines: - group_paylines[hashcode] += payline + group_paylines[hashcode]['paylines'] += payline + group_paylines[hashcode]['total'] +=\ + payline.amount_currency else: - group_paylines[hashcode] = payline + group_paylines[hashcode] = { + 'paylines': payline, + 'total': payline.amount_currency, + } # Create bank payment lines - for paylines in group_paylines.values(): - vals = self._prepare_bank_payment_line(paylines) + for paydict in group_paylines.values(): + # Block if a bank payment line is <= 0 + if paydict['total'] <= 0: + raise exceptions.Warning( + _("The amount for Partner '%s' is negative (%.2f) !") + % (paydict['paylines'][0].partner_id.name, + paydict['total'])) + vals = self._prepare_bank_payment_line(paydict['paylines']) bplo.create(vals) return res diff --git a/account_banking_payment_export/views/account_payment.xml b/account_banking_payment_export/views/account_payment.xml index 20e5cc564..0e9340e1e 100644 --- a/account_banking_payment_export/views/account_payment.xml +++ b/account_banking_payment_export/views/account_payment.xml @@ -14,6 +14,7 @@ + { @@ -30,7 +31,7 @@ - + - - Payment Lines - payment.line - - - - - - - - - diff --git a/account_direct_debit/workflow/account_invoice.xml b/account_direct_debit/workflow/account_invoice.xml deleted file mode 100644 index d3099e85d..000000000 --- a/account_direct_debit/workflow/account_invoice.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - debit_denied - action_debit_denied() - function - - - - - - - invoice_debit_denied - - - - - - test_undo_debit_denied() - undo_debit_denied - - - - - - open_test - - - From 0c2aec9eeb243dbd822470dbf7f31c0080b44312 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 24 Sep 2015 11:38:50 +0200 Subject: [PATCH 04/28] Add a hook to inherit grouping of the transfer account move line Use that new hook in SEPA direct debits Better variable names --- .../model/__init__.py | 3 + .../model/account_payment.py | 59 +++++------ .../model/bank_payment_line.py | 97 +++++++++++++++++++ .../model/payment_line.py | 69 ++----------- .../models/__init__.py | 23 +---- .../models/bank_payment_line.py | 41 ++++++++ 6 files changed, 185 insertions(+), 107 deletions(-) create mode 100644 account_banking_payment_transfer/model/bank_payment_line.py create mode 100644 account_banking_sepa_direct_debit/models/bank_payment_line.py diff --git a/account_banking_payment_transfer/model/__init__.py b/account_banking_payment_transfer/model/__init__.py index 7a8cfda04..09e695000 100644 --- a/account_banking_payment_transfer/model/__init__.py +++ b/account_banking_payment_transfer/model/__init__.py @@ -1,4 +1,7 @@ +# -*- coding: utf-8 -*- + from . import account_payment from . import payment_line +from . import bank_payment_line from . import payment_mode from . import account_move_reconcile diff --git a/account_banking_payment_transfer/model/account_payment.py b/account_banking_payment_transfer/model/account_payment.py index f79308a56..2fceef2ac 100644 --- a/account_banking_payment_transfer/model/account_payment.py +++ b/account_banking_payment_transfer/model/account_payment.py @@ -4,7 +4,7 @@ # Copyright (C) 2009 EduSense BV (). # (C) 2011 - 2013 Therp BV (). # (C) 2014 ACSONE SA (). -# (C) 2014 Akretion (www.akretion.com) +# (C) 2014-2015 Akretion (www.akretion.com) # # All other contributions are (C) by their respective contributors # @@ -26,6 +26,7 @@ ############################################################################## from openerp import models, fields, api, _ +from openerp.exceptions import Warning as UserError class PaymentOrder(models.Model): @@ -165,23 +166,23 @@ class PaymentOrder(models.Model): return vals @api.multi - def _prepare_move_line_partner_account(self, line, move, labels): + def _prepare_move_line_partner_account(self, bank_line, move, labels): # TODO : ALEXIS check don't group if move_line_id.account_id # is not the same if self.payment_order_type == 'debit': - account_id = line.partner_id.property_account_receivable.id + account_id = bank_line.partner_id.property_account_receivable.id else: - account_id = line.partner_id.property_account_payable.id + account_id = bank_line.partner_id.property_account_payable.id vals = { 'name': _('%s line %s') % ( - labels[self.payment_order_type], line.name), + labels[self.payment_order_type], bank_line.name), 'move_id': move.id, - 'partner_id': line.partner_id.id, + 'partner_id': bank_line.partner_id.id, 'account_id': account_id, 'credit': (self.payment_order_type == 'debit' and - line.amount_currency or 0.0), + bank_line.amount_currency or 0.0), 'debit': (self.payment_order_type == 'payment' and - line.amount_currency or 0.0), + bank_line.amount_currency or 0.0), } return vals @@ -191,20 +192,27 @@ class PaymentOrder(models.Model): return @api.multi - def _create_move_line_partner_account(self, line, move, labels): + def _create_move_line_partner_account(self, bank_line, move, labels): """This method is designed to be inherited in a custom module""" - # TODO: take multicurrency into account + company_currency = self.env.user.company_id.currency_id + if bank_line.currency != company_currency: + raise UserError(_( + "Cannot generate the transfer move when " + "the currency of the payment (%s) is not the " + "same as the currency of the company. This " + "is not supported for the moment.") + % (bank_line.currency.name, company_currency.name)) aml_obj = self.env['account.move.line'] # create the payment/debit counterpart move line # on the partner account partner_ml_vals = self._prepare_move_line_partner_account( - line, move, labels) + bank_line, move, labels) partner_move_line = aml_obj.create(partner_ml_vals) # register the payment/debit move line # on the payment line and call reconciliation on it - line.write({'transit_move_line_id': partner_move_line.id}) + bank_line.write({'transit_move_line_id': partner_move_line.id}) @api.multi def _reconcile_payment_lines(self, bank_payment_lines): @@ -233,28 +241,25 @@ class PaymentOrder(models.Model): # key = unique identifier (date or True or line.id) # value = [pay_line1, pay_line2, ...] trfmoves = {} - if self.mode.transfer_move_option == 'line': - for line in self.bank_line_ids: - trfmoves[line.id] = [line] - else: - for line in self.bank_line_ids: - if line.date in trfmoves: - trfmoves[line.date].append(line) - else: - trfmoves[line.date] = [line] + for bline in self.bank_line_ids: + hashcode = bline.move_line_transfer_account_hashcode() + if hashcode in trfmoves: + trfmoves[hashcode].append(bline) + else: + trfmoves[hashcode] = [bline] - for identifier, lines in trfmoves.iteritems(): + for hashcode, blines in trfmoves.iteritems(): mvals = self._prepare_transfer_move() move = am_obj.create(mvals) total_amount = 0 - for line in lines: - total_amount += line.amount_currency - self._create_move_line_partner_account(line, move, labels) + for bline in blines: + total_amount += bline.amount_currency + self._create_move_line_partner_account(bline, move, labels) # create the payment/debit move line on the transfer account trf_ml_vals = self._prepare_move_line_transfer_account( - total_amount, move, lines, labels) + total_amount, move, blines, labels) aml_obj.create(trf_ml_vals) - self._reconcile_payment_lines(lines) + self._reconcile_payment_lines(blines) # consider entry_posted on account_journal if move.journal_id.entry_posted: diff --git a/account_banking_payment_transfer/model/bank_payment_line.py b/account_banking_payment_transfer/model/bank_payment_line.py new file mode 100644 index 000000000..d1b60360c --- /dev/null +++ b/account_banking_payment_transfer/model/bank_payment_line.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2009 EduSense BV (). +# (C) 2011 - 2013 Therp BV (). +# (C) 2015 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 import models, fields, api + + +class BankPaymentLine(models.Model): + _inherit = 'bank.payment.line' + + transit_move_line_id = fields.Many2one( + 'account.move.line', string='Transfer move line', readonly=True, + help="Move line through which the payment/debit order " + "pays the invoice") + transfer_move_line_id = fields.Many2one( + 'account.move.line', compute='_get_transfer_move_line', + string='Transfer move line counterpart', + help="Counterpart move line on the transfer account") + + @api.multi + def move_line_transfer_account_hashcode(self): + """ + This method is inherited in the module + account_banking_sepa_direct_debit + """ + self.ensure_one() + if self.order_id.mode.transfer_move_option == 'date': + hashcode = self.date + else: + hashcode = unicode(self.id) + return hashcode + + @api.multi + def _get_transfer_move_line(self): + for bank_line in self: + if bank_line.transit_move_line_id: + order_type = bank_line.order_id.payment_order_type + trf_lines = bank_line.transit_move_line_id.move_id.line_id + for move_line in trf_lines: + if order_type == 'debit' and move_line.debit > 0: + bank_line.transfer_move_line_id = move_line + elif order_type == 'payment' and move_line.credit > 0: + bank_line.transfer_move_line_id = move_line + + @api.one + def debit_reconcile(self): + """ + Reconcile a debit order's payment line with the the move line + that it is based on. Called from payment_order.action_sent(). + As the amount is derived directly from the counterpart move line, + we do not expect a write off. Take partial reconciliations into + account though. + + :param payment_line_id: the single id of the canceled payment line + """ + + transit_move_line = self.transit_move_line_id + +# if (not transit_move_line or not torec_move_line): +# raise exceptions.Warning( +# _('Can not reconcile: no move line for line %s') % self.name +# ) +# if torec_move_line.reconcile_id: +# raise exceptions.Warning( +# _('Move line %s has already been reconciled') % +# torec_move_line.name +# ) +# if (transit_move_line.reconcile_id or +# transit_move_line.reconcile_partial_id): +# raise exceptions.Warning( +# _('Move line %s has already been reconciled') % +# transit_move_line.name +# ) + + lines_to_rec = transit_move_line + for payment_line in self.payment_line_ids: + lines_to_rec += payment_line.move_line_id + + lines_to_rec.reconcile_partial(type='auto') diff --git a/account_banking_payment_transfer/model/payment_line.py b/account_banking_payment_transfer/model/payment_line.py index 76262a4b3..ee0be94b3 100644 --- a/account_banking_payment_transfer/model/payment_line.py +++ b/account_banking_payment_transfer/model/payment_line.py @@ -22,8 +22,8 @@ # along with this program. If not, see . # ############################################################################## -from openerp import models, fields, workflow, api, exceptions -from openerp.tools.translate import _ + +from openerp import models, fields, api class PaymentLine(models.Model): @@ -38,63 +38,14 @@ class PaymentLine(models.Model): msg = fields.Char('Message', required=False, readonly=True, default='') date_done = fields.Date('Date Confirmed', select=True, readonly=True) - -class BankPaymentLine(models.Model): - _inherit = 'bank.payment.line' - - transit_move_line_id = fields.Many2one( - 'account.move.line', string='Transfer move line', readonly=True, - help="Move line through which the payment/debit order " - "pays the invoice") - transfer_move_line_id = fields.Many2one( - 'account.move.line', compute='_get_transfer_move_line', - string='Transfer move line counterpart', - help="Counterpart move line on the transfer account") - @api.multi - def _get_transfer_move_line(self): - for bank_line in self: - if bank_line.transit_move_line_id: - order_type = bank_line.order_id.payment_order_type - trf_lines = bank_line.transit_move_line_id.move_id.line_id - for move_line in trf_lines: - if order_type == 'debit' and move_line.debit > 0: - bank_line.transfer_move_line_id = move_line - elif order_type == 'payment' and move_line.credit > 0: - bank_line.transfer_move_line_id = move_line - - @api.one - def debit_reconcile(self): + def payment_line_hashcode(self): """ - Reconcile a debit order's payment line with the the move line - that it is based on. Called from payment_order.action_sent(). - As the amount is derived directly from the counterpart move line, - we do not expect a write off. Take partial reconciliations into - account though. - - :param payment_line_id: the single id of the canceled payment line + Don't group the payment lines that are attached to the same supplier + but to move lines with different accounts (very unlikely), + for easier generation/comprehension of the transfer move """ - - transit_move_line = self.transit_move_line_id - -# if (not transit_move_line or not torec_move_line): -# raise exceptions.UserError( -# _('Can not reconcile: no move line for line %s') % self.name -# ) -# if torec_move_line.reconcile_id: -# raise exceptions.UserError( -# _('Move line %s has already been reconciled') % -# torec_move_line.name -# ) -# if (transit_move_line.reconcile_id or -# transit_move_line.reconcile_partial_id): -# raise exceptions.UserError( -# _('Move line %s has already been reconciled') % -# transit_move_line.name -# ) - - lines_to_rec = transit_move_line - for payment_line in self.payment_line_ids: - lines_to_rec += payment_line.move_line_id - - lines_to_rec.reconcile_partial(type='auto') + res = super(PaymentLine, self).payment_line_hashcode() + res += '-' + unicode( + self.move_line_id and self.move_line_id.account_id or False) + return res diff --git a/account_banking_sepa_direct_debit/models/__init__.py b/account_banking_sepa_direct_debit/models/__init__.py index 153ab3543..ac7674156 100644 --- a/account_banking_sepa_direct_debit/models/__init__.py +++ b/account_banking_sepa_direct_debit/models/__init__.py @@ -1,24 +1,5 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- from . import res_company from . import account_banking_mandate +from . import bank_payment_line diff --git a/account_banking_sepa_direct_debit/models/bank_payment_line.py b/account_banking_sepa_direct_debit/models/bank_payment_line.py new file mode 100644 index 000000000..9da270e80 --- /dev/null +++ b/account_banking_sepa_direct_debit/models/bank_payment_line.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# SEPA Direct Debit module for Odoo +# Copyright (C) 2015 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 BankPaymentLine(models.Model): + _inherit = 'bank.payment.line' + + @api.multi + def move_line_transfer_account_hashcode(self): + """ + From my experience, even when you ask several direct debits + at the same date with enough delay, you will have several credits + on your bank statement: one for each mandate types. + So we split the transfer move lines by mandate type, so easier + reconciliation of the bank statement. + """ + hashcode = super(BankPaymentLine, self).\ + move_line_transfer_account_hashcode() + hashcode += self.mandate_id.type + return hashcode From fc4b88c2dbf2ee5955681f809dd8cff985824b99 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 24 Sep 2015 11:47:03 +0200 Subject: [PATCH 05/28] Remove dead XML code --- account_direct_debit/__openerp__.py | 1 - .../views/account_invoice.xml | 39 ------------------- 2 files changed, 40 deletions(-) delete mode 100644 account_direct_debit/views/account_invoice.xml diff --git a/account_direct_debit/__openerp__.py b/account_direct_debit/__openerp__.py index ace7cda3d..7fac10be7 100644 --- a/account_direct_debit/__openerp__.py +++ b/account_direct_debit/__openerp__.py @@ -30,7 +30,6 @@ 'depends': ['account_banking_payment_export'], 'data': [ 'views/account_payment.xml', - 'views/account_invoice.xml', 'views/payment_mode.xml', 'views/payment_mode_type.xml', 'data/account_payment_term.xml', diff --git a/account_direct_debit/views/account_invoice.xml b/account_direct_debit/views/account_invoice.xml deleted file mode 100644 index 76a46e128..000000000 --- a/account_direct_debit/views/account_invoice.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - account.invoice.form - account.invoice - - - - - - - - - account.invoice.select direct debit - account.invoice - search - - - - - - - - - From dda5e1ccb5014bb27d4e6faf032e3e9ed9873124 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 24 Sep 2015 12:29:43 +0200 Subject: [PATCH 06/28] FIX Reading wrong field for sequence type of SEPA DD Loop on bank payment lines instead of payment lines --- .../models/bank_payment_line.py | 2 +- .../wizard/export_sdd.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/account_banking_sepa_direct_debit/models/bank_payment_line.py b/account_banking_sepa_direct_debit/models/bank_payment_line.py index 9da270e80..67a0da3f5 100644 --- a/account_banking_sepa_direct_debit/models/bank_payment_line.py +++ b/account_banking_sepa_direct_debit/models/bank_payment_line.py @@ -37,5 +37,5 @@ class BankPaymentLine(models.Model): """ hashcode = super(BankPaymentLine, self).\ move_line_transfer_account_hashcode() - hashcode += self.mandate_id.type + hashcode += '-' + unicode(self.mandate_id.recurrent_sequence_type) return hashcode diff --git a/account_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py index ff5662c46..53bdd3d10 100644 --- a/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -368,18 +368,18 @@ class BankingExportSddWizard(models.TransientModel): to_expire_mandates = abmo.browse([]) first_mandates = abmo.browse([]) all_mandates = abmo.browse([]) - for line in order.line_ids: - if line.mandate_id in all_mandates: + for bline in order.bank_line_ids: + if bline.mandate_id in all_mandates: continue - all_mandates += line.mandate_id - if line.mandate_id.type == 'oneoff': - to_expire_mandates += line.mandate_id - elif line.mandate_id.type == 'recurrent': - seq_type = line.mandate_id.recurrent_sequence_type + all_mandates += bline.mandate_id + if bline.mandate_id.type == 'oneoff': + to_expire_mandates += bline.mandate_id + elif bline.mandate_id.type == 'recurrent': + seq_type = bline.mandate_id.recurrent_sequence_type if seq_type == 'final': - to_expire_mandates += line.mandate_id + to_expire_mandates += bline.mandate_id elif seq_type == 'first': - first_mandates += line.mandate_id + first_mandates += bline.mandate_id all_mandates.write( {'last_debit_date': fields.Date.context_today(self)}) to_expire_mandates.write({'state': 'expired'}) From 7b62566b29d6fbeb1bf3d7631666228e6d7681af Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 19 Oct 2015 17:50:53 +0200 Subject: [PATCH 07/28] Forgot to remove a usecase of debit_denied Add ACL --- account_direct_debit/wizard/payment_order_create.py | 5 +---- account_payment_partner/security/ir.model.access.csv | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/account_direct_debit/wizard/payment_order_create.py b/account_direct_debit/wizard/payment_order_create.py index 61eea19ca..cd5ee9335 100644 --- a/account_direct_debit/wizard/payment_order_create.py +++ b/account_direct_debit/wizard/payment_order_create.py @@ -38,8 +38,5 @@ class PaymentOrderCreate(models.TransientModel): # invoices and payment lines linked to customer refunds # in order to debit the customer of the total of his # invoices minus his refunds - domain += ['|', - ('invoice', '=', False), - ('invoice.state', '!=', 'debit_denied'), - ('account_id.type', '=', 'receivable')] + domain += [('account_id.type', '=', 'receivable')] return True diff --git a/account_payment_partner/security/ir.model.access.csv b/account_payment_partner/security/ir.model.access.csv index b277f0229..ac6d96dfd 100644 --- a/account_payment_partner/security/ir.model.access.csv +++ b/account_payment_partner/security/ir.model.access.csv @@ -1,2 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_payment_mode_read,Read access on payment.mode to Employees,account_payment.model_payment_mode,base.group_user,1,0,0,0 +access_payment_mode_type_read,Read access on payment.mode.type to Employees,account_banking_payment_export.model_payment_mode_type,base.group_user,1,0,0,0 From 287c05c4c32be02fb2fd7286375928239c74d33f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 9 Nov 2015 23:30:18 +0100 Subject: [PATCH 08/28] Add constraints on BIC length (8 or 11 chars) --- .../models/__init__.py | 1 + .../models/res_partner_bank.py | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 account_banking_payment_export/models/res_partner_bank.py diff --git a/account_banking_payment_export/models/__init__.py b/account_banking_payment_export/models/__init__.py index 738dcdbfd..f9da02f9f 100644 --- a/account_banking_payment_export/models/__init__.py +++ b/account_banking_payment_export/models/__init__.py @@ -8,3 +8,4 @@ from . import account_move_line from . import account_invoice from . import bank_payment_line from . import payment_line +from . import res_partner_bank diff --git a/account_banking_payment_export/models/res_partner_bank.py b/account_banking_payment_export/models/res_partner_bank.py new file mode 100644 index 000000000..efa2aba70 --- /dev/null +++ b/account_banking_payment_export/models/res_partner_bank.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 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, _ +from openerp.exceptions import ValidationError + + +class ResPartnerBank(models.Model): + _inherit = 'res.partner.bank' + + @api.multi + @api.constrains('bank_bic') + def check_bic_length(self): + for pbank in self: + if pbank.bank_bic and len(pbank.bank_bic) not in (8, 11): + raise ValidationError(_( + "A valid BIC contains 8 or 11 caracters. The BIC '%s' " + "contains %d caracters, so it is not valid.") + % (pbank.bank_bic, len(pbank.bank_bic))) + + +class ResBank(models.Model): + _inherit = 'res.bank' + + @api.multi + @api.constrains('bic') + def check_bic_length(self): + for bank in self: + if bank.bic and len(bank.bic) not in (8, 11): + raise ValidationError(_( + "A valid BIC contains 8 or 11 caracters. The BIC '%s' " + "contains %d caracters, so it is not valid.") + % (bank.bic, len(bank.bic))) From e881c2aaa1987b99d986cec9903a02d079c3455b Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 9 Nov 2015 23:34:44 +0100 Subject: [PATCH 09/28] Post transfer account move by default, like for an invoice Add sum in bank payment line tree view --- account_banking_payment_export/views/bank_payment_line.xml | 3 ++- account_banking_payment_transfer/model/account_payment.py | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/account_banking_payment_export/views/bank_payment_line.xml b/account_banking_payment_export/views/bank_payment_line.xml index df4a308ba..a159af44d 100644 --- a/account_banking_payment_export/views/bank_payment_line.xml +++ b/account_banking_payment_export/views/bank_payment_line.xml @@ -46,7 +46,8 @@ + options="{'currency_field': 'currency'}" + sum="Total Amount"/> Date: Tue, 10 Nov 2015 10:04:29 +0100 Subject: [PATCH 10/28] Better checks and nice error messages --- .../model/bank_payment_line.py | 53 +++++++++++++------ 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/account_banking_payment_transfer/model/bank_payment_line.py b/account_banking_payment_transfer/model/bank_payment_line.py index d1b60360c..d46fa8d59 100644 --- a/account_banking_payment_transfer/model/bank_payment_line.py +++ b/account_banking_payment_transfer/model/bank_payment_line.py @@ -20,7 +20,8 @@ # ############################################################################## -from openerp import models, fields, api +from openerp import models, fields, api, _ +from openerp.exceptions import Warning as UserError class BankPaymentLine(models.Model): @@ -74,24 +75,42 @@ class BankPaymentLine(models.Model): transit_move_line = self.transit_move_line_id -# if (not transit_move_line or not torec_move_line): -# raise exceptions.Warning( -# _('Can not reconcile: no move line for line %s') % self.name -# ) -# if torec_move_line.reconcile_id: -# raise exceptions.Warning( -# _('Move line %s has already been reconciled') % -# torec_move_line.name -# ) -# if (transit_move_line.reconcile_id or -# transit_move_line.reconcile_partial_id): -# raise exceptions.Warning( -# _('Move line %s has already been reconciled') % -# transit_move_line.name -# ) - + assert not transit_move_line.reconcile_id,\ + 'Transit move should not be reconciled' + assert not transit_move_line.reconcile_partial_id,\ + 'Transit move should not be partially reconciled' lines_to_rec = transit_move_line for payment_line in self.payment_line_ids: + + if not payment_line.move_line_id: + raise UserError(_( + "Can not reconcile: no move line for " + "payment line %s of partner '%s'.") % ( + payment_line.name, + payment_line.partner_id.name)) + if payment_line.move_line_id.reconcile_id: + raise UserError(_( + "Move line '%s' of partner '%s' has already " + "been reconciled") % ( + payment_line.move_line_id.name, + payment_line.partner_id.name)) + if payment_line.move_line_id.reconcile_partial_id: + raise UserError(_( + "Move line '%s' of partner '%s' has already " + "been partially reconciled") % ( + payment_line.move_line_id.name, + payment_line.partner_id.name)) + if ( + payment_line.move_line_id.account_id != + transit_move_line.account_id): + raise UserError(_( + "For partner '%s', the account of the account " + "move line to pay (%s) is different from the " + "account of of the transit move line (%s).") % ( + payment_line.move_line_id.partner_id.name, + payment_line.move_line_id.account_id.code, + transit_move_line.account_id.code)) + lines_to_rec += payment_line.move_line_id lines_to_rec.reconcile_partial(type='auto') From 4f3f094370aa9a485f44b0f7391cadb988e7a6e3 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 11 Nov 2015 01:09:30 +0100 Subject: [PATCH 11/28] FIX better handling of account_id in transfer move --- .../model/account_payment.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/account_banking_payment_transfer/model/account_payment.py b/account_banking_payment_transfer/model/account_payment.py index 0748c79c6..42a1c1d14 100644 --- a/account_banking_payment_transfer/model/account_payment.py +++ b/account_banking_payment_transfer/model/account_payment.py @@ -169,10 +169,15 @@ class PaymentOrder(models.Model): def _prepare_move_line_partner_account(self, bank_line, move, labels): # TODO : ALEXIS check don't group if move_line_id.account_id # is not the same - if self.payment_order_type == 'debit': - account_id = bank_line.partner_id.property_account_receivable.id + if bank_line.payment_line_ids[0].move_line_id: + account_id =\ + bank_line.payment_line_ids[0].move_line_id.account_id.id else: - account_id = bank_line.partner_id.property_account_payable.id + if self.payment_order_type == 'debit': + account_id =\ + bank_line.partner_id.property_account_receivable.id + else: + account_id = bank_line.partner_id.property_account_payable.id vals = { 'name': _('%s line %s') % ( labels[self.payment_order_type], bank_line.name), From f9bde4af355ee102146303d0459f7f144d431c57 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 24 Nov 2015 21:38:13 +0100 Subject: [PATCH 12/28] Add bank_line_count field and display it in view Display date_sent field in view --- .../models/account_payment.py | 8 ++++++++ .../views/account_payment.xml | 13 ++++++++++++- .../view/account_payment.xml | 17 ++++++++++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/account_banking_payment_export/models/account_payment.py b/account_banking_payment_export/models/account_payment.py index 74ea5108c..13a7c1a9d 100644 --- a/account_banking_payment_export/models/account_payment.py +++ b/account_banking_payment_export/models/account_payment.py @@ -47,12 +47,20 @@ class PaymentOrder(models.Model): 'bank.payment.line', 'order_id', string="Bank Payment Lines", readonly=True) total = fields.Float(compute='_compute_total', store=True) + bank_line_count = fields.Integer( + compute='_bank_line_count', string='Number of Bank Lines') @api.depends('line_ids', 'line_ids.amount') @api.one def _compute_total(self): self.total = sum(self.mapped('line_ids.amount') or [0.0]) + @api.multi + @api.depends('bank_line_ids') + def _bank_line_count(self): + for order in self: + order.bank_line_count = len(order.bank_line_ids) + @api.multi def launch_wizard(self): """Search for a wizard to launch according to the type. diff --git a/account_banking_payment_export/views/account_payment.xml b/account_banking_payment_export/views/account_payment.xml index 0e9340e1e..8884061a8 100644 --- a/account_banking_payment_export/views/account_payment.xml +++ b/account_banking_payment_export/views/account_payment.xml @@ -14,7 +14,8 @@ - + + { @@ -91,6 +92,16 @@ + + account_banking_payment_export.payment.order.tree + + payment.order + + + + + + diff --git a/account_banking_payment_transfer/view/account_payment.xml b/account_banking_payment_transfer/view/account_payment.xml index 8bb537622..4ed6b9c62 100644 --- a/account_banking_payment_transfer/view/account_payment.xml +++ b/account_banking_payment_transfer/view/account_payment.xml @@ -4,7 +4,7 @@ account.payment.order.form (account_banking_payment_transfer) payment.order - + + + + + + + account_banking_payment_transfer.payment.order.tree + payment.order + + + + + + + + From 32470c37056aa8dd402a3175df4483df9a4aa494 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 1 Dec 2015 16:39:58 +0100 Subject: [PATCH 13/28] Better filters on payment.order.create wizard Add default values for those filters on payment.mode --- .../models/payment_mode.py | 11 ++++ .../views/payment_mode.xml | 6 ++ .../wizard/payment_order_create.py | 40 ++++++++++--- .../wizard/payment_order_create_view.xml | 9 +++ account_payment_partner/__openerp__.py | 2 + account_payment_partner/models/__init__.py | 23 +------ .../models/payment_mode.py | 32 ++++++++++ .../views/payment_mode.xml | 20 +++++++ .../wizard/payment_order_create.py | 60 ++++++++++--------- .../wizard/payment_order_create_view.xml | 25 ++++++++ 10 files changed, 171 insertions(+), 57 deletions(-) create mode 100644 account_payment_partner/models/payment_mode.py create mode 100644 account_payment_partner/views/payment_mode.xml create mode 100644 account_payment_partner/wizard/payment_order_create_view.xml diff --git a/account_banking_payment_export/models/payment_mode.py b/account_banking_payment_export/models/payment_mode.py index a0084f114..dff0071e1 100644 --- a/account_banking_payment_export/models/payment_mode.py +++ b/account_banking_payment_export/models/payment_mode.py @@ -108,3 +108,14 @@ class PaymentMode(models.Model): purchase_ok = fields.Boolean(string='Selectable on purchase operations', default=True) note = fields.Text(string="Note", translate=True) + # Default options for the "payment.order.create" wizard + default_journal_ids = fields.Many2many( + 'account.journal', string="Journals Filter") + default_invoice = fields.Boolean( + string='Linked to an Invoice or Refund', default=True) + default_date_type = fields.Selection([ + ('due', 'Due'), + ('move', 'Move'), + ], default='due', string="Type of Date Filter") + default_populate_results = fields.Boolean( + string='Populate Results Directly') diff --git a/account_banking_payment_export/views/payment_mode.xml b/account_banking_payment_export/views/payment_mode.xml index 5441bb428..cdc5a33c1 100644 --- a/account_banking_payment_export/views/payment_mode.xml +++ b/account_banking_payment_export/views/payment_mode.xml @@ -17,6 +17,12 @@
+ + + + + + diff --git a/account_banking_payment_export/wizard/payment_order_create.py b/account_banking_payment_export/wizard/payment_order_create.py index 726f26e86..6de8dd869 100644 --- a/account_banking_payment_export/wizard/payment_order_create.py +++ b/account_banking_payment_export/wizard/payment_order_create.py @@ -4,11 +4,10 @@ # Copyright (C) 2009 EduSense BV (). # (C) 2011 - 2013 Therp BV (). # (C) 2014 - 2015 ACSONE SA/NV (). +# (C) 2015 Akretion (). # # 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 @@ -30,8 +29,18 @@ from openerp import models, fields, api, _ class PaymentOrderCreate(models.TransientModel): _inherit = 'payment.order.create' - populate_results = fields.Boolean(string="Populate results directly", - default=True) + journal_ids = fields.Many2many( + 'account.journal', string='Journals Filter', required=True) + invoice = fields.Boolean( + string='Linked to an Invoice or Refund') + date_type = fields.Selection([ + ('due', 'Due'), + ('move', 'Move'), + ], string="Type of Date Filter", required=True) + duedate = fields.Date(required=False) + move_date = fields.Date( + string='Move Date', default=fields.Date.context_today) + populate_results = fields.Boolean(string="Populate Results Directly") @api.model def default_get(self, field_list): @@ -40,6 +49,16 @@ class PaymentOrderCreate(models.TransientModel): if ('entries' in field_list and context.get('line_ids') and context.get('populate_results')): res.update({'entries': context['line_ids']}) + assert context.get('active_model') == 'payment.order',\ + 'active_model should be payment.order' + assert context.get('active_id'), 'Missing active_id in context !' + pay_order = self.env['payment.order'].browse(context['active_id']) + res.update({ + 'journal_ids': pay_order.mode.default_journal_ids.ids or False, + 'invoice': pay_order.mode.default_invoice, + 'date_type': pay_order.mode.default_date_type, + 'populate_results': pay_order.mode.default_populate_results, + }) return res @api.multi @@ -101,9 +120,16 @@ class PaymentOrderCreate(models.TransientModel): domain = [('move_id.state', '=', 'posted'), ('reconcile_id', '=', False), ('company_id', '=', payment.mode.company_id.id), - '|', - ('date_maturity', '<=', self.duedate), - ('date_maturity', '=', False)] + ('journal_id', 'in', self.journal_ids.ids)] + if self.date_type == 'due': + domain += [ + '|', + ('date_maturity', '<=', self.duedate), + ('date_maturity', '=', False)] + elif self.date_type == 'move': + domain.append(('date', '<=', self.move_date)) + if self.invoice: + domain.append(('invoice', '!=', False)) self.extend_payment_order_domain(payment, domain) # -- end account_direct_debit -- lines = line_obj.search(domain) diff --git a/account_banking_payment_export/wizard/payment_order_create_view.xml b/account_banking_payment_export/wizard/payment_order_create_view.xml index d4d4b44dc..5e1d9a69d 100644 --- a/account_banking_payment_export/wizard/payment_order_create_view.xml +++ b/account_banking_payment_export/wizard/payment_order_create_view.xml @@ -13,8 +13,17 @@ + + + + + + + + {'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', 'due')]} + diff --git a/account_payment_partner/__openerp__.py b/account_payment_partner/__openerp__.py index ef8b028ce..2bbc92f96 100644 --- a/account_payment_partner/__openerp__.py +++ b/account_payment_partner/__openerp__.py @@ -36,7 +36,9 @@ 'views/res_partner_view.xml', 'views/account_invoice_view.xml', 'views/report_invoice.xml', + 'views/payment_mode.xml', 'security/ir.model.access.csv', + 'wizard/payment_order_create_view.xml', ], 'demo': ['demo/partner_demo.xml'], 'installable': True, diff --git a/account_payment_partner/models/__init__.py b/account_payment_partner/models/__init__.py index c2c7b405d..be3f531bb 100644 --- a/account_payment_partner/models/__init__.py +++ b/account_payment_partner/models/__init__.py @@ -1,24 +1,5 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- from . import res_partner from . import account_invoice +from . import payment_mode diff --git a/account_payment_partner/models/payment_mode.py b/account_payment_partner/models/payment_mode.py new file mode 100644 index 000000000..a4cd31616 --- /dev/null +++ b/account_payment_partner/models/payment_mode.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Copyright (C) 2015 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 PaymentMode(models.Model): + _inherit = "payment.mode" + + default_payment_mode = fields.Selection([ + ('same', 'Same'), + ('same_or_null', 'Same or empty'), + ('any', 'Any'), + ], string='Payment Mode on Invoice', default='same') diff --git a/account_payment_partner/views/payment_mode.xml b/account_payment_partner/views/payment_mode.xml new file mode 100644 index 000000000..120ca6970 --- /dev/null +++ b/account_payment_partner/views/payment_mode.xml @@ -0,0 +1,20 @@ + + + + + + + account_payment_partner.payment.mode.form + payment.mode + + + + + + + + + + + diff --git a/account_payment_partner/wizard/payment_order_create.py b/account_payment_partner/wizard/payment_order_create.py index 442047610..656ef9878 100644 --- a/account_payment_partner/wizard/payment_order_create.py +++ b/account_payment_partner/wizard/payment_order_create.py @@ -1,8 +1,8 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # -# Account Payment Partner module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) +# Account Payment Partner module for Odoo +# Copyright (C) 2014-2015 Akretion (http://www.akretion.com) # @author Alexis de Lattre # # This program is free software: you can redistribute it and/or modify @@ -20,39 +20,41 @@ # ############################################################################## -from openerp import models, api +from openerp import models, fields, api class PaymentOrderCreate(models.TransientModel): _inherit = 'payment.order.create' + payment_mode = fields.Selection([ + ('same', 'Same'), + ('same_or_null', 'Same or empty'), + ('any', 'Any'), + ], string='Payment Mode on Invoice', default='same') + + @api.model + def default_get(self, field_list): + res = super(PaymentOrderCreate, self).default_get(field_list) + context = self.env.context + assert context.get('active_model') == 'payment.order',\ + 'active_model should be payment.order' + assert context.get('active_id'), 'Missing active_id in context !' + pay_order = self.env['payment.order'].browse(context['active_id']) + res['payment_mode'] = pay_order.mode.default_payment_mode, + return res + @api.multi def extend_payment_order_domain(self, payment_order, domain): res = super(PaymentOrderCreate, self).extend_payment_order_domain( payment_order, domain) - # Monkey patch for fixing problem with the core search function - # when args has ('invoice', '=', False), referred in the issue #4857 - # (https://github.com/odoo/odoo/issues/4857) - # - # Original domain: - # domain += ['|', '|', - # ('invoice', '=', False), - # ('invoice.payment_mode_id', '=', False), - # ('invoice.payment_mode_id', '=', payment_order.mode.id)] - self.env.cr.execute( - "SELECT l.id " - "FROM account_move_line l " - "LEFT OUTER JOIN account_invoice i " - "ON l.move_id = i.move_id " - "INNER JOIN account_account a " - "ON a.id = l.account_id " - "WHERE i.id IS NULL" - " AND l.reconcile_id IS NULL" - " AND a.type in ('receivable', 'payable')") - ids = [x[0] for x in self.env.cr.fetchall()] - domain += ['|', - ('id', 'in', ids), - '|', - ('invoice.payment_mode_id', '=', False), - ('invoice.payment_mode_id', '=', payment_order.mode.id)] + if self.invoice and self.payment_mode: + if self.payment_mode == 'same': + domain.append( + ('invoice.payment_mode_id', '=', payment_order.mode.id)) + elif self.payment_mode == 'same_or_null': + domain += [ + '|', + ('invoice.payment_mode_id', '=', False), + ('invoice.payment_mode_id', '=', payment_order.mode.id)] + # if payment_mode == 'any', don't modify domain return res diff --git a/account_payment_partner/wizard/payment_order_create_view.xml b/account_payment_partner/wizard/payment_order_create_view.xml new file mode 100644 index 000000000..f163b8cd6 --- /dev/null +++ b/account_payment_partner/wizard/payment_order_create_view.xml @@ -0,0 +1,25 @@ + + + + + + + + account_payment_partner.payment.order.create.form + payment.order.create + + + + + + + + + + + From 27d3b463896b2bf04e22f49952746a368e4904e0 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 1 Dec 2015 17:05:15 +0100 Subject: [PATCH 14/28] FIX remove coma at end of line --- account_payment_partner/wizard/payment_order_create.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_payment_partner/wizard/payment_order_create.py b/account_payment_partner/wizard/payment_order_create.py index 656ef9878..fbf4939fb 100644 --- a/account_payment_partner/wizard/payment_order_create.py +++ b/account_payment_partner/wizard/payment_order_create.py @@ -30,7 +30,7 @@ class PaymentOrderCreate(models.TransientModel): ('same', 'Same'), ('same_or_null', 'Same or empty'), ('any', 'Any'), - ], string='Payment Mode on Invoice', default='same') + ], string='Payment Mode on Invoice') @api.model def default_get(self, field_list): @@ -40,7 +40,7 @@ class PaymentOrderCreate(models.TransientModel): 'active_model should be payment.order' assert context.get('active_id'), 'Missing active_id in context !' pay_order = self.env['payment.order'].browse(context['active_id']) - res['payment_mode'] = pay_order.mode.default_payment_mode, + res['payment_mode'] = pay_order.mode.default_payment_mode return res @api.multi From 9ebcbd4bcb80fc0e57e11a6b37ebe0146ff6a4ee Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 2 Dec 2015 00:17:17 +0100 Subject: [PATCH 15/28] Update automated tests and demo data Add on_change on field 'type' of payment.mode for easier configuration --- .../demo/banking_demo.xml | 2 + .../models/payment_mode.py | 24 +++--- .../model/bank_payment_line.py | 6 -- .../test/test_partial_payment_refunded.yml | 74 ++++++----------- .../test/test_partial_payment_transfer.yml | 82 +++++++------------ .../test/test_payment_method.yml | 31 +++---- .../demo/sepa_direct_debit_demo.xml | 1 + 7 files changed, 82 insertions(+), 138 deletions(-) diff --git a/account_banking_payment_export/demo/banking_demo.xml b/account_banking_payment_export/demo/banking_demo.xml index c33d538c0..be9cd471b 100644 --- a/account_banking_payment_export/demo/banking_demo.xml +++ b/account_banking_payment_export/demo/banking_demo.xml @@ -86,6 +86,7 @@ + @@ -95,6 +96,7 @@ + diff --git a/account_banking_payment_export/models/payment_mode.py b/account_banking_payment_export/models/payment_mode.py index dff0071e1..034973cdd 100644 --- a/account_banking_payment_export/models/payment_mode.py +++ b/account_banking_payment_export/models/payment_mode.py @@ -86,20 +86,11 @@ class PaymentMode(models.Model): res = [t.code for t in payment_mode.type.suitable_bank_types] return res - @api.model - def _default_type(self): - return self.env.ref( - 'account_banking_payment_export.' - 'manual_bank_tranfer', raise_if_not_found=False)\ - or self.env['payment.mode.type'] - type = fields.Many2one( 'payment.mode.type', string='Export type', required=True, - help='Select the Export Payment Type for the Payment Mode.', - default=_default_type) + 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) @@ -119,3 +110,16 @@ class PaymentMode(models.Model): ], default='due', string="Type of Date Filter") default_populate_results = fields.Boolean( string='Populate Results Directly') + + @api.onchange('type') + def type_on_change(self): + if self.type: + ajo = self.env['account.journal'] + aj_ids = [] + if self.type.payment_order_type == 'payment': + aj_ids = ajo.search([ + ('type', 'in', ('purchase_refund', 'purchase'))]).ids + elif self.type.payment_order_type == 'debit': + aj_ids = ajo.search([ + ('type', 'in', ('sale_refund', 'sale'))]).ids + self.default_journal_ids = [(6, 0, aj_ids)] diff --git a/account_banking_payment_transfer/model/bank_payment_line.py b/account_banking_payment_transfer/model/bank_payment_line.py index d46fa8d59..9b523c0cb 100644 --- a/account_banking_payment_transfer/model/bank_payment_line.py +++ b/account_banking_payment_transfer/model/bank_payment_line.py @@ -94,12 +94,6 @@ class BankPaymentLine(models.Model): "been reconciled") % ( payment_line.move_line_id.name, payment_line.partner_id.name)) - if payment_line.move_line_id.reconcile_partial_id: - raise UserError(_( - "Move line '%s' of partner '%s' has already " - "been partially reconciled") % ( - payment_line.move_line_id.name, - payment_line.partner_id.name)) if ( payment_line.move_line_id.account_id != transit_move_line.account_id): diff --git a/account_banking_payment_transfer/test/test_partial_payment_refunded.yml b/account_banking_payment_transfer/test/test_partial_payment_refunded.yml index cf476f155..529a04e88 100644 --- a/account_banking_payment_transfer/test/test_partial_payment_refunded.yml +++ b/account_banking_payment_transfer/test/test_partial_payment_refunded.yml @@ -42,7 +42,7 @@ quantity: 1.0 journal_id: account.expenses_journal - - Make sure that the type is in_invoice + Make sure that the type is in_refund - !python {model: account.invoice}: | self.write(cr, uid, ref("account_refund_supplier_refunded"), {'type': 'in_refund'}) @@ -51,67 +51,38 @@ - !workflow {model: account.invoice, action: invoice_open, ref: account_refund_supplier_refunded} - - I reconcile the invoice and the refund -- - !record {model: account.move.line.reconcile, id: account_move_line_reconcile0}: - trans_nbr: 2 - credit: 600.0 - debit: 200.0 - writeoff: -400.0 -- - Then I click on the 'Partial Reconcile' button -- - !python {model: account.move.line.reconcile}: | - move_line_obj = self.pool.get('account.move.line') - inv_obj = self.pool.get('account.invoice') - invoice_move_id = inv_obj.browse(cr, uid, ref("account_invoice_supplier_refunded")).move_id.id - refund_move_id = inv_obj.browse(cr, uid, ref("account_refund_supplier_refunded")).move_id.id - debit_line_id = move_line_obj.search(cr, uid, [('move_id', '=', refund_move_id),('debit', '=', 200)])[0] - credit_line_id = move_line_obj.search(cr, uid, [('move_id', '=', invoice_move_id),('credit', '=', 600)])[0] - ids = [debit_line_id, credit_line_id] - partial_reconcile = self.trans_rec_reconcile_partial_reconcile(cr, uid, [ref('account_move_line_reconcile0')], { - 'active_model': 'account.move.line', 'active_ids': ids, 'tz': False, 'active_id': ids[1]}) - move_line = move_line_obj.browse(cr, uid, ids) - assert move_line[0].reconcile_partial_id, "Partial reconcilation is not done" -- - I check that the invoice balance (residual) is now 400 -- - !assert {model: account.invoice, id: account_invoice_supplier_refunded, severity: error, string: Invoice residual should be 400.}: - - residual == 400 - - amount_total == 600 -- - I create a payment order on which I will select the invoice I created + I create a payment order - !record {model: payment.order, id: partial_payment_order_1}: mode: account_banking_payment_transfer.payment_mode0 - date_prefered: 'due' + date_prefered: 'now' - - !record {model: payment.order.create, id: payment_order_create_1}: - duedate: !eval time.strftime('%Y-%m-%d') -- - I search for the invoice entries to make the payment. -- - !python {model: payment.order.create}: | - self.search_entries(cr, uid, [ref("payment_order_create_1")], { - "active_model": "payment.order", "active_ids": [ref("partial_payment_order_1")], - "active_id": ref("partial_payment_order_1"), }) -- - I create payment lines entries. + I run the select move line to pay wizard - !python {model: payment.order.create}: | + context = { + "active_model": "payment.order", + "active_ids": [ref("partial_payment_order_1")], + "active_id": ref("partial_payment_order_1"), + } + wiz_id = self.create(cr, uid, {}, context=context) + self.search_entries(cr, uid, [wiz_id], context=context) + mline_ids = [] invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account_invoice_supplier_refunded")) for l in invoice.move_id.line_id: if not l.debit and l.credit: - move_line = l + mline_ids.append(l.id) break - self.write(cr, uid, [ref("payment_order_create_1")], {'entries': [(6,0,[move_line.id])]}) - self.create_payment(cr, uid, [ref("payment_order_create_1")], { - "active_model": "payment.order", "active_ids": [ref("partial_payment_order_1")], - "active_id": ref("partial_payment_order_1")}) + refund = self.pool.get('account.invoice').browse(cr, uid, ref("account_refund_supplier_refunded")) + for l in refund.move_id.line_id: + if not l.credit and l.debit: + mline_ids.append(l.id) + break + self.write(cr, uid, [wiz_id], {'entries': [(6, 0, mline_ids)]}) + self.create_payment(cr, uid, [wiz_id], context=context) pay_obj = self.pool.get('payment.order') pay = pay_obj.browse(cr, uid, ref('partial_payment_order_1')) - assert pay.line_ids[0].amount_currency == 400 - assert pay.total == 400 + assert len(pay.line_ids) == 2 - I confirm the payment order. - @@ -121,6 +92,7 @@ - !assert {model: payment.order, id: partial_payment_order_1, severity: error, string: Payment Order should be 'Confirmed'.}: - state == 'open' + - total == 400.0 - I create the wizard for paying the payment - @@ -159,4 +131,4 @@ !assert {model: account.invoice, id: account_invoice_supplier_refunded, severity: error, string: Invoice residual should be 0.}: - residual == 0 - amount_total == 600 - - state == 'paid' \ No newline at end of file + - state == 'paid' diff --git a/account_banking_payment_transfer/test/test_partial_payment_transfer.yml b/account_banking_payment_transfer/test/test_partial_payment_transfer.yml index f32b9a84d..2e7a05a7c 100644 --- a/account_banking_payment_transfer/test/test_partial_payment_transfer.yml +++ b/account_banking_payment_transfer/test/test_partial_payment_transfer.yml @@ -25,31 +25,26 @@ - !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_supplier_partial} - - I create a payment order on which I will select the invoice I created + I create a payment order - !record {model: payment.order, id: partial_payment_order_2}: mode: account_banking_payment_transfer.payment_mode0 date_prefered: 'due' - - !record {model: payment.order.create, id: payment_order_create_2}: - duedate: !eval time.strftime('%Y-%m-%d') -- - I search for the invoice entries to make the payment. -- - !python {model: payment.order.create}: | - self.search_entries(cr, uid, [ref("payment_order_create_2")], { - "active_model": "payment.order", "active_ids": [ref("partial_payment_order_2")], - "active_id": ref("partial_payment_order_2"), }) -- - I create payment lines entries. + I run the select move line to pay wizard - !python {model: payment.order.create}: | + context = { + "active_model": "payment.order", + "active_ids": [ref("partial_payment_order_2")], + "active_id": ref("partial_payment_order_2"), + } + wiz_id = self.create(cr, uid, {}, context=context) + self.search_entries(cr, uid, [wiz_id], context=context) invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account_invoice_supplier_partial")) move_line = invoice.move_id.line_id[0] - self.write(cr, uid, [ref("payment_order_create_2")], {'entries': [(6,0,[move_line.id])]}) - self.create_payment(cr, uid, [ref("payment_order_create_2")], { - "active_model": "payment.order", "active_ids": [ref("partial_payment_order_2")], - "active_id": ref("partial_payment_order_2")}) + self.write(cr, uid, [wiz_id], {'entries': [(6, 0, [move_line.id])]}) + self.create_payment(cr, uid, [wiz_id], context=context) pay_obj = self.pool.get('payment.order') pay = pay_obj.browse(cr, uid, ref('partial_payment_order_2')) assert pay.line_ids @@ -118,29 +113,24 @@ !record {model: payment.order, id: partial_partial_payment_order_2}: mode: account_banking_payment_transfer.payment_mode0 date_prefered: 'due' -- - !record {model: payment.order.create, id: partial_payment_order_create_2}: - duedate: !eval time.strftime('%Y-%m-%d') - I search for the invoice entries to make the payment. - !python {model: payment.order.create}: | - self.search_entries(cr, uid, [ref("partial_payment_order_create_2")], { - "active_model": "payment.order", "active_ids": [ref("partial_partial_payment_order_2")], - "active_id": ref("partial_partial_payment_order_2"), }) -- - I create payment lines entries. -- - !python {model: payment.order.create}: | + context = { + "active_model": "payment.order", + "active_ids": [ref("partial_partial_payment_order_2")], + "active_id": ref("partial_partial_payment_order_2"), + } + wiz_id = self.create(cr, uid, {}, context=context) + self.search_entries(cr, uid, [wiz_id], context=context) invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account_invoice_supplier_partial")) for l in invoice.move_id.line_id: if not l.debit and l.credit: move_line = l break - self.write(cr, uid, [ref("partial_payment_order_create_2")], {'entries': [(6,0,[move_line.id])]}) - self.create_payment(cr, uid, [ref("partial_payment_order_create_2")], { - "active_model": "payment.order", "active_ids": [ref("partial_partial_payment_order_2")], - "active_id": ref("partial_partial_payment_order_2")}) + self.write(cr, uid, [wiz_id], {'entries': [(6,0,[move_line.id])]}) + self.create_payment(cr, uid, [wiz_id], context=context) pay_obj = self.pool.get('payment.order') pay = pay_obj.browse(cr, uid, ref('partial_partial_payment_order_2')) assert len(pay.line_ids) == 1 @@ -198,29 +188,24 @@ !record {model: payment.order, id: partial_partial_payment_order_3}: mode: account_banking_payment_transfer.payment_mode0 date_prefered: 'due' -- - !record {model: payment.order.create, id: partial_payment_order_create_3}: - duedate: !eval time.strftime('%Y-%m-%d') - I search for the invoice entries to make the payment. - !python {model: payment.order.create}: | - self.search_entries(cr, uid, [ref("partial_payment_order_create_3")], { - "active_model": "payment.order", "active_ids": [ref("partial_partial_payment_order_3")], - "active_id": ref("partial_partial_payment_order_3"), }) -- - I create payment lines entries. -- - !python {model: payment.order.create}: | + context = { + "active_model": "payment.order", + "active_ids": [ref("partial_partial_payment_order_3")], + "active_id": ref("partial_partial_payment_order_3"), + } + wiz_id = self.create(cr, uid, {}, context=context) + self.search_entries(cr, uid, [wiz_id], context=context) invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account_invoice_supplier_partial")) for l in invoice.move_id.line_id: if not l.debit and l.credit: move_line = l break - self.write(cr, uid, [ref("partial_payment_order_create_3")], {'entries': [(6,0,[move_line.id])]}) - self.create_payment(cr, uid, [ref("partial_payment_order_create_3")], { - "active_model": "payment.order", "active_ids": [ref("partial_partial_payment_order_3")], - "active_id": ref("partial_partial_payment_order_3")}) + self.write(cr, uid, [wiz_id], {'entries': [(6, 0, [move_line.id])]}) + self.create_payment(cr, uid, [wiz_id], context=context) pay_obj = self.pool.get('payment.order') pay = pay_obj.browse(cr, uid, ref('partial_partial_payment_order_3')) assert len(pay.line_ids) == 1 @@ -265,12 +250,3 @@ assert sum_credit == 0 assert inv.residual == 0 assert inv.state == 'paid' - - - - - - - - - diff --git a/account_banking_payment_transfer/test/test_payment_method.yml b/account_banking_payment_transfer/test/test_payment_method.yml index a20db04d4..4a74dd895 100644 --- a/account_banking_payment_transfer/test/test_payment_method.yml +++ b/account_banking_payment_transfer/test/test_payment_method.yml @@ -2,7 +2,7 @@ I create a supplier invoice - !record {model: account.invoice, id: account_invoice_supplier0, view: account.invoice_supplier_form}: - check_total: 450.0 + check_total: 1005.55 partner_id: base.res_partner_4 reference_type: none type: in_invoice @@ -35,34 +35,29 @@ - state == 'open' - type == 'in_invoice' - - I create a payment order on which I will select the invoice I created + I create a payment order - !record {model: payment.order, id: payment_order_0}: mode: account_banking_payment_transfer.payment_mode0 date_prefered: 'due' - - !record {model: payment.order.create, id: payment_order_create_0}: - duedate: !eval time.strftime('%Y-%m-%d') -- - I search for the invoice entries to make the payment. -- - !python {model: payment.order.create}: | - self.search_entries(cr, uid, [ref("payment_order_create_0")], { - "active_model": "payment.order", "active_ids": [ref("payment_order_0")], - "active_id": ref("payment_order_0"), }) -- - I create payment lines entries. + I run the select move line to pay wizard - !python {model: payment.order.create}: | + context = { + "active_model": "payment.order", + "active_ids": [ref("payment_order_0")], + "active_id": ref("payment_order_0"), + } + wiz_id = self.create(cr, uid, {}, context=context) + self.search_entries(cr, uid, [wiz_id], context=context) invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account_invoice_supplier0")) entries = [] for move_line in invoice.move_id.line_id: if move_line.credit and not move_line.debit: entries.append((6, 0, [move_line.id])) - self.write(cr, uid, [ref("payment_order_create_0")], {'entries': entries}) - self.create_payment(cr, uid, [ref("payment_order_create_0")], { - "active_model": "payment.order", "active_ids": [ref("payment_order_0")], - "active_id": ref("payment_order_0")}) + self.write(cr, uid, [wiz_id], {'entries': entries}) + self.create_payment(cr, uid, [wiz_id], context=context) pay_obj = self.pool.get('payment.order') pay = pay_obj.browse(cr, uid, ref('payment_order_0')) for line in pay.line_ids: @@ -161,4 +156,4 @@ I check that the payment is done - !assert {model: payment.order, id: payment_order_0, severity: error, string: Payment Order should be done}: - - state == 'done' \ No newline at end of file + - state == 'done' 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 51a24bad1..07b347f6c 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 @@ -10,6 +10,7 @@ + From 3e429b4d588f9b7ee774e54781fe36f729dc3379 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 2 Dec 2015 00:34:08 +0100 Subject: [PATCH 16/28] Update test in account_banking_tests --- account_banking_tests/tests/test_payment_roundtrip.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/account_banking_tests/tests/test_payment_roundtrip.py b/account_banking_tests/tests/test_payment_roundtrip.py index 2212f6319..d93f314dd 100644 --- a/account_banking_tests/tests/test_payment_roundtrip.py +++ b/account_banking_tests/tests/test_payment_roundtrip.py @@ -253,7 +253,10 @@ class TestPaymentRoundtrip(TransactionCase): 'mode': self.payment_mode_id, 'date_prefered': 'now', }) - context = {'active_id': self.payment_order_id} + context = { + 'active_id': self.payment_order_id, + 'active_model': 'payment.order', + } entries = reg('account.move.line').search( cr, uid, [ ('company_id', '=', self.company_id), @@ -398,7 +401,7 @@ class TestPaymentRoundtrip(TransactionCase): payment_order = reg('payment.order').browse( cr, uid, self.payment_order_id) assert payment_order.line_ids, 'Payment order has no payment lines' - for line in payment_order.line_ids: + for line in payment_order.bank_line_ids: assert line.transit_move_line_id, \ 'Payment order has no transfer move line' assert line.transit_move_line_id.reconcile_id, \ @@ -413,7 +416,7 @@ class TestPaymentRoundtrip(TransactionCase): payment_order = reg('payment.order').browse( cr, uid, self.payment_order_id) assert payment_order.line_ids, 'Payment order has no payment lines' - for line in payment_order.line_ids: + for line in payment_order.bank_line_ids: assert line.transfer_move_line_id, \ 'Payment order has no transfer move line' assert line.transfer_move_line_id.reconcile_id, \ From 22cd2f3c402942387d894e77a92da974c52e0c89 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 27 Jan 2016 12:06:41 +0100 Subject: [PATCH 17/28] Add translatable 'label' field on payment.mode, designed to be used in invoice report --- account_payment_partner/models/payment_mode.py | 3 +++ account_payment_partner/views/payment_mode.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/account_payment_partner/models/payment_mode.py b/account_payment_partner/models/payment_mode.py index a4cd31616..62b8767e6 100644 --- a/account_payment_partner/models/payment_mode.py +++ b/account_payment_partner/models/payment_mode.py @@ -25,6 +25,9 @@ from openerp import models, fields class PaymentMode(models.Model): _inherit = "payment.mode" + label = fields.Char( + string='Label', translate=True, + help="This field is designed to be used in the invoice report") default_payment_mode = fields.Selection([ ('same', 'Same'), ('same_or_null', 'Same or empty'), diff --git a/account_payment_partner/views/payment_mode.xml b/account_payment_partner/views/payment_mode.xml index 120ca6970..b32d52b01 100644 --- a/account_payment_partner/views/payment_mode.xml +++ b/account_payment_partner/views/payment_mode.xml @@ -12,6 +12,9 @@ + + + From 062fe64acf9506faaebf8c988ff602c6a5f78ec5 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 27 Jan 2016 12:09:45 +0100 Subject: [PATCH 18/28] Better strings --- account_banking_payment_export/models/account_payment.py | 5 +++-- .../wizard/payment_order_create.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/account_banking_payment_export/models/account_payment.py b/account_banking_payment_export/models/account_payment.py index 13a7c1a9d..3a6b2cd91 100644 --- a/account_banking_payment_export/models/account_payment.py +++ b/account_banking_payment_export/models/account_payment.py @@ -163,8 +163,9 @@ class PaymentOrder(models.Model): for paydict in group_paylines.values(): # Block if a bank payment line is <= 0 if paydict['total'] <= 0: - raise exceptions.Warning( - _("The amount for Partner '%s' is negative (%.2f) !") + raise exceptions.Warning(_( + "The amount for Partner '%s' is negative " + "or null (%.2f) !") % (paydict['paylines'][0].partner_id.name, paydict['total'])) vals = self._prepare_bank_payment_line(paydict['paylines']) diff --git a/account_banking_payment_export/wizard/payment_order_create.py b/account_banking_payment_export/wizard/payment_order_create.py index 6de8dd869..9834f97c7 100644 --- a/account_banking_payment_export/wizard/payment_order_create.py +++ b/account_banking_payment_export/wizard/payment_order_create.py @@ -34,8 +34,8 @@ class PaymentOrderCreate(models.TransientModel): invoice = fields.Boolean( string='Linked to an Invoice or Refund') date_type = fields.Selection([ - ('due', 'Due'), - ('move', 'Move'), + ('due', 'Due Date'), + ('move', 'Move Date'), ], string="Type of Date Filter", required=True) duedate = fields.Date(required=False) move_date = fields.Date( From 4a62d6d30b57c0ee1aae46e3db39d03d16faac6a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 15 Feb 2016 23:10:18 +0100 Subject: [PATCH 19/28] [IMP] *: Short headers --- account_banking_mandate/__init__.py | 25 +++---------- account_banking_mandate/__openerp__.py | 28 ++++----------- account_banking_mandate/models/__init__.py | 27 +++----------- .../models/account_banking_mandate.py | 35 +++++-------------- .../models/account_invoice.py | 27 +++----------- .../models/bank_payment_line.py | 26 +++----------- .../models/payment_line.py | 27 +++----------- .../models/res_partner_bank.py | 26 +++----------- account_banking_pain_base/__init__.py | 25 +++---------- account_banking_pain_base/__openerp__.py | 26 +++----------- .../migrations/8.0.0.2/post-migration.py | 21 ++--------- account_banking_pain_base/models/__init__.py | 24 ++----------- .../models/bank_payment_line.py | 24 ++----------- .../models/banking_export_pain.py | 25 +++---------- .../models/payment_line.py | 25 +++---------- .../models/payment_mode.py | 25 +++---------- .../models/res_company.py | 28 +++------------ .../models/res_partner_bank.py | 23 +++--------- account_banking_pain_base/post_install.py | 25 +++---------- account_banking_payment_export/__openerp__.py | 27 +++----------- .../models/account_invoice.py | 25 ++----------- .../models/account_move_line.py | 23 +++--------- .../models/account_payment.py | 26 ++------------ .../models/bank_payment_line.py | 21 ++--------- .../models/payment_line.py | 21 ++--------- .../models/payment_mode.py | 27 +++----------- .../models/payment_mode_type.py | 27 +++----------- .../models/res_partner_bank.py | 21 ++--------- .../__openerp__.py | 28 +++------------ .../model/account_move_reconcile.py | 26 ++------------ .../model/account_payment.py | 30 +++------------- .../model/bank_payment_line.py | 24 +++---------- .../model/payment_line.py | 26 ++------------ .../model/payment_mode.py | 28 +++------------ .../post_install.py | 24 ++----------- .../__init__.py | 23 ++---------- .../__openerp__.py | 26 +++----------- .../wizard/__init__.py | 24 ++----------- .../wizard/export_sepa.py | 26 +++----------- account_banking_sepa_direct_debit/__init__.py | 24 ++----------- .../__openerp__.py | 26 +++----------- .../models/account_banking_mandate.py | 25 +++---------- .../models/bank_payment_line.py | 22 ++---------- .../models/res_company.py | 25 +++---------- account_direct_debit/__openerp__.py | 26 ++++---------- .../models/account_move_line.py | 24 +++---------- account_direct_debit/models/payment_line.py | 4 +++ account_payment_partner/__init__.py | 24 ++----------- account_payment_partner/__openerp__.py | 26 +++----------- .../models/account_invoice.py | 25 +++---------- .../models/payment_mode.py | 22 ++---------- account_payment_partner/models/res_partner.py | 25 +++---------- 52 files changed, 204 insertions(+), 1089 deletions(-) diff --git a/account_banking_mandate/__init__.py b/account_banking_mandate/__init__.py index 1feaa8f2d..bd2b7ef7b 100644 --- a/account_banking_mandate/__init__.py +++ b/account_banking_mandate/__init__.py @@ -1,22 +1,5 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Compassion CH - Cyril Sester +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import models diff --git a/account_banking_mandate/__openerp__.py b/account_banking_mandate/__openerp__.py index abee60c18..53b0b5a39 100644 --- a/account_banking_mandate/__openerp__.py +++ b/account_banking_mandate/__openerp__.py @@ -1,25 +1,9 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Compassion CH - Cyril Sester +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + { 'name': 'Account Banking Mandate', 'summary': 'Banking mandates', diff --git a/account_banking_mandate/models/__init__.py b/account_banking_mandate/models/__init__.py index 4b191f0d1..cb0da2fd5 100644 --- a/account_banking_mandate/models/__init__.py +++ b/account_banking_mandate/models/__init__.py @@ -1,25 +1,8 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Compassion CH - Cyril Sester +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import account_banking_mandate from . import account_invoice from . import res_partner_bank diff --git a/account_banking_mandate/models/account_banking_mandate.py b/account_banking_mandate/models/account_banking_mandate.py index e8aaa89d9..92cd40d56 100644 --- a/account_banking_mandate/models/account_banking_mandate.py +++ b/account_banking_mandate/models/account_banking_mandate.py @@ -1,34 +1,17 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Compassion CH - Cyril Sester +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). 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) - ''' + """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' diff --git a/account_banking_mandate/models/account_invoice.py b/account_banking_mandate/models/account_invoice.py index a4e43eba6..dd04f1a2a 100644 --- a/account_banking_mandate/models/account_invoice.py +++ b/account_banking_mandate/models/account_invoice.py @@ -1,25 +1,8 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Compassion CH - Cyril Sester +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from openerp import models, fields diff --git a/account_banking_mandate/models/bank_payment_line.py b/account_banking_mandate/models/bank_payment_line.py index cb268198c..4952c17a0 100644 --- a/account_banking_mandate/models/bank_payment_line.py +++ b/account_banking_mandate/models/bank_payment_line.py @@ -1,24 +1,8 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Mandate module for Odoo -# Copyright (C) 2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Compassion CH - Cyril Sester +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api diff --git a/account_banking_mandate/models/payment_line.py b/account_banking_mandate/models/payment_line.py index fa044ea29..96bd73f41 100644 --- a/account_banking_mandate/models/payment_line.py +++ b/account_banking_mandate/models/payment_line.py @@ -1,25 +1,8 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Mandate module for Odoo -# 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Compassion CH - Cyril Sester +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, exceptions, _ diff --git a/account_banking_mandate/models/res_partner_bank.py b/account_banking_mandate/models/res_partner_bank.py index ecb1e944c..51b8fa14f 100644 --- a/account_banking_mandate/models/res_partner_bank.py +++ b/account_banking_mandate/models/res_partner_bank.py @@ -1,25 +1,7 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Compassion CH - Cyril Sester +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields diff --git a/account_banking_pain_base/__init__.py b/account_banking_pain_base/__init__.py index c4f18b657..44319ee0a 100644 --- a/account_banking_pain_base/__init__.py +++ b/account_banking_pain_base/__init__.py @@ -1,24 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for Odoo -# 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models from .post_install import set_default_initiating_party diff --git a/account_banking_pain_base/__openerp__.py b/account_banking_pain_base/__openerp__.py index 7d89c69a4..fe8590fd7 100644 --- a/account_banking_pain_base/__openerp__.py +++ b/account_banking_pain_base/__openerp__.py @@ -1,24 +1,8 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN base module for Odoo -# Copyright (C) 2013-2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013-2015 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + { 'name': 'Account Banking PAIN Base Module', 'summary': 'Base module for PAIN file generation', diff --git a/account_banking_pain_base/migrations/8.0.0.2/post-migration.py b/account_banking_pain_base/migrations/8.0.0.2/post-migration.py index bb6322681..1a2815795 100644 --- a/account_banking_pain_base/migrations/8.0.0.2/post-migration.py +++ b/account_banking_pain_base/migrations/8.0.0.2/post-migration.py @@ -1,23 +1,6 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2015 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 . -# -############################################################################## +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.addons.account_banking_pain_base.post_install\ import set_default_initiating_party diff --git a/account_banking_pain_base/models/__init__.py b/account_banking_pain_base/models/__init__.py index 829202c43..ffc2334f3 100644 --- a/account_banking_pain_base/models/__init__.py +++ b/account_banking_pain_base/models/__init__.py @@ -1,24 +1,6 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for Odoo -# 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import payment_line from . import bank_payment_line diff --git a/account_banking_pain_base/models/bank_payment_line.py b/account_banking_pain_base/models/bank_payment_line.py index c00d9d9d0..e67a46be6 100644 --- a/account_banking_pain_base/models/bank_payment_line.py +++ b/account_banking_pain_base/models/bank_payment_line.py @@ -1,24 +1,6 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for Odoo -# Copyright (C) 2013-2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013-2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api diff --git a/account_banking_pain_base/models/banking_export_pain.py b/account_banking_pain_base/models/banking_export_pain.py index 0ff137773..6d2ea34ab 100644 --- a/account_banking_pain_base/models/banking_export_pain.py +++ b/account_banking_pain_base/models/banking_export_pain.py @@ -1,24 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for Odoo -# Copyright (C) 2013-2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013-2015 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api, _ from openerp.exceptions import Warning diff --git a/account_banking_pain_base/models/payment_line.py b/account_banking_pain_base/models/payment_line.py index 8f0160be2..70f214721 100644 --- a/account_banking_pain_base/models/payment_line.py +++ b/account_banking_pain_base/models/payment_line.py @@ -1,24 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for Odoo -# Copyright (C) 2013-2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013-2015 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api diff --git a/account_banking_pain_base/models/payment_mode.py b/account_banking_pain_base/models/payment_mode.py index 9ca025e27..1ccc72fe5 100644 --- a/account_banking_pain_base/models/payment_mode.py +++ b/account_banking_pain_base/models/payment_mode.py @@ -1,24 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for Odoo -# Copyright (C) 2013-2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013-2015 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields diff --git a/account_banking_pain_base/models/res_company.py b/account_banking_pain_base/models/res_company.py index 0a62caab9..aed1c1ca1 100644 --- a/account_banking_pain_base/models/res_company.py +++ b/account_banking_pain_base/models/res_company.py @@ -1,26 +1,8 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for Odoo -# Copyright (C) 2013-2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013-2015 Akretion - Alexis de Lattre +# © 2013 Noviat (http://www.noviat.com) - Luc de Meyer +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api import logging diff --git a/account_banking_pain_base/models/res_partner_bank.py b/account_banking_pain_base/models/res_partner_bank.py index 3c7a5ff0d..76722a561 100644 --- a/account_banking_pain_base/models/res_partner_bank.py +++ b/account_banking_pain_base/models/res_partner_bank.py @@ -1,22 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Copyright (c) ACSONE SA/NV (). -# -# 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013 ACSONE SA/NV () +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields diff --git a/account_banking_pain_base/post_install.py b/account_banking_pain_base/post_install.py index d48fd2f63..90e46fec2 100644 --- a/account_banking_pain_base/post_install.py +++ b/account_banking_pain_base/post_install.py @@ -1,24 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# PAIN Base module for Odoo -# Copyright (C) 2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from openerp import SUPERUSER_ID diff --git a/account_banking_payment_export/__openerp__.py b/account_banking_payment_export/__openerp__.py index c9beef545..f740188d2 100644 --- a/account_banking_payment_export/__openerp__.py +++ b/account_banking_payment_export/__openerp__.py @@ -1,26 +1,9 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# (C) 2013 - 2014 ACSONE SA (). -# -# All other contributions are (C) by their respective contributors -# -# 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2013-2014 ACSONE SA (). +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Account Banking - Payments Export Infrastructure', diff --git a/account_banking_payment_export/models/account_invoice.py b/account_banking_payment_export/models/account_invoice.py index 89da3b71b..ce60117a8 100644 --- a/account_banking_payment_export/models/account_invoice.py +++ b/account_banking_payment_export/models/account_invoice.py @@ -1,26 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2014 ACSONE SA (). -# -# 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 . -# -############################################################################## +# © 2013-2014 ACSONE SA (). +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, models, _ diff --git a/account_banking_payment_export/models/account_move_line.py b/account_banking_payment_export/models/account_move_line.py index e7c2bdc3d..6e57cef19 100644 --- a/account_banking_payment_export/models/account_move_line.py +++ b/account_banking_payment_export/models/account_move_line.py @@ -1,23 +1,8 @@ # -*- 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 . -# -############################################################################## +# © 2004-2014 OpenERP S.A. (http://www.openerp.com/) +# © 2014 Akretion (http://www.akretion.com/) +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api diff --git a/account_banking_payment_export/models/account_payment.py b/account_banking_payment_export/models/account_payment.py index 3a6b2cd91..e3bf51270 100644 --- a/account_banking_payment_export/models/account_payment.py +++ b/account_banking_payment_export/models/account_payment.py @@ -1,27 +1,7 @@ # -*- 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, exceptions, workflow, _ try: diff --git a/account_banking_payment_export/models/bank_payment_line.py b/account_banking_payment_export/models/bank_payment_line.py index d26e317d5..248dfd896 100644 --- a/account_banking_payment_export/models/bank_payment_line.py +++ b/account_banking_payment_export/models/bank_payment_line.py @@ -1,23 +1,6 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2015 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 . -# -############################################################################## +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api import openerp.addons.decimal_precision as dp diff --git a/account_banking_payment_export/models/payment_line.py b/account_banking_payment_export/models/payment_line.py index 9ef29e39f..98b4fc600 100644 --- a/account_banking_payment_export/models/payment_line.py +++ b/account_banking_payment_export/models/payment_line.py @@ -1,23 +1,6 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2015 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 . -# -############################################################################## +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api diff --git a/account_banking_payment_export/models/payment_mode.py b/account_banking_payment_export/models/payment_mode.py index 034973cdd..7444ef489 100644 --- a/account_banking_payment_export/models/payment_mode.py +++ b/account_banking_payment_export/models/payment_mode.py @@ -1,27 +1,8 @@ # -*- 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, SUPERUSER_ID diff --git a/account_banking_payment_export/models/payment_mode_type.py b/account_banking_payment_export/models/payment_mode_type.py index 341fe1063..6dfcb4926 100644 --- a/account_banking_payment_export/models/payment_mode_type.py +++ b/account_banking_payment_export/models/payment_mode_type.py @@ -1,27 +1,8 @@ # -*- 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields diff --git a/account_banking_payment_export/models/res_partner_bank.py b/account_banking_payment_export/models/res_partner_bank.py index efa2aba70..ce805f82a 100644 --- a/account_banking_payment_export/models/res_partner_bank.py +++ b/account_banking_payment_export/models/res_partner_bank.py @@ -1,23 +1,6 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2015 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 . -# -############################################################################## +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api, _ from openerp.exceptions import ValidationError diff --git a/account_banking_payment_transfer/__openerp__.py b/account_banking_payment_transfer/__openerp__.py index e5212f535..ba7255fd6 100644 --- a/account_banking_payment_transfer/__openerp__.py +++ b/account_banking_payment_transfer/__openerp__.py @@ -1,28 +1,8 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# (C) 2014 ACSONE SA/NV (). -# -# 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2013-2014 ACSONE SA (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Account Banking - Payments Transfer Account', diff --git a/account_banking_payment_transfer/model/account_move_reconcile.py b/account_banking_payment_transfer/model/account_move_reconcile.py index 701dd14a1..e005ecdea 100644 --- a/account_banking_payment_transfer/model/account_move_reconcile.py +++ b/account_banking_payment_transfer/model/account_move_reconcile.py @@ -1,27 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2014 ACSONE SA (). -# Copyright (C) 2014 Akretion (www.akretion.com) -# -# 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 . -# -############################################################################## +# © 2014 ACSONE SA (). +# © 2014 Akretion (www.akretion.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, workflow, api diff --git a/account_banking_payment_transfer/model/account_payment.py b/account_banking_payment_transfer/model/account_payment.py index 42a1c1d14..c0501f528 100644 --- a/account_banking_payment_transfer/model/account_payment.py +++ b/account_banking_payment_transfer/model/account_payment.py @@ -1,29 +1,9 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# (C) 2014 ACSONE SA (). -# (C) 2014-2015 Akretion (www.akretion.com) -# -# 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2013-2014 ACSONE SA (). +# © 2014-2015 Akretion (www.akretion.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, _ from openerp.exceptions import Warning as UserError diff --git a/account_banking_payment_transfer/model/bank_payment_line.py b/account_banking_payment_transfer/model/bank_payment_line.py index 9b523c0cb..f0494dbe2 100644 --- a/account_banking_payment_transfer/model/bank_payment_line.py +++ b/account_banking_payment_transfer/model/bank_payment_line.py @@ -1,24 +1,8 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# (C) 2015 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2015 Akretion (www.akretion.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, _ from openerp.exceptions import Warning as UserError diff --git a/account_banking_payment_transfer/model/payment_line.py b/account_banking_payment_transfer/model/payment_line.py index ee0be94b3..20db3dd60 100644 --- a/account_banking_payment_transfer/model/payment_line.py +++ b/account_banking_payment_transfer/model/payment_line.py @@ -1,27 +1,7 @@ # -*- 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api diff --git a/account_banking_payment_transfer/model/payment_mode.py b/account_banking_payment_transfer/model/payment_mode.py index 5fad56ced..a6aaebe01 100644 --- a/account_banking_payment_transfer/model/payment_mode.py +++ b/account_banking_payment_transfer/model/payment_mode.py @@ -1,28 +1,8 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2009 EduSense BV (). -# (C) 2011 - 2013 Therp BV (). -# (C) 2014 Akretion (www.akretion.com) -# -# 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 . -# -############################################################################## +# © 2009 EduSense BV () +# © 2011-2013 Therp BV () +# © 2014 Akretion (www.akretion.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields diff --git a/account_banking_payment_transfer/post_install.py b/account_banking_payment_transfer/post_install.py index 9d23444f9..e8b85ea5b 100644 --- a/account_banking_payment_transfer/post_install.py +++ b/account_banking_payment_transfer/post_install.py @@ -1,24 +1,6 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account Banking Payment Transfer module for Odoo -# Copyright (C) 2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). def set_date_sent(cr, pool): diff --git a/account_banking_sepa_credit_transfer/__init__.py b/account_banking_sepa_credit_transfer/__init__.py index 73b1281b2..cc4be0ba8 100644 --- a/account_banking_sepa_credit_transfer/__init__.py +++ b/account_banking_sepa_credit_transfer/__init__.py @@ -1,23 +1,4 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2010-2013 Akretion (www.akretion.com) from . import wizard diff --git a/account_banking_sepa_credit_transfer/__openerp__.py b/account_banking_sepa_credit_transfer/__openerp__.py index 5de6cf160..f1c948f1b 100644 --- a/account_banking_sepa_credit_transfer/__openerp__.py +++ b/account_banking_sepa_credit_transfer/__openerp__.py @@ -1,24 +1,8 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Credit Transfer module for Odoo -# Copyright (C) 2010-2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2010-2015 Akretion (www.akretion.com) +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + { 'name': 'Account Banking SEPA Credit Transfer', 'summary': 'Create SEPA XML files for Credit Transfers', diff --git a/account_banking_sepa_credit_transfer/wizard/__init__.py b/account_banking_sepa_credit_transfer/wizard/__init__.py index 399f6ef5c..fb941b55c 100644 --- a/account_banking_sepa_credit_transfer/wizard/__init__.py +++ b/account_banking_sepa_credit_transfer/wizard/__init__.py @@ -1,23 +1,5 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Credit Transfer module for Odoo -# 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2010-2013 Akretion (www.akretion.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import export_sepa diff --git a/account_banking_sepa_credit_transfer/wizard/export_sepa.py b/account_banking_sepa_credit_transfer/wizard/export_sepa.py index bd868009d..e0e475fb9 100644 --- a/account_banking_sepa_credit_transfer/wizard/export_sepa.py +++ b/account_banking_sepa_credit_transfer/wizard/export_sepa.py @@ -1,25 +1,7 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Credit Transfer module for Odoo -# Copyright (C) 2010-2015 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 . -# -############################################################################## - +# -*- coding: utf-8 -*- +# © 2010-2015 Akretion (www.akretion.com) +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, _ from openerp.exceptions import Warning diff --git a/account_banking_sepa_direct_debit/__init__.py b/account_banking_sepa_direct_debit/__init__.py index 096fe8ad3..b4a69d367 100644 --- a/account_banking_sepa_direct_debit/__init__.py +++ b/account_banking_sepa_direct_debit/__init__.py @@ -1,24 +1,6 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013 Akretion (www.akretion.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models from . import wizard diff --git a/account_banking_sepa_direct_debit/__openerp__.py b/account_banking_sepa_direct_debit/__openerp__.py index 92eea9370..d9ccc2478 100644 --- a/account_banking_sepa_direct_debit/__openerp__.py +++ b/account_banking_sepa_direct_debit/__openerp__.py @@ -1,24 +1,8 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# SEPA Direct Debit module for Odoo -# Copyright (C) 2013-2015 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013-2015 Akretion (www.akretion.com) +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + { 'name': 'Account Banking SEPA Direct Debit', 'summary': 'Create SEPA files for Direct Debit', diff --git a/account_banking_sepa_direct_debit/models/account_banking_mandate.py b/account_banking_sepa_direct_debit/models/account_banking_mandate.py index 56b4c870d..a2e9668f8 100644 --- a/account_banking_sepa_direct_debit/models/account_banking_mandate.py +++ b/account_banking_sepa_direct_debit/models/account_banking_mandate.py @@ -1,24 +1,7 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, exceptions, _ from datetime import datetime diff --git a/account_banking_sepa_direct_debit/models/bank_payment_line.py b/account_banking_sepa_direct_debit/models/bank_payment_line.py index 67a0da3f5..e28207ebc 100644 --- a/account_banking_sepa_direct_debit/models/bank_payment_line.py +++ b/account_banking_sepa_direct_debit/models/bank_payment_line.py @@ -1,24 +1,6 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# SEPA Direct Debit module for Odoo -# Copyright (C) 2015 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 . -# -############################################################################## +# © 2015 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api diff --git a/account_banking_sepa_direct_debit/models/res_company.py b/account_banking_sepa_direct_debit/models/res_company.py index 46f98bbc2..9ce040189 100644 --- a/account_banking_sepa_direct_debit/models/res_company.py +++ b/account_banking_sepa_direct_debit/models/res_company.py @@ -1,24 +1,7 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2013 Akretion (www.akretion.com) +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, exceptions, _ import logging diff --git a/account_direct_debit/__openerp__.py b/account_direct_debit/__openerp__.py index 7fac10be7..ee23ee241 100644 --- a/account_direct_debit/__openerp__.py +++ b/account_direct_debit/__openerp__.py @@ -1,23 +1,9 @@ -############################################################################## -# -# Copyright (C) 2011 - 2013 Therp BV (). -# Copyright (C) 2011 Smile (). -# 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2011 Smile () +# © 2011-2013 Therp BV () +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + { 'name': 'Direct Debit', 'version': '8.0.2.0.0', diff --git a/account_direct_debit/models/account_move_line.py b/account_direct_debit/models/account_move_line.py index 07608803f..129b15487 100644 --- a/account_direct_debit/models/account_move_line.py +++ b/account_direct_debit/models/account_move_line.py @@ -1,24 +1,8 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module (C) 2011 - 2013 Therp BV (). -# (C) 2011 Smile Benelux (). -# -# 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 . -# -############################################################################## +# © 2011 Smile () +# © 2011-2013 Therp BV () +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models diff --git a/account_direct_debit/models/payment_line.py b/account_direct_debit/models/payment_line.py index 120a41145..366f522bc 100644 --- a/account_direct_debit/models/payment_line.py +++ b/account_direct_debit/models/payment_line.py @@ -1,4 +1,8 @@ # -*- coding: utf-8 -*- +# © 2011 Smile () +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from openerp import models, fields diff --git a/account_payment_partner/__init__.py b/account_payment_partner/__init__.py index fe47437f2..794e1a243 100644 --- a/account_payment_partner/__init__.py +++ b/account_payment_partner/__init__.py @@ -1,24 +1,6 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Akretion - Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models from . import wizard diff --git a/account_payment_partner/__openerp__.py b/account_payment_partner/__openerp__.py index 2bbc92f96..ddbb3aab8 100644 --- a/account_payment_partner/__openerp__.py +++ b/account_payment_partner/__openerp__.py @@ -1,25 +1,7 @@ -# -*- 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 . -# -############################################################################## - +# -*- coding: utf-8 -*- +# © 2014 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Account Payment Partner', diff --git a/account_payment_partner/models/account_invoice.py b/account_payment_partner/models/account_invoice.py index e14c0d956..4c5b971c6 100644 --- a/account_payment_partner/models/account_invoice.py +++ b/account_payment_partner/models/account_invoice.py @@ -1,24 +1,7 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api diff --git a/account_payment_partner/models/payment_mode.py b/account_payment_partner/models/payment_mode.py index 62b8767e6..cc03dd323 100644 --- a/account_payment_partner/models/payment_mode.py +++ b/account_payment_partner/models/payment_mode.py @@ -1,23 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2015 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 . -# -############################################################################## +# © 2014 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields diff --git a/account_payment_partner/models/res_partner.py b/account_payment_partner/models/res_partner.py index 5726da446..7b6c850aa 100644 --- a/account_payment_partner/models/res_partner.py +++ b/account_payment_partner/models/res_partner.py @@ -1,24 +1,7 @@ -# -*- 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 . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014 Akretion - Alexis de Lattre +# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api From 3fbd4f663c36a642df02da1e49679409bd08c810 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 15 Feb 2016 23:12:49 +0100 Subject: [PATCH 20/28] [IMP] account_payment_partner: Remove label field There's already a field in the payment mode called 'note' that is printed on the invoices, so there's no need of another field for that purpose. This field is added by account_banking_payment_export --- account_payment_partner/models/payment_mode.py | 3 --- account_payment_partner/views/payment_mode.xml | 3 --- 2 files changed, 6 deletions(-) diff --git a/account_payment_partner/models/payment_mode.py b/account_payment_partner/models/payment_mode.py index cc03dd323..6d2fa946b 100644 --- a/account_payment_partner/models/payment_mode.py +++ b/account_payment_partner/models/payment_mode.py @@ -9,9 +9,6 @@ from openerp import models, fields class PaymentMode(models.Model): _inherit = "payment.mode" - label = fields.Char( - string='Label', translate=True, - help="This field is designed to be used in the invoice report") default_payment_mode = fields.Selection([ ('same', 'Same'), ('same_or_null', 'Same or empty'), diff --git a/account_payment_partner/views/payment_mode.xml b/account_payment_partner/views/payment_mode.xml index b32d52b01..120ca6970 100644 --- a/account_payment_partner/views/payment_mode.xml +++ b/account_payment_partner/views/payment_mode.xml @@ -12,9 +12,6 @@ - - - From 39ee61b267746679fd07cf2679e22fe45ee4a973 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 15 Feb 2016 23:17:37 +0100 Subject: [PATCH 21/28] [IMP] *: Bump version numbers --- account_banking_mandate/__openerp__.py | 2 +- account_banking_pain_base/__openerp__.py | 2 +- account_banking_payment_export/__openerp__.py | 2 +- account_banking_payment_transfer/__openerp__.py | 2 +- account_banking_sepa_credit_transfer/__openerp__.py | 2 +- account_banking_sepa_direct_debit/__openerp__.py | 2 +- account_direct_debit/__openerp__.py | 2 +- account_payment_partner/__openerp__.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/account_banking_mandate/__openerp__.py b/account_banking_mandate/__openerp__.py index 53b0b5a39..36d7de2dc 100644 --- a/account_banking_mandate/__openerp__.py +++ b/account_banking_mandate/__openerp__.py @@ -7,7 +7,7 @@ { 'name': 'Account Banking Mandate', 'summary': 'Banking mandates', - 'version': '8.0.0.1.0', + 'version': '8.0.0.2.0', 'license': 'AGPL-3', 'author': "Compassion CH, " "Serv. Tecnol. Avanzados - Pedro M. Baeza, " diff --git a/account_banking_pain_base/__openerp__.py b/account_banking_pain_base/__openerp__.py index fe8590fd7..c18b82d6b 100644 --- a/account_banking_pain_base/__openerp__.py +++ b/account_banking_pain_base/__openerp__.py @@ -6,7 +6,7 @@ { 'name': 'Account Banking PAIN Base Module', 'summary': 'Base module for PAIN file generation', - 'version': '8.0.0.2.0', + 'version': '8.0.0.3.0', 'license': 'AGPL-3', 'author': "Akretion, " "Noviat, " diff --git a/account_banking_payment_export/__openerp__.py b/account_banking_payment_export/__openerp__.py index f740188d2..0e1c7c1ac 100644 --- a/account_banking_payment_export/__openerp__.py +++ b/account_banking_payment_export/__openerp__.py @@ -7,7 +7,7 @@ { 'name': 'Account Banking - Payments Export Infrastructure', - 'version': '8.0.0.1.166', + 'version': '8.0.0.2.0', 'license': 'AGPL-3', 'author': "ACSONE SA/NV, " "Therp BV, " diff --git a/account_banking_payment_transfer/__openerp__.py b/account_banking_payment_transfer/__openerp__.py index ba7255fd6..d40827f7f 100644 --- a/account_banking_payment_transfer/__openerp__.py +++ b/account_banking_payment_transfer/__openerp__.py @@ -6,7 +6,7 @@ { 'name': 'Account Banking - Payments Transfer Account', - 'version': '8.0.0.2.0', + 'version': '8.0.0.3.0', 'license': 'AGPL-3', 'author': "Banking addons community,Odoo Community Association (OCA)", 'website': 'https://github.com/OCA/banking', diff --git a/account_banking_sepa_credit_transfer/__openerp__.py b/account_banking_sepa_credit_transfer/__openerp__.py index f1c948f1b..6a0e52a71 100644 --- a/account_banking_sepa_credit_transfer/__openerp__.py +++ b/account_banking_sepa_credit_transfer/__openerp__.py @@ -6,7 +6,7 @@ { 'name': 'Account Banking SEPA Credit Transfer', 'summary': 'Create SEPA XML files for Credit Transfers', - 'version': '8.0.0.3.0', + 'version': '8.0.0.4.0', 'license': 'AGPL-3', 'author': "Akretion, " "Serv. Tecnol. Avanzados - Pedro M. Baeza, " diff --git a/account_banking_sepa_direct_debit/__openerp__.py b/account_banking_sepa_direct_debit/__openerp__.py index d9ccc2478..268fffe25 100644 --- a/account_banking_sepa_direct_debit/__openerp__.py +++ b/account_banking_sepa_direct_debit/__openerp__.py @@ -6,7 +6,7 @@ { 'name': 'Account Banking SEPA Direct Debit', 'summary': 'Create SEPA files for Direct Debit', - 'version': '8.0.0.2.0', + 'version': '8.0.0.3.0', 'license': 'AGPL-3', 'author': "Akretion, " "Serv. Tecnol. Avanzados - Pedro M. Baeza, " diff --git a/account_direct_debit/__openerp__.py b/account_direct_debit/__openerp__.py index ee23ee241..f9bac954a 100644 --- a/account_direct_debit/__openerp__.py +++ b/account_direct_debit/__openerp__.py @@ -6,7 +6,7 @@ { 'name': 'Direct Debit', - 'version': '8.0.2.0.0', + 'version': '8.0.2.1.0', 'license': 'AGPL-3', 'author': 'Therp BV, ' 'Smile, ' diff --git a/account_payment_partner/__openerp__.py b/account_payment_partner/__openerp__.py index ddbb3aab8..0460a7c26 100644 --- a/account_payment_partner/__openerp__.py +++ b/account_payment_partner/__openerp__.py @@ -5,7 +5,7 @@ { 'name': 'Account Payment Partner', - 'version': '8.0.0.1.0', + 'version': '8.0.0.2.0', 'category': 'Banking addons', 'license': 'AGPL-3', 'summary': 'Adds payment mode on partners and invoices', From 072f7cfc6578cc2ab99a7d4eb1b78b2c25ff0168 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 16 Feb 2016 08:16:13 +0100 Subject: [PATCH 22/28] [IMP] account_banking_payment_transfer: Restore entry_posted check --- account_banking_payment_transfer/model/account_payment.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/account_banking_payment_transfer/model/account_payment.py b/account_banking_payment_transfer/model/account_payment.py index c0501f528..8c335da76 100644 --- a/account_banking_payment_transfer/model/account_payment.py +++ b/account_banking_payment_transfer/model/account_payment.py @@ -245,9 +245,9 @@ class PaymentOrder(models.Model): total_amount, move, blines, labels) aml_obj.create(trf_ml_vals) self._reconcile_payment_lines(blines) - - # post account move - move.post() + # consider entry_posted on account_journal + if move.journal_id.entry_posted: + move.post() # State field is written by act_sent_wait self.write({'date_sent': fields.Date.context_today(self)}) From c533cbd864a8e19beb15f91d43ae8e5e7ac68619 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 16 Feb 2016 09:02:09 +0100 Subject: [PATCH 23/28] [IMP] *: es translations --- account_banking_mandate/i18n/es.po | 34 +-- account_banking_pain_base/i18n/es.po | 66 ++++-- account_banking_payment_export/i18n/es.po | 204 ++++++++++++++++-- .../i18n/es.po | 94 +------- account_banking_sepa_direct_debit/i18n/es.po | 144 ++++--------- .../wizard/export_sdd.py | 2 +- account_direct_debit/i18n/es.po | 77 +------ account_payment_partner/i18n/es.po | 29 ++- 8 files changed, 338 insertions(+), 312 deletions(-) diff --git a/account_banking_mandate/i18n/es.po b/account_banking_mandate/i18n/es.po index dfc71c663..6db65dec8 100644 --- a/account_banking_mandate/i18n/es.po +++ b/account_banking_mandate/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-13 19:13+0000\n" -"PO-Revision-Date: 2016-02-13 19:13+0000\n" +"POT-Creation-Date: 2016-02-16 07:21+0000\n" +"PO-Revision-Date: 2016-02-16 07:21+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -65,7 +65,12 @@ msgstr "Cuenta bancaria" #. module: account_banking_mandate #: model:ir.model,name:account_banking_mandate.model_res_partner_bank msgid "Bank Accounts" -msgstr "Cuentas bancarias" +msgstr "Cuentas de banco" + +#. module: account_banking_mandate +#: model:ir.model,name:account_banking_mandate.model_bank_payment_line +msgid "Bank Payment Lines" +msgstr "Líneas de pago bancario" #. module: account_banking_mandate #: view:website:account_banking_mandate.account_banking_mandate_document @@ -119,13 +124,13 @@ msgid "Cancelled" msgstr "Cancelado" #. module: account_banking_mandate -#: code:addons/account_banking_mandate/models/account_banking_mandate.py:110 +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:93 #, 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 +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:89 #, 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." @@ -145,11 +150,6 @@ msgstr "Creado por" 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 @@ -299,7 +299,9 @@ msgid "Location and sign: _______________________, at ______ from ____________ f msgstr "Lugar y fecha de la firma: _______________________, a ______ de ____________ de" #. module: account_banking_mandate +#: view:bank.payment.line:account_banking_mandate.bank_payment_line_tree #: model:ir.actions.report.xml,name:account_banking_mandate.report_account_banking_mandate +#: view:payment.order:account_banking_mandate.view_mandate_payment_order_form msgid "Mandate" msgstr "Mandato SEPA" @@ -319,19 +321,19 @@ msgid "Mandate Validated" msgstr "Mandato validado" #. module: account_banking_mandate -#: code:addons/account_banking_mandate/models/account_banking_mandate.py:152 +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:135 #, 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 +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:123 #, 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 +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:114 #, python-format msgid "Mandate should be in draft state" msgstr "El mandato debe estar en estado borrador" @@ -459,19 +461,19 @@ msgid "Summary" msgstr "Resumen" #. module: account_banking_mandate -#: code:addons/account_banking_mandate/models/account_banking_mandate.py:92 +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:75 #, 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 +#: code:addons/account_banking_mandate/models/account_banking_mandate.py:80 #, 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 +#: code:addons/account_banking_mandate/models/payment_line.py:51 #, 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')." diff --git a/account_banking_pain_base/i18n/es.po b/account_banking_pain_base/i18n/es.po index 61fa1e0ba..c97064abc 100644 --- a/account_banking_pain_base/i18n/es.po +++ b/account_banking_pain_base/i18n/es.po @@ -6,8 +6,8 @@ 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" +"POT-Creation-Date: 2016-02-16 07:24+0000\n" +"PO-Revision-Date: 2016-02-16 07:24+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,13 +16,23 @@ msgstr "" "Plural-Forms: \n" #. module: account_banking_pain_base -#: code:addons/account_banking_pain_base/models/banking_export_pain.py:74 +#: model:ir.model,name:account_banking_pain_base.model_res_partner_bank +msgid "Bank Accounts" +msgstr "Cuentas de banco" + +#. module: account_banking_pain_base +#: model:ir.model,name:account_banking_pain_base.model_bank_payment_line +msgid "Bank Payment Lines" +msgstr "Líneas de pago bancario" + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:61 #, 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 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:66 #, python-format msgid "Cannot compute the '%s'." msgstr "No se puede procesar el campo '%s'." @@ -38,23 +48,11 @@ 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 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:280 #, 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" @@ -70,13 +68,24 @@ msgstr "ID" 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_identifier:0 +msgid "Initiating Party Identifier" +msgstr "Identificador del iniciador de la transacción" + #. 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 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:254 +#, python-format +msgid "Missing 'Initiating Party Issuer' and/or 'Initiating Party Identifier' for the company '%s'. Both fields must have a value." +msgstr "Falta el 'Emisor de la transacción' y/o 'Identificador del iniciador de la transacción' para la compañía '%s'. Ambos campos deben tener un valor." + +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:356 #, 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'." @@ -106,37 +115,43 @@ msgstr "Modo de pago" msgid "Priority" msgstr "Prioridad" +#. module: account_banking_pain_base +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:130 +#, python-format +msgid "SEPA File" +msgstr "Archivo SEPA" + #. 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 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:74 #, 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 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:281 #, 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 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:95 #, 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 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:69 #, 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 +#: code:addons/account_banking_pain_base/models/banking_export_pain.py:34 #, python-format msgid "This IBAN is not valid : %s" msgstr "Este IBAN no es válido: %s" @@ -146,6 +161,11 @@ msgstr "Este IBAN no es válido: %s" 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_identifier:0 +msgid "This will be used as the 'Initiating Party Identifier' in the PAIN files generated by Odoo." +msgstr "Esto se usará como el 'Identificador del iniciador de la transacción' en los archivos PAIN generados por Odoo." + #. 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." diff --git a/account_banking_payment_export/i18n/es.po b/account_banking_payment_export/i18n/es.po index f31e31e22..3e3a834bb 100644 --- a/account_banking_payment_export/i18n/es.po +++ b/account_banking_payment_export/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-02 10:49+0000\n" -"PO-Revision-Date: 2015-07-02 10:49+0000\n" +"POT-Creation-Date: 2016-02-16 07:40+0000\n" +"PO-Revision-Date: 2016-02-16 07:40+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,12 +15,54 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:17 +#: code:addons/account_banking_payment_export/models/res_partner_bank.py:31 +#, python-format +msgid "A valid BIC contains 8 or 11 caracters. The BIC '%s' contains %d caracters, so it is not valid." +msgstr "Un BIC válido contiene 8 u 11 caracteres. El BIC '%s' contiene %d caracteres, por lo que no es válido." + #. 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 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Amount" +msgstr "Importe" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_bank +msgid "Bank" +msgstr "Banco" + +#. module: account_banking_payment_export +#: model:ir.model,name:account_banking_payment_export.model_res_partner_bank +msgid "Bank Accounts" +msgstr "Cuentas de banco" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +#: field:payment.line,bank_line_id:0 +msgid "Bank Payment Line" +msgstr "Línea de pago bancario" + +#. module: account_banking_payment_export +#: field:bank.payment.line,name:0 +msgid "Bank Payment Line Ref" +msgstr "Ref. de la línea de pago bancario" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +#: model:ir.actions.act_window,name:account_banking_payment_export.bank_payment_line_action +#: model:ir.model,name:account_banking_payment_export.model_bank_payment_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +#: field:payment.order,bank_line_ids:0 +msgid "Bank Payment Lines" +msgstr "Líneas de pago bancario" + #. module: account_banking_payment_export #: view:payment.manual:account_banking_payment_export.view_payment_manual_form msgid "Cancel" @@ -32,12 +74,24 @@ msgid "Code" msgstr "Código" #. module: account_banking_payment_export +#: field:bank.payment.line,communication:0 +msgid "Communication" +msgstr "Comunicación" + +#. module: account_banking_payment_export +#: field:bank.payment.line,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: account_banking_payment_export +#: field:bank.payment.line,create_uid:0 #: 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:bank.payment.line,create_date:0 #: field:payment.manual,create_date:0 #: field:payment.mode.type,create_date:0 msgid "Created on" @@ -54,13 +108,28 @@ msgid "Direct debit" msgstr "Adeudo directo (cobro)" #. module: account_banking_payment_export -#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:121 +#: selection:payment.mode,default_date_type:0 +msgid "Due" +msgstr "Vencimiento" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +msgid "Due Date" +msgstr "Fecha de vencimiento" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Entry Information" +msgstr "Información del asiento" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:148 #, 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 +#: code:addons/account_banking_payment_export/models/account_payment.py:73 #, python-format msgid "Error" msgstr "Error" @@ -71,11 +140,22 @@ msgid "Export type" msgstr "Tipo de exportación" #. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "General Information" +msgstr "Información General" + +#. module: account_banking_payment_export +#: field:bank.payment.line,id:0 #: field:payment.manual,id:0 #: field:payment.mode.type,id:0 msgid "ID" msgstr "ID" +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Information" +msgstr "Información" + #. module: account_banking_payment_export #: model:ir.model,name:account_banking_payment_export.model_account_invoice msgid "Invoice" @@ -93,22 +173,47 @@ msgid "Journal Items" msgstr "Apuntes contables" #. module: account_banking_payment_export +#: field:payment.mode,default_journal_ids:0 +#: field:payment.order.create,journal_ids:0 +msgid "Journals Filter" +msgstr "Filtro de diarios" + +#. module: account_banking_payment_export +#: field:bank.payment.line,write_uid:0 #: 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:bank.payment.line,write_date:0 #: 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 +#: field:payment.mode,default_invoice:0 +#: field:payment.order.create,invoice:0 +msgid "Linked to an Invoice or Refund" +msgstr "Vinculado a una factura o factura rectificativa" + #. 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 +#: selection:payment.mode,default_date_type:0 +msgid "Move" +msgstr "Asiento" + +#. module: account_banking_payment_export +#: selection:payment.order.create,date_type:0 +#: field:payment.order.create,move_date:0 +msgid "Move Date" +msgstr "Fecha del asiento" + #. module: account_banking_payment_export #: field:payment.mode.type,name:0 msgid "Name" @@ -120,13 +225,29 @@ msgstr "Nombre" msgid "Note" msgstr "Descripción" +#. module: account_banking_payment_export +#: field:bank.payment.line,order_id:0 +msgid "Order" +msgstr "Orden" + #. 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 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Owner Account" +msgstr "Cuenta propietario" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Partner Bank Account" +msgstr "Cuenta bancaria" + #. module: account_banking_payment_export #: selection:payment.mode.type,payment_order_type:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form #: selection:payment.order,payment_order_type:0 msgid "Payment" msgstr "Pago" @@ -137,6 +258,18 @@ msgstr "Pago" 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_line +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Line" +msgstr "Línea de pago" + +#. module: account_banking_payment_export +#: field:bank.payment.line,payment_line_ids:0 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Payment Lines" +msgstr "Líneas de pago" + #. module: account_banking_payment_export #: model:ir.model,name:account_banking_payment_export.model_payment_mode msgid "Payment Mode" @@ -153,13 +286,13 @@ msgid "Payment Order" msgstr "Orden de pago" #. module: account_banking_payment_export -#: code:addons/account_banking_payment_export/models/account_payment.py:53 +#: code:addons/account_banking_payment_export/models/account_payment.py:58 #, 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:213 +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:242 #, python-format msgid "Payment Orders" msgstr "Órdenes de pago" @@ -191,9 +324,20 @@ 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.mode,default_populate_results:0 #: field:payment.order.create,populate_results:0 -msgid "Populate results directly" -msgstr "Incluir directamente los resultados" +msgid "Populate Results Directly" +msgstr "Incluir los resultados directamente" + +#. module: account_banking_payment_export +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_form +msgid "Related Payment Lines" +msgstr "Líneas de pago relacionadas" + +#. module: account_banking_payment_export +#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit +msgid "Select Move Lines to Pay - Default Values" +msgstr "Seleccione los apuntes a pagar - Valores por defecto" #. module: account_banking_payment_export #: help:payment.mode,type:0 @@ -226,7 +370,7 @@ msgid "Specify the Code for Payment Type" msgstr "Especifica el código para el tipo de pago" #. module: account_banking_payment_export -#: code:addons/account_banking_payment_export/models/account_invoice.py:34 +#: code:addons/account_banking_payment_export/models/account_invoice.py:15 #, python-format msgid "Structured Reference" msgstr "Referencia esctructurada" @@ -237,11 +381,22 @@ msgstr "Referencia esctructurada" msgid "Suitable bank types" msgstr "Tipos de cuentas bancarias adecuadas" +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:146 +#, python-format +msgid "The amount for Partner '%s' is negative or null (%.2f) !" +msgstr "El importe para el empresa '%s' es negativo o nulo (%.2f) !" + #. module: account_banking_payment_export #: help:payment.mode.type,payment_order_type:0 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 +#: view:bank.payment.line:account_banking_payment_export.bank_payment_line_tree +msgid "Total Amount" +msgstr "Importe total" + #. module: account_banking_payment_export #: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree msgid "Total Credit" @@ -253,25 +408,46 @@ msgid "Total Debit" msgstr "Total debe" #. module: account_banking_payment_export -#: code:addons/account_banking_payment_export/models/account_payment.py:69 +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Total in Company Currency" +msgstr "Total en moneda de la compañía" + +#. module: account_banking_payment_export +#: view:payment.order:account_banking_payment_export.view_payment_order_form +msgid "Transaction Information" +msgstr "Información de transacción" + +#. module: account_banking_payment_export +#: field:payment.mode,default_date_type:0 +#: field:payment.order.create,date_type:0 +msgid "Type of Date Filter" +msgstr "Filtro de tipo de fecha" + +#. module: account_banking_payment_export +#: code:addons/account_banking_payment_export/models/account_payment.py:74 #, 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 +#: view:payment.order:account_banking_payment_export.view_payment_order_form msgid "launch_wizard" msgstr "Asistente" #. module: account_banking_payment_export -#: view:payment.order:account_banking_payment_export.view_banking_payment_order_form_1 +#: view:payment.order:account_banking_payment_export.view_payment_order_form msgid "{\n" -" 'invisible': [('state', '!=', 'draft')]}" +" 'invisible': [('state', '!=', 'draft')]}" msgstr "{\n" -" 'invisible': [('state', '!=', 'draft')]}" +" 'invisible': [('state', '!=', 'draft')]}" #. module: account_banking_payment_export #: view:payment.order.create:account_banking_payment_export.view_create_payment_order_lines msgid "{'display_credit': context.get('display_credit', False),'display_debit': context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' : 'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" msgstr "{'display_credit': context.get('display_credit', False),'display_debit': context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' : 'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', 'due')]}" +msgstr "{'required': [('date_type', '=', 'due')], 'invisible': [('date_type', '!=', 'due')]}" + diff --git a/account_banking_sepa_credit_transfer/i18n/es.po b/account_banking_sepa_credit_transfer/i18n/es.po index 5d7b1057b..30fc26451 100644 --- a/account_banking_sepa_credit_transfer/i18n/es.po +++ b/account_banking_sepa_credit_transfer/i18n/es.po @@ -6,8 +6,8 @@ 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" +"POT-Creation-Date: 2016-02-16 07:50+0000\n" +"PO-Revision-Date: 2016-02-16 07:50+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,19 +16,22 @@ msgstr "" "Plural-Forms: \n" #. module: account_banking_sepa_credit_transfer -#: field:banking.export.sepa,batch_booking:0 +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:199 +#, python-format +msgid "Bank account is missing on the bank payment line of partner '%s' (reference '%s')." +msgstr "Falta la cuenta bancaria en la línea de pago de la empresa '%s' (referencia '%s')." + +#. module: account_banking_sepa_credit_transfer #: 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" @@ -39,7 +42,6 @@ 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" @@ -50,7 +52,6 @@ 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" @@ -60,18 +61,6 @@ msgstr "Creado por" 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" @@ -93,97 +82,55 @@ 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 +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:98 #, 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" +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', 'pain.001.001.05' and 'pain.001.003.03'." +msgstr "El código de tipo de pago '%s' no está soportado. Los únicos códigos de tipo de pago soportados para una transferencia de crédito SEPA son 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05' y 'pain.001.003.03'." #. module: account_banking_sepa_credit_transfer #: view:banking.export.sepa.wizard:account_banking_sepa_credit_transfer.banking_export_sepa_wizard_view @@ -191,35 +138,16 @@ 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" diff --git a/account_banking_sepa_direct_debit/i18n/es.po b/account_banking_sepa_direct_debit/i18n/es.po index 98334c842..1255410e6 100644 --- a/account_banking_sepa_direct_debit/i18n/es.po +++ b/account_banking_sepa_direct_debit/i18n/es.po @@ -6,8 +6,8 @@ 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" +"POT-Creation-Date: 2016-02-16 07:53+0000\n" +"PO-Revision-Date: 2016-02-16 07:53+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -18,17 +18,17 @@ msgstr "" #. 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" -" " +" 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" -" " +" Pulse para crear un nuevo mandato bancario.\n" +"

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

\n" +" " #. module: account_banking_sepa_direct_debit #: model:ir.model,name:account_banking_sepa_direct_debit.model_account_banking_mandate @@ -36,10 +36,15 @@ 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 +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:106 #, 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'." +msgstr "Puesto que ha cambiado la cuenta bancaria relacionada con este mandato, el 'Tipo de secuencia' se ha vuelto a 'Inicial'." + +#. module: account_banking_sepa_direct_debit +#: model:ir.model,name:account_banking_sepa_direct_debit.model_bank_payment_line +msgid "Bank Payment Lines" +msgstr "Lineas de pago bancario" #. module: account_banking_sepa_direct_debit #: selection:account.banking.mandate,scheme:0 @@ -47,19 +52,16 @@ 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" @@ -70,7 +72,6 @@ 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" @@ -86,7 +87,6 @@ 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" @@ -96,11 +96,6 @@ msgstr "Creado por" 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" @@ -120,20 +115,11 @@ msgid "Enterprise (B2B)" msgstr "Empresa (B2B)" #. module: account_banking_sepa_direct_debit -#: code:addons/account_banking_sepa_direct_debit/models/res_company.py:79 +#: code:addons/account_banking_sepa_direct_debit/models/res_company.py:62 #, 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" @@ -145,7 +131,6 @@ 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" @@ -166,39 +151,21 @@ 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" @@ -209,34 +176,31 @@ msgid "If this field is not active, the mandate section of the next direct debit 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 +#: code:addons/account_banking_sepa_direct_debit/models/res_company.py:63 #, 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 +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:105 #, python-format msgid "Mandate update" -msgstr "" +msgstr "Actualizacion de mandato" #. module: account_banking_sepa_direct_debit #: field:account.banking.mandate,sepa_migrated:0 @@ -244,13 +208,12 @@ 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 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:159 #, 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'" +msgid "Missing SEPA Direct Debit mandate on the bank payment line with partner '%s' (reference '%s')." +msgstr "Falta el mandato de adeudo directo SEPA en la linea de pago bancario con la empresa '%s' (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" @@ -277,17 +240,15 @@ 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 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:117 #, 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 "" +msgstr "El código de tipo de pago '%s' no está soportado. Los únicos códigos de tipo de pago soportados para los adedudos directos SEPA son 'pain.008.001.02', 'pain.008.001.03' y 'pain.008.001.04'." #. module: account_banking_sepa_direct_debit #: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_search @@ -300,11 +261,6 @@ msgstr "Recurrente" 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 @@ -316,18 +272,6 @@ msgstr "Mandatos SDD" 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" @@ -339,24 +283,16 @@ 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 +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_search #: 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" +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_search +#: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_tree +msgid "Sequence Type" +msgstr "Tipo de secuencia" #. module: account_banking_sepa_direct_debit #: field:account.banking.mandate,recurrent_sequence_type:0 @@ -382,37 +318,35 @@ 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 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:166 #, 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 +#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:174 #, 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 +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:71 #, 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 +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:80 #, 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'." @@ -423,12 +357,12 @@ 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_search #: view:account.banking.mandate:account_banking_sepa_direct_debit.sdd_mandate_tree msgid "Type" msgstr "Tipo" @@ -449,7 +383,7 @@ msgid "When the field 'Migrated to SEPA' is not active, this field will be used 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 +#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:90 #, 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_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py index 53bdd3d10..f2be2df00 100644 --- a/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -158,7 +158,7 @@ class BankingExportSddWizard(models.TransientModel): raise Warning( _("Missing SEPA Direct Debit mandate on the " "bank payment line with partner '%s' " - "(reference '%s'.") + "(reference '%s').") % (line.partner_id.name, line.name)) scheme = line.mandate_id.scheme if line.mandate_id.state != 'valid': diff --git a/account_direct_debit/i18n/es.po b/account_direct_debit/i18n/es.po index d5aacd581..10519aa70 100644 --- a/account_direct_debit/i18n/es.po +++ b/account_direct_debit/i18n/es.po @@ -6,8 +6,8 @@ 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" +"POT-Creation-Date: 2016-02-16 07:59+0000\n" +"PO-Revision-Date: 2016-02-16 07:59+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -20,33 +20,6 @@ msgstr "" 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 @@ -63,28 +36,6 @@ msgstr "Cobro" 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" @@ -93,35 +44,25 @@ msgstr "Facturas" #. module: account_direct_debit #: model:ir.model,name:account_direct_debit.model_account_move_line msgid "Journal Items" -msgstr "Asientos contables" +msgstr "Apuntes 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" +#: view:payment.order:account_direct_debit.view_payment_order_form +msgid "[('payment_order_type', '=', payment_order_type)]" +msgstr "[('payment_order_type', '=', payment_order_type)]" #. module: account_direct_debit -#: field:payment.line,storno:0 -msgid "Storno" -msgstr "Storno" +#: view:payment.order:account_direct_debit.view_payment_order_form +msgid "{'invisible': ['|', ('state', '!=', 'draft'), ('payment_order_type', '!=', 'payment')]}" +msgstr "{'invisible': ['|', ('state', '!=', 'draft'), ('payment_order_type', '!=', 'payment')]}" -#. 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/es.po b/account_payment_partner/i18n/es.po index 8d9b6b91a..c78c3e344 100644 --- a/account_payment_partner/i18n/es.po +++ b/account_payment_partner/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-02 10:55+0000\n" -"PO-Revision-Date: 2015-07-02 10:55+0000\n" +"POT-Creation-Date: 2016-02-16 08:01+0000\n" +"PO-Revision-Date: 2016-02-16 08:01+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -15,6 +15,12 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: account_payment_partner +#: selection:payment.mode,default_payment_mode:0 +#: selection:payment.order.create,payment_mode:0 +msgid "Any" +msgstr "Cualquiera" + #. module: account_payment_partner #: view:website:account.report_invoice_document msgid "Bank Account:" @@ -37,14 +43,33 @@ msgstr "Empresa" #. module: account_payment_partner #: field:account.invoice,payment_mode_id:0 +#: model:ir.model,name:account_payment_partner.model_payment_mode msgid "Payment Mode" msgstr "Modo de pago" +#. module: account_payment_partner +#: field:payment.mode,default_payment_mode:0 +#: field:payment.order.create,payment_mode:0 +msgid "Payment Mode on Invoice" +msgstr "Modo de pago en la factura" + #. module: account_payment_partner #: view:website:account.report_invoice_document msgid "Payment Mode:" msgstr "Modo de pago:" +#. module: account_payment_partner +#: selection:payment.mode,default_payment_mode:0 +#: selection:payment.order.create,payment_mode:0 +msgid "Same" +msgstr "Igual" + +#. module: account_payment_partner +#: selection:payment.mode,default_payment_mode:0 +#: selection:payment.order.create,payment_mode:0 +msgid "Same or empty" +msgstr "Igual o vacío" + #. module: account_payment_partner #: help:res.partner,customer_payment_mode:0 msgid "Select the default payment mode for this customer." From 34cd712828a7e54a6612e5c428b9a5a0479b05c8 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 18 Feb 2016 09:40:25 +0100 Subject: [PATCH 24/28] [IMP] account_banking_payment_export: Make journal_ids not required Now if it's empty, all journals are taken into account --- .../i18n/account_banking_payment_export.pot | 276 ------------------ account_banking_payment_export/i18n/es.po | 13 +- .../wizard/payment_order_create.py | 5 +- .../wizard/payment_order_create_view.xml | 5 +- 4 files changed, 16 insertions(+), 283 deletions(-) delete mode 100644 account_banking_payment_export/i18n/account_banking_payment_export.pot 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 96f1d47a9..000000000 --- a/account_banking_payment_export/i18n/account_banking_payment_export.pot +++ /dev/null @@ -1,276 +0,0 @@ -# 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: 2015-07-02 10:51+0000\n" -"PO-Revision-Date: 2015-07-02 10:51+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 -#: 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:121 -#, 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_invoice -msgid "Invoice" -msgstr "" - -#. module: account_banking_payment_export -#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree -msgid "Journal Entry" -msgstr "" - -#. module: account_banking_payment_export -#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree -#: 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 -#: view:payment.mode:account_banking_payment_export.view_payment_mode_form_inherit -#: field:payment.mode,note:0 -msgid "Note" -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:213 -#, 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 -#: field:payment.mode,purchase_ok:0 -msgid "Selectable on purchase operations" -msgstr "" - -#. module: account_banking_payment_export -#: field:payment.mode,sale_ok:0 -msgid "Selectable on sale operations" -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 -#: code:addons/account_banking_payment_export/models/account_invoice.py:34 -#, python-format -msgid "Structured Reference" -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) or suppliers (Payment)" -msgstr "" - -#. module: account_banking_payment_export -#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree -msgid "Total Credit" -msgstr "" - -#. module: account_banking_payment_export -#: view:account.move.line:account_banking_payment_export.payment_order_populate_view_move_line_tree -msgid "Total Debit" -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 "" - -#. module: account_banking_payment_export -#: view:payment.order:account_banking_payment_export.view_banking_payment_order_form_1 -msgid "{\n" -" 'invisible': [('state', '!=', 'draft')]}" -msgstr "" - -#. module: account_banking_payment_export -#: view:payment.order.create:account_banking_payment_export.view_create_payment_order_lines -msgid "{'display_credit': context.get('display_credit', False),'display_debit': context.get('display_debit', False),'journal_type': 'sale', 'tree_view_ref' : 'account_banking_payment_export.payment_order_populate_view_move_line_tree'}" -msgstr "" - diff --git a/account_banking_payment_export/i18n/es.po b/account_banking_payment_export/i18n/es.po index 3e3a834bb..40f1ad5af 100644 --- a/account_banking_payment_export/i18n/es.po +++ b/account_banking_payment_export/i18n/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-16 07:40+0000\n" -"PO-Revision-Date: 2016-02-16 07:40+0000\n" +"POT-Creation-Date: 2016-02-18 08:37+0000\n" +"PO-Revision-Date: 2016-02-18 08:37+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -123,7 +123,7 @@ msgid "Entry Information" msgstr "Información del asiento" #. module: account_banking_payment_export -#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:148 +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:149 #, python-format msgid "Entry Lines" msgstr "Líneas de pago" @@ -178,6 +178,11 @@ msgstr "Apuntes contables" msgid "Journals Filter" msgstr "Filtro de diarios" +#. module: account_banking_payment_export +#: view:payment.order.create:account_banking_payment_export.view_create_payment_order +msgid "Keep empty for using all journals" +msgstr "Dejar vacío para usar todos los diarios" + #. module: account_banking_payment_export #: field:bank.payment.line,write_uid:0 #: field:payment.manual,write_uid:0 @@ -292,7 +297,7 @@ 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:242 +#: code:addons/account_banking_payment_export/wizard/payment_order_create.py:243 #, python-format msgid "Payment Orders" msgstr "Órdenes de pago" diff --git a/account_banking_payment_export/wizard/payment_order_create.py b/account_banking_payment_export/wizard/payment_order_create.py index 9834f97c7..7613d377e 100644 --- a/account_banking_payment_export/wizard/payment_order_create.py +++ b/account_banking_payment_export/wizard/payment_order_create.py @@ -30,7 +30,7 @@ class PaymentOrderCreate(models.TransientModel): _inherit = 'payment.order.create' journal_ids = fields.Many2many( - 'account.journal', string='Journals Filter', required=True) + 'account.journal', string='Journals Filter') invoice = fields.Boolean( string='Linked to an Invoice or Refund') date_type = fields.Selection([ @@ -117,10 +117,11 @@ class PaymentOrderCreate(models.TransientModel): payment = self.env['payment.order'].browse( self.env.context['active_id']) # Search for move line to pay: + journals = self.journal_ids or self.env['account.journal'].search([]) domain = [('move_id.state', '=', 'posted'), ('reconcile_id', '=', False), ('company_id', '=', payment.mode.company_id.id), - ('journal_id', 'in', self.journal_ids.ids)] + ('journal_id', 'in', journals.ids)] if self.date_type == 'due': domain += [ '|', diff --git a/account_banking_payment_export/wizard/payment_order_create_view.xml b/account_banking_payment_export/wizard/payment_order_create_view.xml index 5e1d9a69d..3f07fd4d5 100644 --- a/account_banking_payment_export/wizard/payment_order_create_view.xml +++ b/account_banking_payment_export/wizard/payment_order_create_view.xml @@ -13,7 +13,10 @@ - + From 91770110b25a7fff3c424bc9fc828a114c2fdc65 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 18 Feb 2016 09:44:00 +0100 Subject: [PATCH 25/28] [IMP] account_banking_payment_export: default for "invoice" field in wizard --- account_banking_payment_export/models/payment_mode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_banking_payment_export/models/payment_mode.py b/account_banking_payment_export/models/payment_mode.py index 7444ef489..67e1b612b 100644 --- a/account_banking_payment_export/models/payment_mode.py +++ b/account_banking_payment_export/models/payment_mode.py @@ -84,7 +84,7 @@ class PaymentMode(models.Model): default_journal_ids = fields.Many2many( 'account.journal', string="Journals Filter") default_invoice = fields.Boolean( - string='Linked to an Invoice or Refund', default=True) + string='Linked to an Invoice or Refund', default=False) default_date_type = fields.Selection([ ('due', 'Due'), ('move', 'Move'), From 0ac4d50538b3a1c5e01c42d3807f336160b8754b Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 18 Feb 2016 10:24:19 +0100 Subject: [PATCH 26/28] [FIX] account_banking_payment_export: Fix move lines domain in create payment order --- .../wizard/payment_order_create.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/account_banking_payment_export/wizard/payment_order_create.py b/account_banking_payment_export/wizard/payment_order_create.py index 7613d377e..0ef18563e 100644 --- a/account_banking_payment_export/wizard/payment_order_create.py +++ b/account_banking_payment_export/wizard/payment_order_create.py @@ -75,11 +75,14 @@ class PaymentOrderCreate(models.TransientModel): # Do not propose partially reconciled credit lines, # as they are deducted from a customer invoice, and # will not be refunded with a payment. - domain += ['|', - ('account_id.type', '=', 'payable'), - '&', - ('account_id.type', '=', 'receivable'), - ('reconcile_partial_id', '=', False)] + domain += [ + ('credit', '>', 0), + '|', + ('account_id.type', '=', 'payable'), + '&', + ('account_id.type', '=', 'receivable'), + ('reconcile_partial_id', '=', False), + ] @api.multi def filter_lines(self, lines): From 1002f40dc0ca118308144d3a51b696815501519f Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 18 Feb 2016 10:37:08 +0100 Subject: [PATCH 27/28] [FIX] account_direct_debit: Fix move lines domain for direct debits --- .../wizard/payment_order_create.py | 44 +++++++------------ 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/account_direct_debit/wizard/payment_order_create.py b/account_direct_debit/wizard/payment_order_create.py index cd5ee9335..eedfec69c 100644 --- a/account_direct_debit/wizard/payment_order_create.py +++ b/account_direct_debit/wizard/payment_order_create.py @@ -1,26 +1,6 @@ # -*- 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 . -# -############################################################################## +# © 2013 Therp BV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api @@ -33,10 +13,18 @@ class PaymentOrderCreate(models.TransientModel): super(PaymentOrderCreate, self).extend_payment_order_domain( payment_order, domain) if payment_order.payment_order_type == 'debit': - # With the new system with bank.payment.line, we want - # to be able to have payment lines linked to customer - # invoices and payment lines linked to customer refunds - # in order to debit the customer of the total of his - # invoices minus his refunds - domain += [('account_id.type', '=', 'receivable')] + # For receivables, propose all unreconciled debit lines, + # including partially reconciled ones. + # If they are partially reconciled with a customer refund, + # the residual will be added to the payment order. + # + # For payables, normally suppliers will be the initiating party + # for possible supplier refunds (via a transfer for example), + # or they keep the amount for decreasing future supplier invoices, + # so there's not too much sense for adding them to a direct debit + # order + domain += [ + ('debit', '>', 0), + ('account_id.type', '=', 'receivable'), + ] return True From 5b3963b12179bcf205a9238d2f41c7fa9c824191 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 18 Feb 2016 16:51:19 +0100 Subject: [PATCH 28/28] [IMP] account_banking_payment_export: Improve computed method + store field --- .../models/bank_payment_line.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/account_banking_payment_export/models/bank_payment_line.py b/account_banking_payment_export/models/bank_payment_line.py index 248dfd896..4de0508c1 100644 --- a/account_banking_payment_export/models/bank_payment_line.py +++ b/account_banking_payment_export/models/bank_payment_line.py @@ -21,8 +21,8 @@ class BankPaymentLine(models.Model): # see bug report https://github.com/odoo/odoo/issues/8632 amount_currency = fields.Float( string='Amount', digits=dp.get_precision('Account'), - compute='_compute_amount') - # I would have prefered currency_id, but I need to keep the field names + compute='_compute_amount', store=True) + # I would have preferred currency_id, but I need to keep the field names # similar to the field names of payment.line currency = fields.Many2one( 'res.currency', string='Currency', required=True, @@ -52,13 +52,12 @@ class BankPaymentLine(models.Model): 'bank_id', 'date', 'state'] return same_fields - @api.one - @api.depends('payment_line_ids.amount_currency') + @api.multi + @api.depends('payment_line_ids', 'payment_line_ids.amount_currency') def _compute_amount(self): - amount = 0.0 - for payline in self.payment_line_ids: - amount += payline.amount_currency - self.amount_currency = amount + for line in self: + line.amount_currency = sum( + line.mapped('payment_line_ids.amount_currency')) @api.model @api.returns('self')