Henrik Norlin
5 years ago
15 changed files with 170 additions and 167 deletions
-
1contract_payment_auto/README.rst
-
2contract_payment_auto/__init__.py
-
6contract_payment_auto/__manifest__.py
-
7contract_payment_auto/data/ir_cron_data.xml
-
5contract_payment_auto/models/__init__.py
-
9contract_payment_auto/models/abstract_contract.py
-
1contract_payment_auto/models/account_invoice.py
-
23contract_payment_auto/models/contract.py
-
1contract_payment_auto/models/res_partner.py
-
5contract_payment_auto/tests/__init__.py
-
178contract_payment_auto/tests/test_contract.py
-
7contract_payment_auto/tests/test_contract_template.py
-
44contract_payment_auto/views/account_analytic_account_view.xml
-
8contract_payment_auto/views/contract_template_view.xml
-
40contract_payment_auto/views/contract_view.xml
@ -1,5 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2017 LasLabs Inc. |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import models |
|||
from . import tests |
@ -1,8 +1,7 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2017 LasLabs Inc. |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import account_analytic_account |
|||
from . import account_analytic_contract |
|||
from . import abstract_contract |
|||
from . import account_invoice |
|||
from . import contract |
|||
from . import res_partner |
@ -1,6 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2017 LasLabs Inc. |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import test_account_analytic_account |
|||
from . import test_account_analytic_contract |
|||
from . import test_contract |
|||
from . import test_contract_template |
@ -1,15 +1,14 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2017 LasLabs Inc. |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from odoo.tests.common import TransactionCase |
|||
|
|||
|
|||
class TestAccountAnalyticContract(TransactionCase): |
|||
class TestContractTemplate(TransactionCase): |
|||
|
|||
def setUp(self): |
|||
super(TestAccountAnalyticContract, self).setUp() |
|||
self.Model = self.env['account.analytic.contract'] |
|||
super(TestContractTemplate, self).setUp() |
|||
self.Model = self.env['contract.template'] |
|||
|
|||
def test_default_invoice_mail_template_id(self): |
|||
""" It should return a mail template associated with invoice. """ |
@ -1,44 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<!-- |
|||
Copyright 2017 LasLabs Inc. |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
--> |
|||
|
|||
<odoo> |
|||
|
|||
<record id="account_analytic_account_recurring_form_form" model="ir.ui.view"> |
|||
<field name="name">Contract Auto Pay</field> |
|||
<field name="model">account.analytic.account</field> |
|||
<field name="inherit_id" ref="contract.account_analytic_account_recurring_form_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//button[@name='contract.act_recurring_invoices']" position="after"> |
|||
<br attrs="{'invisible': [('recurring_invoices','!=',True)]}" /> |
|||
<field name="is_auto_pay" |
|||
class="oe_inline" |
|||
attrs="{'invisible': [('recurring_invoices','!=',True)]}" |
|||
/> |
|||
<label for="is_auto_pay" |
|||
attrs="{'invisible': [('recurring_invoices','!=',True)]}" |
|||
/> |
|||
</xpath> |
|||
<xpath expr="//label[@for='recurring_invoice_line_ids']" position="before"> |
|||
<group name="group_auto_pay" |
|||
attrs="{'invisible': [('is_auto_pay', '=', False)]}" |
|||
> |
|||
<group> |
|||
<field name="payment_token_id" /> |
|||
<field name="invoice_mail_template_id" /> |
|||
<field name="pay_retry_mail_template_id" /> |
|||
</group> |
|||
<group> |
|||
<field name="pay_fail_mail_template_id" /> |
|||
<field name="auto_pay_retries" /> |
|||
<field name="auto_pay_retry_hours" /> |
|||
</group> |
|||
</group> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,40 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<!-- |
|||
Copyright 2017 LasLabs Inc. |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
--> |
|||
|
|||
<odoo> |
|||
|
|||
<record id="contract_contract_form_view" model="ir.ui.view"> |
|||
<field name="name">Contract Auto Pay</field> |
|||
<field name="model">contract.contract</field> |
|||
<field name="inherit_id" ref="contract.contract_contract_customer_form_view"/> |
|||
<field name="arch" type="xml"> |
|||
|
|||
<page name="info" position="before"> |
|||
<page name="autopay" string="Auto Pay"> |
|||
<group> |
|||
<field name="is_auto_pay"/> |
|||
</group> |
|||
<group name="group_auto_pay" |
|||
attrs="{'invisible': [('is_auto_pay', '=', False)]}" |
|||
> |
|||
<group> |
|||
<field name="payment_token_id" /> |
|||
<field name="invoice_mail_template_id" /> |
|||
<field name="pay_retry_mail_template_id" /> |
|||
</group> |
|||
<group> |
|||
<field name="pay_fail_mail_template_id" /> |
|||
<field name="auto_pay_retries" /> |
|||
<field name="auto_pay_retry_hours" /> |
|||
</group> |
|||
</group> |
|||
</page> |
|||
</page> |
|||
</field> |
|||
</record> |
|||
|
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue