Browse Source
[IMP] - Link invoice line to contract lines
[IMP] - Link invoice line to contract lines
[IMP] - Add index on contract line [IMP] - Add is_suspended flag and _search_state [IMP] - Add is_suspended flag to stop contract linepull/207/head
sbejaoui
6 years ago
12 changed files with 240 additions and 117 deletions
-
1contract/__manifest__.py
-
3contract/migrations/12.0.2.0.0/pre-migration.py
-
1contract/models/__init__.py
-
5contract/models/account_invoice.py
-
12contract/models/account_invoice_line.py
-
41contract/models/contract.py
-
165contract/models/contract_line.py
-
60contract/tests/test_contract.py
-
44contract/views/account_invoice_view.xml
-
18contract/views/contract.xml
-
6contract/wizards/contract_line_wizard.py
-
1contract/wizards/contract_line_wizard.xml
@ -0,0 +1,12 @@ |
|||
# Copyright 2018 ACSONE SA/NV. |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
from odoo import fields, models |
|||
|
|||
|
|||
class AccountInvoiceLine(models.Model): |
|||
_inherit = 'account.invoice.line' |
|||
|
|||
contract_line_id = fields.Many2one( |
|||
'account.analytic.invoice.line', string='Contract Line', index=True |
|||
) |
@ -1,44 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="view_account_invoice_filter_contract" model="ir.ui.view"> |
|||
<field name="name">account.invoice.select.contract</field> |
|||
<field name="model">account.invoice</field> |
|||
<field name="inherit_id" ref="account.view_account_invoice_filter"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="date" position="after"> |
|||
<separator/> |
|||
<field name="contract_id"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="act_recurring_invoices" model="ir.actions.act_window"> |
|||
<field name="name">Invoices</field> |
|||
<field name="res_model">account.invoice</field> |
|||
<field name="view_ids" |
|||
eval="[(5, 0, 0), |
|||
(0, 0, {'view_mode': 'tree', 'view_id': ref('account.invoice_tree')}), |
|||
(0, 0, {'view_mode': 'form', 'view_id': ref('account.invoice_form')})]"/> |
|||
<field name="context">{ |
|||
'search_default_contract_id': [active_id], |
|||
'default_contract_id': active_id} |
|||
</field> |
|||
<field name="domain">[('type','in', ['out_invoice', 'out_refund'])]</field> |
|||
</record> |
|||
|
|||
<record id="act_purchase_recurring_invoices" model="ir.actions.act_window"> |
|||
<field name="name">Vendor Bills</field> |
|||
<field name="res_model">account.invoice</field> |
|||
<field name="view_ids" |
|||
eval="[(5, 0, 0), |
|||
(0, 0, {'view_mode': 'tree', 'view_id': ref('account.invoice_supplier_tree')}), |
|||
(0, 0, {'view_mode': 'form', 'view_id': ref('account.invoice_supplier_form')})]"/> |
|||
<field name="context">{ |
|||
'search_default_contract_id': [active_id], |
|||
'default_contract_id': active_id} |
|||
</field> |
|||
<field name="domain">[('type','in', ['in_invoice', 'in_refund'])]</field> |
|||
</record> |
|||
|
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue