From 530de6715f064dcb07b73a1c3a053c5ea9532d3d Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 7 May 2016 23:55:46 +0200 Subject: [PATCH 01/14] Add module account_banking_mandate_sale Add option 'mandate_required' on payment orders Autoselect first valid mandate on customer invoice that have a payment mode 'mandate_required' = True Add option on select move lines to pay wizard to allow selection of litigation moves (unchecked by default), in order to integrate the feature of the module account_payment_blocking --- account_banking_mandate_sale/README.rst | 69 +++++++++++++++++++ account_banking_mandate_sale/__init__.py | 4 ++ account_banking_mandate_sale/__openerp__.py | 22 ++++++ .../models/__init__.py | 3 + .../models/sale_order.py | 36 ++++++++++ .../views/sale_order.xml | 27 ++++++++ .../wizard/__init__.py | 3 + .../wizard/sale_make_invoice_advance.py | 18 +++++ 8 files changed, 182 insertions(+) create mode 100644 account_banking_mandate_sale/README.rst create mode 100644 account_banking_mandate_sale/__init__.py create mode 100644 account_banking_mandate_sale/__openerp__.py create mode 100644 account_banking_mandate_sale/models/__init__.py create mode 100644 account_banking_mandate_sale/models/sale_order.py create mode 100644 account_banking_mandate_sale/views/sale_order.xml create mode 100644 account_banking_mandate_sale/wizard/__init__.py create mode 100644 account_banking_mandate_sale/wizard/sale_make_invoice_advance.py diff --git a/account_banking_mandate_sale/README.rst b/account_banking_mandate_sale/README.rst new file mode 100644 index 000000000..eb73e9cc8 --- /dev/null +++ b/account_banking_mandate_sale/README.rst @@ -0,0 +1,69 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Account Banking Mandate Sale +============================ + +This modules adds the field *Direct Debit Mandate* on sale orders. + +Configuration +============= + +There is nothing to configure. + +Usage +===== + +When you select a payment mode that requires mandate on a sale order, Odoo will +select by default the first valid mandate of this customer. + +The mandate will be copied from the sale order to the invoice. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/173/9.0 + +Known issues / Roadmap +====================== + + * No known issues. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed `feedback +`_. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Alexis de Lattre + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization +whose mission is to support the collaborative development of Odoo +features and promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/account_banking_mandate_sale/__init__.py b/account_banking_mandate_sale/__init__.py new file mode 100644 index 000000000..35e7c9600 --- /dev/null +++ b/account_banking_mandate_sale/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import models +from . import wizard diff --git a/account_banking_mandate_sale/__openerp__.py b/account_banking_mandate_sale/__openerp__.py new file mode 100644 index 000000000..810cd5aa0 --- /dev/null +++ b/account_banking_mandate_sale/__openerp__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# © 2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Account Banking Mandate Sale', + 'version': '9.0.1.0.0', + 'category': 'Banking addons', + 'license': 'AGPL-3', + 'summary': "Adds mandates on sale orders", + 'author': "Akretion, " + "Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/bank-payment', + 'depends': [ + 'account_payment_sale', + 'account_banking_mandate', + ], + 'data': [ + 'views/sale_order.xml', + ], + 'installable': True, +} diff --git a/account_banking_mandate_sale/models/__init__.py b/account_banking_mandate_sale/models/__init__.py new file mode 100644 index 000000000..6064afee1 --- /dev/null +++ b/account_banking_mandate_sale/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import sale_order diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py new file mode 100644 index 000000000..beba347e8 --- /dev/null +++ b/account_banking_mandate_sale/models/sale_order.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# © 2014-2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openerp import models, fields, api + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + # This field commercial_partner_id should be moved + # in an OCA base module named for example sale_commercial_partner + commercial_partner_id = fields.Many2one( + related='partner_id.commercial_partner_id', string='Commercial Entity', + store=True, readonly=True) + mandate_id = fields.Many2one( + 'account.banking.mandate', string='Direct Debit Mandate', + ondelete='restrict', readonly=True, + states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) + + @api.multi + def _prepare_invoice(self): + """Copy mandate from sale order to invoice""" + vals = super(SaleOrder, self)._prepare_invoice() + vals['mandate_id'] = self.mandate_id.id + return vals + + @api.onchange('payment_mode_id') + def payment_mode_change(self): + """Select by default the first valid mandate of the partner""" + if self.payment_mode_id.mandate_required and self.partner_id: + mandates = self.env['account.banking.mandate'].search([ + ('state', '=', 'valid'), + ('partner_id', '=', self.commercial_partner_id.id), + ]) + self.mandate_id = mandates[0] diff --git a/account_banking_mandate_sale/views/sale_order.xml b/account_banking_mandate_sale/views/sale_order.xml new file mode 100644 index 000000000..d14faf64f --- /dev/null +++ b/account_banking_mandate_sale/views/sale_order.xml @@ -0,0 +1,27 @@ + + + + + + + + + account_banking_mandate_sale.sale_order.form + sale.order + + + + + + + + + + + + diff --git a/account_banking_mandate_sale/wizard/__init__.py b/account_banking_mandate_sale/wizard/__init__.py new file mode 100644 index 000000000..1eb17ffa1 --- /dev/null +++ b/account_banking_mandate_sale/wizard/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import sale_make_invoice_advance diff --git a/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py b/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py new file mode 100644 index 000000000..0e9d34aa4 --- /dev/null +++ b/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# © 2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openerp import models, api + + +class SaleAdvancePaymentInv(models.TransientModel): + _inherit = 'sale.advance.payment.inv' + + @api.multi + def _create_invoice(self, order, so_line, amount): + """Copy mandate from sale order to invoice""" + inv = super(SaleAdvancePaymentInv, self)._create_invoice( + order, so_line, amount) + if order.mandate_id: + inv.mandate_id = order.mandate_id.id + return inv From ddfa4d3f9cacfc8f9546d494e15a6071f7255d5a Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 10 May 2016 23:16:31 +0200 Subject: [PATCH 02/14] Move fields mandate_required and export_ascii from payment mode to payment method Display chatter on payment orders Several small usability improvements --- account_banking_mandate_sale/models/sale_order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py index beba347e8..5f4fc9cf9 100644 --- a/account_banking_mandate_sale/models/sale_order.py +++ b/account_banking_mandate_sale/models/sale_order.py @@ -28,7 +28,9 @@ class SaleOrder(models.Model): @api.onchange('payment_mode_id') def payment_mode_change(self): """Select by default the first valid mandate of the partner""" - if self.payment_mode_id.mandate_required and self.partner_id: + if ( + self.payment_mode_id.payment_method_id.mandate_required and + self.partner_id): mandates = self.env['account.banking.mandate'].search([ ('state', '=', 'valid'), ('partner_id', '=', self.commercial_partner_id.id), From dfb7091fda42e92e86ca57947988d70ee4e872c3 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 23 May 2016 10:42:28 +0200 Subject: [PATCH 03/14] Take into accounts the remarks of Eric Caudal --- account_banking_mandate_sale/README.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/account_banking_mandate_sale/README.rst b/account_banking_mandate_sale/README.rst index eb73e9cc8..2e8967e47 100644 --- a/account_banking_mandate_sale/README.rst +++ b/account_banking_mandate_sale/README.rst @@ -1,6 +1,7 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg :alt: License: AGPL-3 +============================ Account Banking Mandate Sale ============================ @@ -34,11 +35,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed `feedback -`_. +help us smashing it by providing a detailed and welcomed feedback. Credits ======= From 3b7239c6622c1764bf952081fd5b4af2f125c52f Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 2 Jul 2016 03:36:38 -0400 Subject: [PATCH 04/14] OCA Transbot updated translations from Transifex --- account_banking_mandate_sale/i18n/en.po | 36 ++++++++++++++++++++ account_banking_mandate_sale/i18n/es.po | 39 ++++++++++++++++++++++ account_banking_mandate_sale/i18n/nl.po | 39 ++++++++++++++++++++++ account_banking_mandate_sale/i18n/pt_BR.po | 39 ++++++++++++++++++++++ account_banking_mandate_sale/i18n/sl.po | 39 ++++++++++++++++++++++ 5 files changed, 192 insertions(+) create mode 100644 account_banking_mandate_sale/i18n/en.po create mode 100644 account_banking_mandate_sale/i18n/es.po create mode 100644 account_banking_mandate_sale/i18n/nl.po create mode 100644 account_banking_mandate_sale/i18n/pt_BR.po create mode 100644 account_banking_mandate_sale/i18n/sl.po diff --git a/account_banking_mandate_sale/i18n/en.po b/account_banking_mandate_sale/i18n/en.po new file mode 100644 index 000000000..e45dbe7e1 --- /dev/null +++ b/account_banking_mandate_sale/i18n/en.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-01 19:28+0000\n" +"PO-Revision-Date: 2016-07-01 19:28+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "Commercial Entity" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "Direct Debit Mandate" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "Sales Advance Payment Invoice" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Sales Order" diff --git a/account_banking_mandate_sale/i18n/es.po b/account_banking_mandate_sale/i18n/es.po new file mode 100644 index 000000000..0bb1e6223 --- /dev/null +++ b/account_banking_mandate_sale/i18n/es.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-01 19:28+0000\n" +"PO-Revision-Date: 2016-07-01 19:28+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "Mandato de adeudo directo" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Pedido de venta" diff --git a/account_banking_mandate_sale/i18n/nl.po b/account_banking_mandate_sale/i18n/nl.po new file mode 100644 index 000000000..466a54f23 --- /dev/null +++ b/account_banking_mandate_sale/i18n/nl.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# Erwin van der Ploeg , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-22 23:52+0000\n" +"PO-Revision-Date: 2016-07-22 23:52+0000\n" +"Last-Translator: Erwin van der Ploeg , 2016\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "Commerciële Entiteit" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "Incasso mandaat" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "Verkoop Incassofactuur" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Verkooporder" diff --git a/account_banking_mandate_sale/i18n/pt_BR.po b/account_banking_mandate_sale/i18n/pt_BR.po new file mode 100644 index 000000000..df07ee7af --- /dev/null +++ b/account_banking_mandate_sale/i18n/pt_BR.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-01 19:28+0000\n" +"PO-Revision-Date: 2016-07-01 19:28+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Pedido de Venda" diff --git a/account_banking_mandate_sale/i18n/sl.po b/account_banking_mandate_sale/i18n/sl.po new file mode 100644 index 000000000..b73950447 --- /dev/null +++ b/account_banking_mandate_sale/i18n/sl.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-01 19:28+0000\n" +"PO-Revision-Date: 2016-07-01 19:28+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "Mandat za direktne obremenitve" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Plačilni nalog" From 711bed12098bd0db5955c93102dc1838287a57a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Mon, 15 Aug 2016 18:54:38 +0200 Subject: [PATCH 05/14] [FIX] remove en.po that was erroneously created by transbot --- account_banking_mandate_sale/i18n/en.po | 36 ------------------------- 1 file changed, 36 deletions(-) delete mode 100644 account_banking_mandate_sale/i18n/en.po diff --git a/account_banking_mandate_sale/i18n/en.po b/account_banking_mandate_sale/i18n/en.po deleted file mode 100644 index e45dbe7e1..000000000 --- a/account_banking_mandate_sale/i18n/en.po +++ /dev/null @@ -1,36 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_banking_mandate_sale -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-01 19:28+0000\n" -"PO-Revision-Date: 2016-07-01 19:28+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_banking_mandate_sale -#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id -msgid "Commercial Entity" -msgstr "Commercial Entity" - -#. module: account_banking_mandate_sale -#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id -msgid "Direct Debit Mandate" -msgstr "Direct Debit Mandate" - -#. module: account_banking_mandate_sale -#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv -msgid "Sales Advance Payment Invoice" -msgstr "Sales Advance Payment Invoice" - -#. module: account_banking_mandate_sale -#: model:ir.model,name:account_banking_mandate_sale.model_sale_order -msgid "Sales Order" -msgstr "Sales Order" From 842c8a1bd82b59f6ad193b0170eadc3665c0d014 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 14:47:39 +0200 Subject: [PATCH 06/14] [MIG] Make modules uninstallable --- account_banking_mandate_sale/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_banking_mandate_sale/__openerp__.py b/account_banking_mandate_sale/__openerp__.py index 810cd5aa0..6b83317f7 100644 --- a/account_banking_mandate_sale/__openerp__.py +++ b/account_banking_mandate_sale/__openerp__.py @@ -18,5 +18,5 @@ 'data': [ 'views/sale_order.xml', ], - 'installable': True, + 'installable': False, } From 0e93c6eac2388474d9fe7b49352b8a613f397bc8 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 14:47:44 +0200 Subject: [PATCH 07/14] [MIG] Rename manifest files --- account_banking_mandate_sale/{__openerp__.py => __manifest__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename account_banking_mandate_sale/{__openerp__.py => __manifest__.py} (100%) diff --git a/account_banking_mandate_sale/__openerp__.py b/account_banking_mandate_sale/__manifest__.py similarity index 100% rename from account_banking_mandate_sale/__openerp__.py rename to account_banking_mandate_sale/__manifest__.py From 3f759187f32d39d29a403f683532a5583d6479b7 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 20 Oct 2016 01:41:41 +0200 Subject: [PATCH 08/14] Port almost all modules to v10 (#305) Port almost all modules to v10 * Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug #300) --- account_banking_mandate_sale/README.rst | 2 +- account_banking_mandate_sale/__manifest__.py | 4 ++-- account_banking_mandate_sale/models/sale_order.py | 2 +- account_banking_mandate_sale/views/sale_order.xml | 13 +++++-------- .../wizard/sale_make_invoice_advance.py | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/account_banking_mandate_sale/README.rst b/account_banking_mandate_sale/README.rst index 2e8967e47..2d897d45c 100644 --- a/account_banking_mandate_sale/README.rst +++ b/account_banking_mandate_sale/README.rst @@ -22,7 +22,7 @@ The mandate will be copied from the sale order to the invoice. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/173/9.0 + :target: https://runbot.odoo-community.org/runbot/173/10.0 Known issues / Roadmap ====================== diff --git a/account_banking_mandate_sale/__manifest__.py b/account_banking_mandate_sale/__manifest__.py index 6b83317f7..031dd003d 100644 --- a/account_banking_mandate_sale/__manifest__.py +++ b/account_banking_mandate_sale/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Account Banking Mandate Sale', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'category': 'Banking addons', 'license': 'AGPL-3', 'summary': "Adds mandates on sale orders", @@ -18,5 +18,5 @@ 'data': [ 'views/sale_order.xml', ], - 'installable': False, + 'installable': True, } diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py index 5f4fc9cf9..887f55602 100644 --- a/account_banking_mandate_sale/models/sale_order.py +++ b/account_banking_mandate_sale/models/sale_order.py @@ -2,7 +2,7 @@ # © 2014-2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp import models, fields, api +from odoo import models, fields, api class SaleOrder(models.Model): diff --git a/account_banking_mandate_sale/views/sale_order.xml b/account_banking_mandate_sale/views/sale_order.xml index d14faf64f..a020c1c80 100644 --- a/account_banking_mandate_sale/views/sale_order.xml +++ b/account_banking_mandate_sale/views/sale_order.xml @@ -1,12 +1,10 @@ - - + @@ -14,7 +12,7 @@ sale.order - + @@ -23,5 +21,4 @@ - - + diff --git a/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py b/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py index 0e9d34aa4..c8dba428e 100644 --- a/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py +++ b/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py @@ -2,7 +2,7 @@ # © 2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp import models, api +from odoo import models, api class SaleAdvancePaymentInv(models.TransientModel): From 31096deec098069fa549389dc170a33a45f0ffee Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Fri, 25 Nov 2016 20:04:32 -0500 Subject: [PATCH 09/14] OCA Transbot updated translations from Transifex --- account_banking_mandate_sale/i18n/de.po | 39 ++++++++++++++++++++++ account_banking_mandate_sale/i18n/es.po | 15 +++++---- account_banking_mandate_sale/i18n/hr.po | 38 +++++++++++++++++++++ account_banking_mandate_sale/i18n/nl_NL.po | 38 +++++++++++++++++++++ 4 files changed, 123 insertions(+), 7 deletions(-) create mode 100644 account_banking_mandate_sale/i18n/de.po create mode 100644 account_banking_mandate_sale/i18n/hr.po create mode 100644 account_banking_mandate_sale/i18n/nl_NL.po diff --git a/account_banking_mandate_sale/i18n/de.po b/account_banking_mandate_sale/i18n/de.po new file mode 100644 index 000000000..928714166 --- /dev/null +++ b/account_banking_mandate_sale/i18n/de.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +# Niki Waibel, 2016 +msgid "" +msgstr "" +"Project-Id-Version: bank-payment (10.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-21 10:17+0000\n" +"PO-Revision-Date: 2016-11-01 20:09+0000\n" +"Last-Translator: Niki Waibel\n" +"Language-Team: German (http://www.transifex.com/oca/OCA-bank-payment-10-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "Gewerbliche Instanz" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "Lastschrift Mandat" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "Verkaufsanzahlungsrechnung" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Kundenauftrag" diff --git a/account_banking_mandate_sale/i18n/es.po b/account_banking_mandate_sale/i18n/es.po index 0bb1e6223..caa4b8632 100644 --- a/account_banking_mandate_sale/i18n/es.po +++ b/account_banking_mandate_sale/i18n/es.po @@ -4,14 +4,15 @@ # # Translators: # OCA Transbot , 2016 +# Pedro M. Baeza , 2016 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: bank-payment (10.0)\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-07-01 19:28+0000\n" -"PO-Revision-Date: 2016-07-01 19:28+0000\n" -"Last-Translator: OCA Transbot , 2016\n" -"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"POT-Creation-Date: 2016-12-24 00:21+0000\n" +"PO-Revision-Date: 2016-12-27 12:11+0000\n" +"Last-Translator: Pedro M. Baeza \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-bank-payment-10-0/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -21,7 +22,7 @@ msgstr "" #. module: account_banking_mandate_sale #: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id msgid "Commercial Entity" -msgstr "" +msgstr "Entidad comercial" #. module: account_banking_mandate_sale #: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id @@ -31,7 +32,7 @@ msgstr "Mandato de adeudo directo" #. module: account_banking_mandate_sale #: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv msgid "Sales Advance Payment Invoice" -msgstr "" +msgstr "Ventas. Anticipo pago factura" #. module: account_banking_mandate_sale #: model:ir.model,name:account_banking_mandate_sale.model_sale_order diff --git a/account_banking_mandate_sale/i18n/hr.po b/account_banking_mandate_sale/i18n/hr.po new file mode 100644 index 000000000..6d5480fb4 --- /dev/null +++ b/account_banking_mandate_sale/i18n/hr.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: bank-payment (10.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-20 01:40+0000\n" +"PO-Revision-Date: 2016-10-19 23:45+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-bank-payment-10-0/language/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Ponuda" diff --git a/account_banking_mandate_sale/i18n/nl_NL.po b/account_banking_mandate_sale/i18n/nl_NL.po new file mode 100644 index 000000000..6d9d031b7 --- /dev/null +++ b/account_banking_mandate_sale/i18n/nl_NL.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: bank-payment (10.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-08-18 00:42+0000\n" +"PO-Revision-Date: 2016-10-19 23:45+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-bank-payment-10-0/language/nl_NL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "Verkooporder" From a196242254076a89ba78805ee211d477b2df0b3d Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 24 Mar 2018 16:19:02 +0100 Subject: [PATCH 10/14] [FIX] account_banking_mandate_sale: Fix error when no valid mandate for the partner Closes #459 --- account_banking_mandate_sale/__manifest__.py | 2 +- account_banking_mandate_sale/models/sale_order.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/account_banking_mandate_sale/__manifest__.py b/account_banking_mandate_sale/__manifest__.py index 031dd003d..a2ce59f80 100644 --- a/account_banking_mandate_sale/__manifest__.py +++ b/account_banking_mandate_sale/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Account Banking Mandate Sale', - 'version': '10.0.1.0.0', + 'version': '10.0.1.0.1', 'category': 'Banking addons', 'license': 'AGPL-3', 'summary': "Adds mandates on sale orders", diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py index 887f55602..93afaf989 100644 --- a/account_banking_mandate_sale/models/sale_order.py +++ b/account_banking_mandate_sale/models/sale_order.py @@ -35,4 +35,4 @@ class SaleOrder(models.Model): ('state', '=', 'valid'), ('partner_id', '=', self.commercial_partner_id.id), ]) - self.mandate_id = mandates[0] + self.mandate_id = mandates[:1] From d0bbe9772979889b4e4f984377e4438be2ef9856 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Wed, 20 Jun 2018 17:33:58 +0000 Subject: [PATCH 11/14] [UPD] Update account_banking_mandate_sale.pot --- .../i18n/account_banking_mandate_sale.pot | 35 +++++++++++++++++++ account_banking_mandate_sale/i18n/de.po | 7 ++-- account_banking_mandate_sale/i18n/es.po | 7 ++-- account_banking_mandate_sale/i18n/hr.po | 10 +++--- account_banking_mandate_sale/i18n/nl.po | 4 +-- account_banking_mandate_sale/i18n/nl_NL.po | 7 ++-- account_banking_mandate_sale/i18n/pt_BR.po | 7 ++-- account_banking_mandate_sale/i18n/sl.po | 7 ++-- 8 files changed, 63 insertions(+), 21 deletions(-) create mode 100644 account_banking_mandate_sale/i18n/account_banking_mandate_sale.pot diff --git a/account_banking_mandate_sale/i18n/account_banking_mandate_sale.pot b/account_banking_mandate_sale/i18n/account_banking_mandate_sale.pot new file mode 100644 index 000000000..1bc287bf6 --- /dev/null +++ b/account_banking_mandate_sale/i18n/account_banking_mandate_sale.pot @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_banking_mandate_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id +msgid "Commercial Entity" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_mandate_id +msgid "Direct Debit Mandate" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_advance_payment_inv +msgid "Sales Advance Payment Invoice" +msgstr "" + +#. module: account_banking_mandate_sale +#: model:ir.model,name:account_banking_mandate_sale.model_sale_order +msgid "Sales Order" +msgstr "" + diff --git a/account_banking_mandate_sale/i18n/de.po b/account_banking_mandate_sale/i18n/de.po index 928714166..5d56983ee 100644 --- a/account_banking_mandate_sale/i18n/de.po +++ b/account_banking_mandate_sale/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_banking_mandate_sale -# +# # Translators: # Niki Waibel, 2016 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2016-11-21 10:17+0000\n" "PO-Revision-Date: 2016-11-01 20:09+0000\n" "Last-Translator: Niki Waibel\n" -"Language-Team: German (http://www.transifex.com/oca/OCA-bank-payment-10-0/language/de/)\n" +"Language-Team: German (http://www.transifex.com/oca/OCA-bank-payment-10-0/" +"language/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_banking_mandate_sale diff --git a/account_banking_mandate_sale/i18n/es.po b/account_banking_mandate_sale/i18n/es.po index caa4b8632..04cb10bfd 100644 --- a/account_banking_mandate_sale/i18n/es.po +++ b/account_banking_mandate_sale/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_banking_mandate_sale -# +# # Translators: # OCA Transbot , 2016 # Pedro M. Baeza , 2016 @@ -12,11 +12,12 @@ msgstr "" "POT-Creation-Date: 2016-12-24 00:21+0000\n" "PO-Revision-Date: 2016-12-27 12:11+0000\n" "Last-Translator: Pedro M. Baeza \n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-bank-payment-10-0/language/es/)\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-bank-payment-10-0/" +"language/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_banking_mandate_sale diff --git a/account_banking_mandate_sale/i18n/hr.po b/account_banking_mandate_sale/i18n/hr.po index 6d5480fb4..258787d43 100644 --- a/account_banking_mandate_sale/i18n/hr.po +++ b/account_banking_mandate_sale/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_banking_mandate_sale -# +# # Translators: msgid "" msgstr "" @@ -10,12 +10,14 @@ msgstr "" "POT-Creation-Date: 2018-02-20 01:40+0000\n" "PO-Revision-Date: 2016-10-19 23:45+0000\n" "Last-Translator: <>\n" -"Language-Team: Croatian (http://www.transifex.com/oca/OCA-bank-payment-10-0/language/hr/)\n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-bank-payment-10-0/" +"language/hr/)\n" +"Language: hr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: hr\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: account_banking_mandate_sale #: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id diff --git a/account_banking_mandate_sale/i18n/nl.po b/account_banking_mandate_sale/i18n/nl.po index 466a54f23..10e2cad06 100644 --- a/account_banking_mandate_sale/i18n/nl.po +++ b/account_banking_mandate_sale/i18n/nl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_banking_mandate_sale -# +# # Translators: # Erwin van der Ploeg , 2016 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2016-07-22 23:52+0000\n" "Last-Translator: Erwin van der Ploeg , 2016\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_banking_mandate_sale diff --git a/account_banking_mandate_sale/i18n/nl_NL.po b/account_banking_mandate_sale/i18n/nl_NL.po index 6d9d031b7..8d92972df 100644 --- a/account_banking_mandate_sale/i18n/nl_NL.po +++ b/account_banking_mandate_sale/i18n/nl_NL.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_banking_mandate_sale -# +# # Translators: msgid "" msgstr "" @@ -10,11 +10,12 @@ msgstr "" "POT-Creation-Date: 2017-08-18 00:42+0000\n" "PO-Revision-Date: 2016-10-19 23:45+0000\n" "Last-Translator: <>\n" -"Language-Team: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-bank-payment-10-0/language/nl_NL/)\n" +"Language-Team: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-bank-" +"payment-10-0/language/nl_NL/)\n" +"Language: nl_NL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: nl_NL\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_banking_mandate_sale diff --git a/account_banking_mandate_sale/i18n/pt_BR.po b/account_banking_mandate_sale/i18n/pt_BR.po index df07ee7af..e178f9b64 100644 --- a/account_banking_mandate_sale/i18n/pt_BR.po +++ b/account_banking_mandate_sale/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_banking_mandate_sale -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2016-07-01 19:28+0000\n" "PO-Revision-Date: 2016-07-01 19:28+0000\n" "Last-Translator: OCA Transbot , 2016\n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_banking_mandate_sale diff --git a/account_banking_mandate_sale/i18n/sl.po b/account_banking_mandate_sale/i18n/sl.po index b73950447..1678b36c9 100644 --- a/account_banking_mandate_sale/i18n/sl.po +++ b/account_banking_mandate_sale/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_banking_mandate_sale -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -12,11 +12,12 @@ msgstr "" "PO-Revision-Date: 2016-07-01 19:28+0000\n" "Last-Translator: OCA Transbot , 2016\n" "Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" #. module: account_banking_mandate_sale #: model:ir.model.fields,field_description:account_banking_mandate_sale.field_sale_order_commercial_partner_id From 0e3c6293d4c4a71337c36d177c154976436dcce7 Mon Sep 17 00:00:00 2001 From: Thomas Binsfeld Date: Fri, 21 Dec 2018 12:14:42 +0100 Subject: [PATCH 12/14] [MIG] Account Banking Mandate Sale --- account_banking_mandate_sale/README.rst | 81 ++-- account_banking_mandate_sale/__init__.py | 2 - account_banking_mandate_sale/__manifest__.py | 7 +- .../models/__init__.py | 2 - .../models/sale_order.py | 3 +- .../readme/CONFIGURATION.rst | 1 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 1 + account_banking_mandate_sale/readme/USAGE.rst | 4 + .../static/description/index.html | 426 ++++++++++++++++++ .../wizard/__init__.py | 2 - .../wizard/sale_make_invoice_advance.py | 1 - .../odoo/addons/account_banking_mandate_sale | 1 + setup/account_banking_mandate_sale/setup.py | 6 + 14 files changed, 492 insertions(+), 46 deletions(-) create mode 100644 account_banking_mandate_sale/readme/CONFIGURATION.rst create mode 100644 account_banking_mandate_sale/readme/CONTRIBUTORS.rst create mode 100644 account_banking_mandate_sale/readme/DESCRIPTION.rst create mode 100644 account_banking_mandate_sale/readme/USAGE.rst create mode 100644 account_banking_mandate_sale/static/description/index.html create mode 120000 setup/account_banking_mandate_sale/odoo/addons/account_banking_mandate_sale create mode 100644 setup/account_banking_mandate_sale/setup.py diff --git a/account_banking_mandate_sale/README.rst b/account_banking_mandate_sale/README.rst index 2d897d45c..cbfe631c8 100644 --- a/account_banking_mandate_sale/README.rst +++ b/account_banking_mandate_sale/README.rst @@ -1,16 +1,36 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 - ============================ Account Banking Mandate Sale ============================ +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github + :target: https://github.com/OCA/bank-payment/tree/12.0/account_banking_mandate_sale + :alt: OCA/bank-payment +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/bank-payment-12-0/bank-payment-12-0-account_banking_mandate_sale + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/97/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This modules adds the field *Direct Debit Mandate* on sale orders. -Configuration -============= +**Table of contents** -There is nothing to configure. +.. contents:: + :local: Usage ===== @@ -20,47 +40,42 @@ select by default the first valid mandate of this customer. The mandate will be copied from the sale order to the invoice. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/173/10.0 - -Known issues / Roadmap -====================== - - * No known issues. - Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Akretion Contributors ------------- +~~~~~~~~~~~~ * Alexis de Lattre -Maintainer ----------- - -.. image:: http://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: http://odoo-community.org +Maintainers +~~~~~~~~~~~ This module is maintained by the OCA. -OCA, or the Odoo Community Association, is a nonprofit organization -whose mission is to support the collaborative development of Odoo -features and promote its widespread use. +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org -To contribute to this module, please visit http://odoo-community.org. +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/bank-payment `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_banking_mandate_sale/__init__.py b/account_banking_mandate_sale/__init__.py index 35e7c9600..9b4296142 100644 --- a/account_banking_mandate_sale/__init__.py +++ b/account_banking_mandate_sale/__init__.py @@ -1,4 +1,2 @@ -# -*- coding: utf-8 -*- - from . import models from . import wizard diff --git a/account_banking_mandate_sale/__manifest__.py b/account_banking_mandate_sale/__manifest__.py index a2ce59f80..581f380c3 100644 --- a/account_banking_mandate_sale/__manifest__.py +++ b/account_banking_mandate_sale/__manifest__.py @@ -1,15 +1,14 @@ -# -*- coding: utf-8 -*- # © 2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Account Banking Mandate Sale', - 'version': '10.0.1.0.1', + 'version': '12.0.1.0.1', 'category': 'Banking addons', 'license': 'AGPL-3', 'summary': "Adds mandates on sale orders", - 'author': "Akretion, " - "Odoo Community Association (OCA)", + 'author': "Odoo Community Association (OCA), " + "Akretion", 'website': 'https://github.com/OCA/bank-payment', 'depends': [ 'account_payment_sale', diff --git a/account_banking_mandate_sale/models/__init__.py b/account_banking_mandate_sale/models/__init__.py index 6064afee1..6aacb7531 100644 --- a/account_banking_mandate_sale/models/__init__.py +++ b/account_banking_mandate_sale/models/__init__.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - from . import sale_order diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py index 93afaf989..7089c0e97 100644 --- a/account_banking_mandate_sale/models/sale_order.py +++ b/account_banking_mandate_sale/models/sale_order.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2014-2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -34,5 +33,5 @@ class SaleOrder(models.Model): mandates = self.env['account.banking.mandate'].search([ ('state', '=', 'valid'), ('partner_id', '=', self.commercial_partner_id.id), - ]) + ]) self.mandate_id = mandates[:1] diff --git a/account_banking_mandate_sale/readme/CONFIGURATION.rst b/account_banking_mandate_sale/readme/CONFIGURATION.rst new file mode 100644 index 000000000..10f006c4a --- /dev/null +++ b/account_banking_mandate_sale/readme/CONFIGURATION.rst @@ -0,0 +1 @@ +There is nothing to configure. diff --git a/account_banking_mandate_sale/readme/CONTRIBUTORS.rst b/account_banking_mandate_sale/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..ff65d68ce --- /dev/null +++ b/account_banking_mandate_sale/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Alexis de Lattre diff --git a/account_banking_mandate_sale/readme/DESCRIPTION.rst b/account_banking_mandate_sale/readme/DESCRIPTION.rst new file mode 100644 index 000000000..d7a2a4596 --- /dev/null +++ b/account_banking_mandate_sale/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This modules adds the field *Direct Debit Mandate* on sale orders. diff --git a/account_banking_mandate_sale/readme/USAGE.rst b/account_banking_mandate_sale/readme/USAGE.rst new file mode 100644 index 000000000..bacc436e1 --- /dev/null +++ b/account_banking_mandate_sale/readme/USAGE.rst @@ -0,0 +1,4 @@ +When you select a payment mode that requires mandate on a sale order, Odoo will +select by default the first valid mandate of this customer. + +The mandate will be copied from the sale order to the invoice. diff --git a/account_banking_mandate_sale/static/description/index.html b/account_banking_mandate_sale/static/description/index.html new file mode 100644 index 000000000..ef0ad5914 --- /dev/null +++ b/account_banking_mandate_sale/static/description/index.html @@ -0,0 +1,426 @@ + + + + + + +Account Banking Mandate Sale + + + +
+

Account Banking Mandate Sale

+ + +

Beta License: AGPL-3 OCA/bank-payment Translate me on Weblate Try me on Runbot

+

This modules adds the field Direct Debit Mandate on sale orders.

+

Table of contents

+ +
+

Usage

+

When you select a payment mode that requires mandate on a sale order, Odoo will +select by default the first valid mandate of this customer.

+

The mandate will be copied from the sale order to the invoice.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/bank-payment project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_banking_mandate_sale/wizard/__init__.py b/account_banking_mandate_sale/wizard/__init__.py index 1eb17ffa1..fca48c3d0 100644 --- a/account_banking_mandate_sale/wizard/__init__.py +++ b/account_banking_mandate_sale/wizard/__init__.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - from . import sale_make_invoice_advance diff --git a/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py b/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py index c8dba428e..f8df5479b 100644 --- a/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py +++ b/account_banking_mandate_sale/wizard/sale_make_invoice_advance.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Akretion (Alexis de Lattre ) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/setup/account_banking_mandate_sale/odoo/addons/account_banking_mandate_sale b/setup/account_banking_mandate_sale/odoo/addons/account_banking_mandate_sale new file mode 120000 index 000000000..8f89bfe9f --- /dev/null +++ b/setup/account_banking_mandate_sale/odoo/addons/account_banking_mandate_sale @@ -0,0 +1 @@ +../../../../account_banking_mandate_sale \ No newline at end of file diff --git a/setup/account_banking_mandate_sale/setup.py b/setup/account_banking_mandate_sale/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/account_banking_mandate_sale/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From 34e7cc97332754d4d2299c6cad9e54bf1457ea4a Mon Sep 17 00:00:00 2001 From: Thomas Binsfeld Date: Wed, 20 Feb 2019 09:22:07 +0100 Subject: [PATCH 13/14] [IMP] Mandate Sale: mandate visible only if mandate required --- account_banking_mandate_sale/models/sale_order.py | 11 ++++++++--- account_banking_mandate_sale/readme/CONTRIBUTORS.rst | 1 + account_banking_mandate_sale/views/sale_order.xml | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/account_banking_mandate_sale/models/sale_order.py b/account_banking_mandate_sale/models/sale_order.py index 7089c0e97..4d64683ef 100644 --- a/account_banking_mandate_sale/models/sale_order.py +++ b/account_banking_mandate_sale/models/sale_order.py @@ -16,6 +16,10 @@ class SaleOrder(models.Model): 'account.banking.mandate', string='Direct Debit Mandate', ondelete='restrict', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) + mandate_required = fields.Boolean( + related='payment_mode_id.payment_method_id.mandate_required', + readonly=True, + ) @api.multi def _prepare_invoice(self): @@ -27,11 +31,12 @@ class SaleOrder(models.Model): @api.onchange('payment_mode_id') def payment_mode_change(self): """Select by default the first valid mandate of the partner""" - if ( - self.payment_mode_id.payment_method_id.mandate_required and - self.partner_id): + self.ensure_one() + if self.mandate_required and self.partner_id: mandates = self.env['account.banking.mandate'].search([ ('state', '=', 'valid'), ('partner_id', '=', self.commercial_partner_id.id), ]) self.mandate_id = mandates[:1] + else: + self.mandate_id = False diff --git a/account_banking_mandate_sale/readme/CONTRIBUTORS.rst b/account_banking_mandate_sale/readme/CONTRIBUTORS.rst index ff65d68ce..e0b9ee19e 100644 --- a/account_banking_mandate_sale/readme/CONTRIBUTORS.rst +++ b/account_banking_mandate_sale/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Alexis de Lattre +* Thomas Binsfeld diff --git a/account_banking_mandate_sale/views/sale_order.xml b/account_banking_mandate_sale/views/sale_order.xml index a020c1c80..88ea0b81a 100644 --- a/account_banking_mandate_sale/views/sale_order.xml +++ b/account_banking_mandate_sale/views/sale_order.xml @@ -6,7 +6,6 @@ - account_banking_mandate_sale.sale_order.form sale.order @@ -15,10 +14,11 @@ + domain="[('partner_id', '=', commercial_partner_id), ('state', 'in', ('draft', 'valid'))]" + attrs="{'invisible': [('mandate_required', '=', False)]}"/> + - From 46ff37d8fa267cc9261e9c6b885b389288ef9838 Mon Sep 17 00:00:00 2001 From: Thomas Binsfeld Date: Thu, 21 Feb 2019 15:11:14 +0100 Subject: [PATCH 14/14] [REF] Gitignore: .eggs --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 890ff0109..7f2d43821 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ var/ *.egg-info/ .installed.cfg *.egg +*.eggs # Installer logs pip-log.txt