[MIG] base_transaction_id: Migration to 11.0
parent
684dcd4315
commit
4b998312cd
|
@ -1,15 +1,15 @@
|
||||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: https://www.gnu.org/licenses/agpl
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
============================================
|
============================================
|
||||||
Base transaction id for financial institutes
|
Base transaction ID for financial institutes
|
||||||
============================================
|
============================================
|
||||||
|
|
||||||
Adds transaction id to invoice and sale models and views.
|
Adds transaction ID to invoice and sale models and views.
|
||||||
|
|
||||||
On Sales order, you can specify the transaction ID used
|
On Sales order, you can specify the transaction ID used for the payment and it
|
||||||
for the payment and it will be propagated to the invoice (even if made from packing).
|
will be propagated to the invoice (even if made from packing).
|
||||||
This is mostly used for e-commerce handling.
|
This is mostly used for e-commerce handling.
|
||||||
|
|
||||||
You can then add a mapping on that SO field to save the e-commerce financial
|
You can then add a mapping on that SO field to save the e-commerce financial
|
||||||
|
@ -22,9 +22,9 @@ Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Bugs are tracked on `GitHub Issues
|
Bugs are tracked on `GitHub Issues
|
||||||
<https://github.com/OCA/bank-statement-reconcile/issues>`_. In case of trouble, please
|
<https://github.com/OCA/account-reconcile/issues>`_. In case of trouble, please
|
||||||
check there if your issue has already been reported. If you spotted it first,
|
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 smash it by providing detailed and welcomed feedback.
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
=======
|
=======
|
||||||
|
@ -36,9 +36,11 @@ Contributors
|
||||||
* Joël Grand-Guillaume <joel.grandguillaume@camptocamp.com>
|
* Joël Grand-Guillaume <joel.grandguillaume@camptocamp.com>
|
||||||
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
|
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
|
||||||
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||||
* Pedro Baeza <pedro.baezo@gmail.com>
|
|
||||||
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
||||||
|
|
||||||
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
# -*- coding: utf-8 -*
|
# Copyright 2012 Yannick Vaucher, Camptocamp SA
|
||||||
# © 2012 Yannick Vaucher, Camptocamp SA
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
{'name': 'Base transaction id for financial institutes',
|
{'name': 'Base transaction ID for financial institutes',
|
||||||
'version': '10.0.1.0.0',
|
'version': '11.0.1.0.0',
|
||||||
'author': "Camptocamp,Odoo Community Association (OCA)",
|
'author': "Camptocamp,Odoo Community Association (OCA)",
|
||||||
'maintainer': 'Camptocamp',
|
'maintainer': 'Camptocamp',
|
||||||
'category': 'Hidden/Dependency',
|
'category': 'Hidden/Dependency',
|
||||||
'depends': [
|
'depends': [
|
||||||
'sale',
|
'sale',
|
||||||
],
|
],
|
||||||
'website': 'https://www.odoo-community.org/',
|
'website': 'https://github.com/OCA/account-reconcile',
|
||||||
'data': [
|
'data': [
|
||||||
'views/invoice.xml',
|
'views/invoice.xml',
|
||||||
'views/sale.xml',
|
'views/sale.xml',
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * base_transaction_id
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2014-10-09 07:37+0000\n"
|
|
||||||
"PO-Revision-Date: 2014-10-09 07:37+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: base_transaction_id
|
|
||||||
#: model:ir.model,name:base_transaction_id.model_account_invoice
|
|
||||||
msgid "Invoice"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_transaction_id
|
|
||||||
#: model:ir.model,name:base_transaction_id.model_account_move_line
|
|
||||||
msgid "Journal Items"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_transaction_id
|
|
||||||
#: model:ir.model,name:base_transaction_id.model_stock_picking
|
|
||||||
msgid "Picking List"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_transaction_id
|
|
||||||
#: model:ir.model,name:base_transaction_id.model_sale_order
|
|
||||||
msgid "Sales Order"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_transaction_id
|
|
||||||
#: field:account.invoice,transaction_id:0
|
|
||||||
#: field:sale.order,transaction_id:0
|
|
||||||
msgid "Transaction ID"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_transaction_id
|
|
||||||
#: help:account.invoice,transaction_id:0
|
|
||||||
msgid "Transaction ID from the financial institute"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_transaction_id
|
|
||||||
#: field:account.move.line,transaction_ref:0
|
|
||||||
msgid "Transaction Ref."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: base_transaction_id
|
|
||||||
#: help:sale.order,transaction_id:0
|
|
||||||
msgid "Transaction id from the financial institute"
|
|
||||||
msgstr ""
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*# -*- coding: utf-8 -*-
|
|
||||||
# © 2012-2015 Yannick Vaucher (Camptocamp)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
||||||
from . import invoice
|
from . import invoice
|
||||||
from . import sale
|
from . import sale
|
||||||
from . import account_move
|
from . import account_move
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# -*- coding: utf-8 -*-
|
# Copyright 2016 Yannick Vaucher (Camptocamp SA)
|
||||||
# © 2016 Yannick Vaucher (Camptocamp SA)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
from odoo import api, models
|
from odoo import api, models
|
||||||
|
|
||||||
|
@ -10,7 +9,8 @@ class AccountBankStatementLine(models.Model):
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def get_reconciliation_proposition(self, excluded_ids=None):
|
def get_reconciliation_proposition(self, excluded_ids=None):
|
||||||
""" Look for transaction_ref to give them as proposition move line """
|
"""Look for transaction_ref to give them as proposition move line."""
|
||||||
|
self.ensure_one()
|
||||||
if self.name:
|
if self.name:
|
||||||
# If the transaction has no partner, look for match in payable and
|
# If the transaction has no partner, look for match in payable and
|
||||||
# receivable account anyway
|
# receivable account anyway
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# -*- coding: utf-8 -*-
|
# Copyright 2014 Guewen Baconnier (Camptocamp)
|
||||||
# © 2014 Guewen Baconnier (Camptocamp)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.osv import expression
|
from odoo.osv import expression
|
||||||
|
@ -36,7 +35,7 @@ class AccountMoveLine(models.Model):
|
||||||
@api.model
|
@api.model
|
||||||
def domain_move_lines_for_reconciliation(self, excluded_ids=None,
|
def domain_move_lines_for_reconciliation(self, excluded_ids=None,
|
||||||
str=False):
|
str=False):
|
||||||
""" Add transaction_ref in search of move lines"""
|
"""Add transaction_ref in search of move lines."""
|
||||||
_super = super(AccountMoveLine, self)
|
_super = super(AccountMoveLine, self)
|
||||||
_get_domain = _super.domain_move_lines_for_reconciliation
|
_get_domain = _super.domain_move_lines_for_reconciliation
|
||||||
domain = _get_domain(excluded_ids=excluded_ids, str=str)
|
domain = _get_domain(excluded_ids=excluded_ids, str=str)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# Copyright 2011-2012 Nicolas Bessi (Camptocamp)
|
||||||
# © 2011-2012 Nicolas Bessi (Camptocamp)
|
# Copyright 2012-2015 Yannick Vaucher (Camptocamp)
|
||||||
# © 2012-2015 Yannick Vaucher (Camptocamp)
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
@ -18,7 +17,7 @@ class AccountInvoice(models.Model):
|
||||||
def finalize_invoice_move_lines(self, move_lines):
|
def finalize_invoice_move_lines(self, move_lines):
|
||||||
"""Propagate the transaction_id from the invoice to the move lines.
|
"""Propagate the transaction_id from the invoice to the move lines.
|
||||||
|
|
||||||
The transaction id is written on the move lines only if the account is
|
The transaction ID is written on the move lines only if the account is
|
||||||
the same than the invoice's one.
|
the same than the invoice's one.
|
||||||
"""
|
"""
|
||||||
move_lines = super(AccountInvoice, self).finalize_invoice_move_lines(
|
move_lines = super(AccountInvoice, self).finalize_invoice_move_lines(
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# Copyright 2011-2012 Nicolas Bessi (Camptocamp)
|
||||||
# © 2011-2012 Nicolas Bessi (Camptocamp)
|
# Copyright 2012-2015 Yannick Vaucher (Camptocamp)
|
||||||
# © 2012-2015 Yannick Vaucher (Camptocamp)
|
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +15,7 @@ class SaleOrder(models.Model):
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _prepare_invoice(self):
|
def _prepare_invoice(self):
|
||||||
""" Propagate the transaction_id from the sale order to the invoice """
|
"""Propagate the transaction_id from the sale order to the invoice."""
|
||||||
invoice_vals = super(SaleOrder, self)._prepare_invoice()
|
invoice_vals = super(SaleOrder, self)._prepare_invoice()
|
||||||
invoice_vals['transaction_id'] = self.transaction_id
|
invoice_vals['transaction_id'] = self.transaction_id
|
||||||
return invoice_vals
|
return invoice_vals
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<field name="model">account.move.line</field>
|
<field name="model">account.move.line</field>
|
||||||
<field name="inherit_id" ref="account.view_move_line_form"/>
|
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='reconciled']/.." position="after">
|
<xpath expr="//field[@name='full_reconcile_id']/.." position="after">
|
||||||
<field name="transaction_ref"/>
|
<field name="transaction_ref"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
<field name="model">account.invoice</field>
|
<field name="model">account.invoice</field>
|
||||||
<field name="inherit_id" ref="account.invoice_form"/>
|
<field name="inherit_id" ref="account.invoice_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//page[@name='other_info']/group/group/field[@name='origin']" position="after">
|
<!-- target account.invoice.origin
|
||||||
|
the first `origin` field of the view is declared in invoice lines -->
|
||||||
|
<xpath expr="//page[@name='other_info']//field[@name='origin']" position="after">
|
||||||
<field name="transaction_id"/>
|
<field name="transaction_id"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
Loading…
Reference in New Issue