mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[MIG] contract_show_invoice: Migration to v10 (#54)
This commit is contained in:
committed by
Pedro M. Baeza
parent
48bd511502
commit
c9b1e49cda
@@ -41,6 +41,7 @@ Contributors
|
|||||||
|
|
||||||
* Ángel Moya <angel.moya@domatix.com>
|
* Ángel Moya <angel.moya@domatix.com>
|
||||||
* Carlos Dauden <carlos.dauden@tecnativa.com>
|
* Carlos Dauden <carlos.dauden@tecnativa.com>
|
||||||
|
* Dave Burkholder <dave@thinkwelldesigns.com>
|
||||||
|
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
{
|
{
|
||||||
'name': 'Contract Show Invoice',
|
'name': 'Contract Show Invoice',
|
||||||
'summary': 'Button in contracts to show their invoices',
|
'summary': 'Button in contracts to show their invoices',
|
||||||
'version': '9.0.1.1.0',
|
'version': '10.0.1.0.0',
|
||||||
'author': 'Domatix,'
|
'author': 'Domatix,'
|
||||||
'Tecnativa,'
|
'Tecnativa,'
|
||||||
'Odoo Community Association (OCA)',
|
'Odoo Community Association (OCA)',
|
||||||
@@ -16,5 +16,5 @@
|
|||||||
'data': [
|
'data': [
|
||||||
'views/contract_view.xml',
|
'views/contract_view.xml',
|
||||||
],
|
],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
|
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
|
||||||
# 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 openerp import api, fields, models
|
from odoo import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
class AccountInvoice(models.Model):
|
class AccountInvoice(models.Model):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
|
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
from openerp.tests.common import TransactionCase
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
|
|
||||||
class TestContractShowInvoice(TransactionCase):
|
class TestContractShowInvoice(TransactionCase):
|
||||||
|
|||||||
@@ -1,44 +1,42 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<openerp>
|
<odoo>
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="act_analytic_invoices" model="ir.actions.act_window">
|
<record id="act_analytic_invoices" model="ir.actions.act_window">
|
||||||
<field name="context">{'search_default_analytic_account_ids':
|
<field name="context">{'search_default_analytic_account_ids':
|
||||||
[active_id], 'default_analytic_account_ids': active_id}</field>
|
[active_id], 'default_analytic_account_ids': active_id}</field>
|
||||||
<field name="name">Invoices</field>
|
<field name="name">Invoices</field>
|
||||||
<field name="res_model">account.invoice</field>
|
<field name="res_model">account.invoice</field>
|
||||||
<field name="domain">[('analytic_account_ids','=',active_id)]</field>
|
<field name="domain">[('analytic_account_ids','=',active_id)]</field>
|
||||||
<field name="search_view_id" ref="account.view_account_invoice_filter" />
|
<field name="search_view_id" ref="account.view_account_invoice_filter" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_contract_show_invoice_tree" model="ir.actions.act_window.view">
|
<record id="action_contract_show_invoice_tree" model="ir.actions.act_window.view">
|
||||||
<field name="sequence" eval="1"/>
|
<field name="sequence" eval="1"/>
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree</field>
|
||||||
<field name="view_id" ref="account.invoice_tree"/>
|
<field name="view_id" ref="account.invoice_tree"/>
|
||||||
<field name="act_window_id" ref="act_analytic_invoices"/>
|
<field name="act_window_id" ref="act_analytic_invoices"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_contract_show_invoice_form" model="ir.actions.act_window.view">
|
<record id="action_contract_show_invoice_form" model="ir.actions.act_window.view">
|
||||||
<field name="sequence" eval="2"/>
|
<field name="sequence" eval="2"/>
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
<field name="view_id" ref="account.invoice_form"/>
|
<field name="view_id" ref="account.invoice_form"/>
|
||||||
<field name="act_window_id" ref="act_analytic_invoices"/>
|
<field name="act_window_id" ref="act_analytic_invoices"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="account_analytic_account_button_invoice" model="ir.ui.view">
|
<record id="account_analytic_account_button_invoice" model="ir.ui.view">
|
||||||
<field name="name">account.analytic.account.button.invoice
|
<field name="name">account.analytic.account.button.invoice
|
||||||
</field>
|
</field>
|
||||||
<field name="model">account.analytic.account</field>
|
<field name="model">account.analytic.account</field>
|
||||||
<field name="inherit_id" ref="analytic.view_account_analytic_account_form" />
|
<field name="inherit_id" ref="analytic.view_account_analytic_account_form" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr='//div[@name="button_box"]' position='inside'>
|
<xpath expr='//div[@name="button_box"]' position='inside'>
|
||||||
<button class="oe_stat_button" type="action" icon="fa-edit"
|
<button class="oe_stat_button" type="action" icon="fa-edit"
|
||||||
name="%(contract_show_invoice.act_analytic_invoices)d"
|
name="%(contract_show_invoice.act_analytic_invoices)d"
|
||||||
string="Invoices" help="Invoices related with this contract">
|
string="Invoices" help="Invoices related with this contract">
|
||||||
</button>
|
</button>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
</odoo>
|
||||||
</openerp>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user