mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Initial adjustments for 8.0 repository
This commit is contained in:
committed by
Artem Kostyuk
parent
7fe7547d89
commit
ea2a6210b2
@@ -1,23 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Payment Sale module for OpenERP
|
||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from . import model
|
||||
@@ -1,55 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Payment Sale module for OpenERP
|
||||
# Copyright (C) 2014 Akretion (http://www.akretion.com).
|
||||
# @author Alexis de Lattre <alexis.delattre@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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
'name': 'Account Payment Sale',
|
||||
'version': '1.0',
|
||||
'category': 'Banking addons',
|
||||
'license': 'AGPL-3',
|
||||
'summary': "Adds Payment Mode on Sale Orders",
|
||||
'description': """
|
||||
Account Payment Sale
|
||||
====================
|
||||
|
||||
This modules adds one field on sale orders : *Payment Mode*.
|
||||
This field is copied from partner to sale order and then from sale order to
|
||||
customer invoice.
|
||||
|
||||
This module is similar to the *sale_payment* module ; the main difference is
|
||||
that it doesn't depend on the *account_payment_extension* module (it's not the
|
||||
only module to conflict with *account_payment_extension* ; all the SEPA
|
||||
modules in the banking addons conflict with *account_payment_extension*, cf
|
||||
banking-addons-70/account_banking_payment_export/__openerp__.py).
|
||||
|
||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com>
|
||||
for any help or question about this module.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['sale', 'account_payment_partner'],
|
||||
'conflicts': ['sale_payment'],
|
||||
'data': [
|
||||
'view/sale.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_payment_sale
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-06-09 23:24+0000\n"
|
||||
"PO-Revision-Date: 2014-06-09 23:24+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: account_payment_sale
|
||||
#: field:sale.order,payment_mode_id:0
|
||||
msgid "Payment Mode"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_payment_sale
|
||||
#: model:ir.model,name:account_payment_sale.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Dutch translation for banking-addons
|
||||
# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
|
||||
# This file is distributed under the same license as the banking-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: banking-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2014-06-09 23:24+0000\n"
|
||||
"PO-Revision-Date: 2014-06-26 14:13+0000\n"
|
||||
"Last-Translator: Erwin van der Ploeg (BAS Solutions) <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2014-06-27 07:13+0000\n"
|
||||
"X-Generator: Launchpad (build 17077)\n"
|
||||
|
||||
#. module: account_payment_sale
|
||||
#: field:sale.order,payment_mode_id:0
|
||||
msgid "Payment Mode"
|
||||
msgstr "Betaalwijze"
|
||||
|
||||
#. module: account_payment_sale
|
||||
#: model:ir.model,name:account_payment_sale.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Verkooporder"
|
||||
@@ -1,23 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Payment Sale module for OpenERP
|
||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from . import sale
|
||||
@@ -1,55 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Payment Sale module for OpenERP
|
||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import orm, fields
|
||||
|
||||
|
||||
class sale_order(orm.Model):
|
||||
_inherit = "sale.order"
|
||||
|
||||
_columns = {
|
||||
'payment_mode_id': fields.many2one(
|
||||
'payment.mode', 'Payment Mode'),
|
||||
}
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part, context=None):
|
||||
res = super(sale_order, self).onchange_partner_id(
|
||||
cr, uid, ids, part, context=context)
|
||||
if part:
|
||||
partner = self.pool['res.partner'].browse(
|
||||
cr, uid, part, context=context)
|
||||
res['value']['payment_mode_id'] = \
|
||||
partner.customer_payment_mode.id or False,
|
||||
else:
|
||||
res['value']['payment_mode_id'] = False
|
||||
return res
|
||||
|
||||
def _prepare_invoice(self, cr, uid, order, lines, context=None):
|
||||
"""Copy bank partner from sale order to invoice"""
|
||||
invoice_vals = super(sale_order, self)._prepare_invoice(
|
||||
cr, uid, order, lines, context=context)
|
||||
invoice_vals.update({
|
||||
'payment_mode_id': order.payment_mode_id.id or False,
|
||||
'partner_bank_id': order.payment_mode_id and
|
||||
order.payment_mode_id.bank_id.id or False,
|
||||
})
|
||||
return invoice_vals
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
The licence is in the file __openerp__.py
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="name">account_payment_sale.sale_order.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="payment_term" position="after">
|
||||
<field name="payment_mode_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user