[ADD] account import line currency extension module

This commit is contained in:
vrenaville
2015-06-03 14:08:23 +02:00
committed by Yannick Vaucher
parent d992f45337
commit b65090bb41
4 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Vincent Renaville (Camptocamp)
# Copyright 2015 Camptocamp SA
#
# 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/>.
#
##############################################################################

View File

@@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Vincent Renaville (Camptocamp)
# Copyright 2015 Camptocamp SA
#
# 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': 'Payment Order Extension',
'summary': 'Add an improved view for payment order',
'version': '1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'maintainter': 'Camptocamp',
'category': 'Accounting',
'depends': ['account_payment'],
'description': """
Payment Order
==================
Add improved move line selection for multi-currency
Contributors
------------
* Vincent revaville <vincent.renaville@camptocamp.com>
""",
'website': 'http://www.camptocamp.com',
'data': ['payment_view.xml',
'account_statement_from_invoice_view.xml',
],
'tests': [],
'installable': True,
'auto_install': False,
'license': 'AGPL-3',
'conflicts': [
'account_banking_payment_export',
],
'application': False,
}

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_move_line_tree_bank_statement" model="ir.ui.view">
<field name="name">account.move.line.tree.bank.statement</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<tree string="Move lines">
<field name="journal_id" readonly="True"/>
<field name="date" readonly="True"/>
<field name="name" readonly="True"/>
<field name="partner_id" readonly="True" />
<field name="ref" readonly="True" />
<field name="amount_residual_currency" readonly="True"/>
<field name="currency_id" readonly="True" />
<field name="date_maturity" readonly="True"/>
<field name="reconcile_partial_id" readonly="True"/>
</tree>
</field>
</record>
<record id="view_account_statement_from_invoice_lines_over" model="ir.ui.view">
<field name="name">account.statement.from.invoice.lines.form.over</field>
<field name="model">account.statement.from.invoice.lines</field>
<field name="inherit_id" ref="account.view_account_statement_from_invoice_lines"/>
<field name="arch" type="xml">
<field name="line_ids" position="replace">
<field name="line_ids"
context="{'currency':True, 'tree_view_ref': 'account_import_line_multicurrency_extension.view_move_line_tree_bank_statement'}"
domain="[('account_id.type','in',['receivable','payable']), ('reconcile_id','=',False), ('state', '=', 'valid')]">
<tree string="Move lines">
<field name="journal_id"/>
<field name="date"/>
<field name="name"/>
<field name="partner_id" />
<field name="ref" />
<field name="amount_residual_currency"/>
<field name="currency_id"/>
<field name="date_maturity"/>
<field name="reconcile_partial_id"/>
</tree>
</field>
</field>
</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">
<record id="view_move_line_tree_payment" model="ir.ui.view">
<field name="name">account.move.line.tree.payment</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<tree string="Move lines">
<field name="date" readonly="True"/>
<field name="name" readonly="True"/>
<field name="partner_id" readonly="True" />
<field name="ref" readonly="True" />
<field name="amount_residual_currency" readonly="True"/>
<field name="currency_id" readonly="True" />
<field name="date_maturity" readonly="True"/>
<field name="reconcile_partial_id" readonly="True"/>
</tree>
</field>
</record>
<record id="view_create_payment_order_lines_over" model="ir.ui.view">
<field name="name">payment.order.create.form.over</field>
<field name="model">payment.order.create</field>
<field name="inherit_id" ref="account_payment.view_create_payment_order_lines"/>
<field name="arch" type="xml">
<field name="entries" position="replace">
<field name="entries" context="{'tree_view_ref': 'account_import_line_multicurrency_extension.view_move_line_tree_payment'}">
<tree string="Move lines">
<field name="date"/>
<field name="name"/>
<field name="partner_id" />
<field name="ref" />
<field name="amount_residual_currency"/>
<field name="currency_id"/>
<field name="date_maturity"/>
<field name="reconcile_partial_id"/>
</tree>
</field>
</field>
</field>
</record>
</data>
</openerp>