Skip to content

Commit

Permalink
[MIG] Migration of account_analytic_project to version 10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienpeiffer committed Jul 28, 2017
1 parent 6411927 commit 9010279
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 44 deletions.
4 changes: 2 additions & 2 deletions account_analytic_project/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Usage

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/87/8.0
:target: https://runbot.odoo-community.org/runbot/87/10.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/account-analytic/issues/new?body=module:%20account_analytic_project%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`here <https://github.com/OCA/account-analytic/issues/new?body=module:%20account_analytic_project%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Project and analytic account integration',
'version': '8.0.1.0.0',
'version': '10.0.1.0.0',
'author': 'Therp BV,Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'Generic Modules/Accounting',
Expand Down
2 changes: 1 addition & 1 deletion account_analytic_project/model/account_analytic_account.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# © 2015 Therp BV (http://therp.nl).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import _, api, fields, models
from odoo import _, api, fields, models


class AccountAnalyticAccount(models.Model):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# © 2015 Therp BV (http://therp.nl).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
from odoo.tests.common import TransactionCase


class TestAccountAnalyticProject(TransactionCase):
Expand Down
73 changes: 34 additions & 39 deletions account_analytic_project/view/account_analytic_account.xml
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_analytic_account_form" model="ir.ui.view">
<field name="name">account.analytic.account.form.add_project_button</field>
<field name="model">account.analytic.account</field>
<field
name="inherit_id"
ref="analytic.view_account_analytic_account_form"
/>
<field name="arch" type="xml">
<div name="buttons" position="inside">
<field name="project_ids" invisible="1" />
<button
name="create_project_for_account"
type="object"
class="oe_stat_button"
icon="fa-plus"
string="Create project"
attrs="{'invisible': [
'|', ('project_ids', '!=', []),
('type', '=', 'view'),
]}"
/>
<button
name="view_projects_for_account"
type="object"
class="oe_stat_button"
icon="fa-tasks"
string="View projects"
attrs="{'invisible': [
'|', ('project_ids', '=', []),
('type', '=', 'view'),
]}"
/>
</div>
</field>
</record>
</data>
</openerp>
<odoo>
<record id="account_analytic_account_form" model="ir.ui.view">
<field name="name">account.analytic.account.form.add_project_button</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form" />
<field name="arch" type="xml">
<div name="button_box" position="inside">
<field name="project_ids" invisible="1" />
<button
name="create_project_for_account"
type="object"
class="oe_stat_button"
icon="fa-plus"
string="Create project"
attrs="{'invisible': [
'|', ('project_ids', '!=', []),
('type', '=', 'view'),
]}"
/>
<button
name="view_projects_for_account"
type="object"
class="oe_stat_button"
icon="fa-tasks"
string="View projects"
attrs="{'invisible': [
'|', ('project_ids', '=', []),
('type', '=', 'view'),
]}"
/>
</div>
</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions setup/account_analytic_project/.eggs/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.

This directory caches those eggs to prevent repeated downloads.

However, it is safe to delete this directory.

1 change: 1 addition & 0 deletions setup/account_analytic_project/odoo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
1 change: 1 addition & 0 deletions setup/account_analytic_project/odoo/addons/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
6 changes: 6 additions & 0 deletions setup/account_analytic_project/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 9010279

Please sign in to comment.