mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[MIG] account_payment_mode: Migration to 13.0
This commit is contained in:
committed by
Thomas Binsfeld
parent
3932e65d27
commit
297ff807fd
@@ -14,13 +14,13 @@ Account Payment Mode
|
||||
: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_payment_mode
|
||||
:target: https://github.com/OCA/bank-payment/tree/13.0/account_payment_mode
|
||||
: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_payment_mode
|
||||
:target: https://translation.odoo-community.org/projects/bank-payment-13-0/bank-payment-13-0-account_payment_mode
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/173/12.0
|
||||
:target: https://runbot.odoo-community.org/runbot/173/13.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -52,7 +52,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-payment/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 <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_mode%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_mode%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -68,6 +68,7 @@ Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
* Eric Lembregts <eric@lembregts.eu>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
@@ -82,6 +83,6 @@ 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 <https://github.com/OCA/bank-payment/tree/12.0/account_payment_mode>`_ project on GitHub.
|
||||
This module is part of the `OCA/bank-payment <https://github.com/OCA/bank-payment/tree/13.0/account_payment_mode>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
'name': 'Account Payment Mode',
|
||||
'version': '12.0.1.0.0',
|
||||
'version': '13.0.1.0.0',
|
||||
'license': 'AGPL-3',
|
||||
'author': "Akretion,Odoo Community Association (OCA)",
|
||||
'website': 'https://github.com/OCA/bank-payment',
|
||||
|
||||
@@ -12,16 +12,14 @@ class AccountPaymentMethod(models.Model):
|
||||
help="This code is used in the code of the Odoo module that handles "
|
||||
"this payment method. Therefore, if you change it, "
|
||||
"the generation of the payment file may fail.")
|
||||
active = fields.Boolean(string='Active', default=True)
|
||||
active = fields.Boolean(default=True)
|
||||
bank_account_required = fields.Boolean(
|
||||
string='Bank Account Required',
|
||||
help="Activate this option if this payment method requires you to "
|
||||
"know the bank account number of your customer or supplier.")
|
||||
payment_mode_ids = fields.One2many(
|
||||
comodel_name='account.payment.mode', inverse_name='payment_method_id',
|
||||
string='Payment modes')
|
||||
|
||||
@api.multi
|
||||
@api.depends('code', 'name', 'payment_type')
|
||||
def name_get(self):
|
||||
result = []
|
||||
|
||||
@@ -13,7 +13,7 @@ class AccountPaymentMode(models.Model):
|
||||
_description = 'Payment Modes'
|
||||
_order = 'name'
|
||||
|
||||
name = fields.Char(string='Name', required=True, translate=True)
|
||||
name = fields.Char(required=True, translate=True)
|
||||
company_id = fields.Many2one(
|
||||
'res.company', string='Company', required=True, ondelete='restrict',
|
||||
default=lambda self: self.env['res.company']._company_default_get(
|
||||
@@ -44,18 +44,16 @@ class AccountPaymentMode(models.Model):
|
||||
'account.payment.method', string='Payment Method', required=True,
|
||||
ondelete='restrict') # equivalent v8 field : type
|
||||
payment_type = fields.Selection(
|
||||
related='payment_method_id.payment_type', readonly=True, store=True,
|
||||
string="Payment Type")
|
||||
related='payment_method_id.payment_type', readonly=True, store=True)
|
||||
payment_method_code = fields.Char(
|
||||
related='payment_method_id.code', readonly=True, store=True,
|
||||
string='Payment Method Code')
|
||||
active = fields.Boolean(string='Active', default=True)
|
||||
related='payment_method_id.code', readonly=True, store=True)
|
||||
active = fields.Boolean(default=True)
|
||||
# I dropped sale_ok and purchase_ok fields, because it is replaced by
|
||||
# payment_type = 'inbound' or 'outbound'
|
||||
# In fact, with the new v9 datamodel, you MUST create 2 payment modes
|
||||
# for wire transfer : one for wire transfer from your customers (inbound)
|
||||
# and one for wire transfer to your suppliers (outbound)
|
||||
note = fields.Text(string="Note", translate=True)
|
||||
note = fields.Text(translate=True)
|
||||
|
||||
@api.onchange('company_id')
|
||||
def _onchange_company_id(self):
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
* Eric Lembregts <eric@lembregts.eu>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
|
||||
<title>Account Payment Mode</title>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/bank-payment/tree/12.0/account_payment_mode"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-payment-12-0/bank-payment-12-0-account_payment_mode"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/173/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/bank-payment/tree/13.0/account_payment_mode"><img alt="OCA/bank-payment" src="https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/bank-payment-13-0/bank-payment-13-0-account_payment_mode"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/173/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module adds a new object <em>account.payment.mode</em>, that is used to better
|
||||
classify and route incoming/outgoing payment orders with the banks.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
@@ -398,7 +398,7 @@ classify and route incoming/outgoing payment orders with the banks.</p>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-payment/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_mode%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_mode%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -413,6 +413,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Alexis de Lattre <<a class="reference external" href="mailto:alexis.delattre@akretion.com">alexis.delattre@akretion.com</a>></li>
|
||||
<li>Eric Lembregts <<a class="reference external" href="mailto:eric@lembregts.eu">eric@lembregts.eu</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
@@ -422,7 +423,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-payment/tree/12.0/account_payment_mode">OCA/bank-payment</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-payment/tree/13.0/account_payment_mode">OCA/bank-payment</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@ here. I hate the objects that don't have a view... -->
|
||||
<field name="name">account_payment_method.tree</field>
|
||||
<field name="model">account.payment.method</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Payment Methods">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="payment_type"/>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<field name="name">account.payment.mode.tree</field>
|
||||
<field name="model">account.payment.mode</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Payment Modes">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="payment_method_id"/>
|
||||
<field name="payment_type"/>
|
||||
|
||||
Reference in New Issue
Block a user