Browse Source

[MIG] contract: Migration to version 11.0

pull/121/head
Fekete Mihai 7 years ago
committed by Pedro M. Baeza
parent
commit
76f10fd8e2
  1. 1
      contract/__init__.py
  2. 3
      contract/__manifest__.py
  3. 8
      contract/data/contract_cron.xml
  4. 1
      contract/models/__init__.py
  5. 3
      contract/models/account_analytic_account.py
  6. 1
      contract/models/account_analytic_contract.py
  7. 2
      contract/models/account_analytic_contract_line.py
  8. 1
      contract/models/account_analytic_invoice_line.py
  9. 1
      contract/models/account_invoice.py
  10. 1
      contract/models/res_partner.py
  11. 1
      contract/tests/__init__.py
  12. 1
      contract/tests/test_contract.py

1
contract/__init__.py

@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import models

3
contract/__manifest__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2004-2010 OpenERP SA
# Copyright 2014-2017 Tecnativa - Pedro M. Baeza
# Copyright 2015 Domatix
@ -9,7 +8,7 @@
{
'name': 'Contracts Management - Recurring',
'version': '10.0.3.1.0',
'version': '11.0.1.0.0',
'category': 'Contract Management',
'license': 'AGPL-3',
'author': "OpenERP SA, "

8
contract/data/contract_cron.xml

@ -3,12 +3,14 @@
<record model="ir.cron" id="account_analytic_cron_for_invoice">
<field name="name">Generate Recurring Invoices from Contracts</field>
<field name="model_id" ref="analytic.model_account_analytic_account"/>
<field name="state">code</field>
<field name="code">model.cron_recurring_create_invoice()</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="model" eval="'account.analytic.account'"/>
<field name="function" eval="'cron_recurring_create_invoice'"/>
<field name="args" eval="'()'"/>
<field eval="False" name="doall" />
</record>
</odoo>

1
contract/models/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import account_analytic_contract

3
contract/models/account_analytic_account.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2004-2010 OpenERP SA
# Copyright 2014 Angel Moya <angel.moya@domatix.com>
# Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
@ -64,7 +63,7 @@ class AccountAnalyticAccount(models.Model):
contract = self.contract_template_id
for field_name, field in contract._fields.iteritems():
for field_name, field in contract._fields.items():
if field.name == 'recurring_invoice_line_ids':
lines = self._convert_contract_lines(contract)

1
contract/models/account_analytic_contract.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2004-2010 OpenERP SA
# © 2014 Angel Moya <angel.moya@domatix.com>
# © 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>

2
contract/models/account_analytic_contract_line.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@ -6,7 +5,6 @@ from odoo import fields, models
class AccountAnalyticContractLine(models.Model):
_name = 'account.analytic.contract.line'
_description = 'Contract Lines'
_inherit = 'account.analytic.invoice.line'

1
contract/models/account_analytic_invoice_line.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2004-2010 OpenERP SA
# © 2014 Angel Moya <angel.moya@domatix.com>
# © 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>

1
contract/models/account_invoice.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
contract/models/res_partner.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
contract/tests/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
contract/tests/test_contract.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Tecnativa - Carlos Dauden
# Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

Loading…
Cancel
Save