Merge lp:~domsense/domsense-agilebg-addons/adding_account_analytic_distribution_menu into lp:domsense-agilebg-addons/6.0

Proposed by Leonardo Pistone
Status: Merged
Merged at revision: 128
Proposed branch: lp:~domsense/domsense-agilebg-addons/adding_account_analytic_distribution_menu
Merge into: lp:domsense-agilebg-addons/6.0
Diff against target: 179 lines (+154/-0)
5 files modified
account_analytic_distribution_menu/AUTHORS.txt (+2/-0)
account_analytic_distribution_menu/__init__.py (+22/-0)
account_analytic_distribution_menu/__openerp__.py (+43/-0)
account_analytic_distribution_menu/account_analytic_plans.py (+37/-0)
account_analytic_distribution_menu/account_distribution.xml (+50/-0)
To merge this branch: bzr merge lp:~domsense/domsense-agilebg-addons/adding_account_analytic_distribution_menu
Reviewer Review Type Date Requested Status
Agile Business Group Pending
Review via email: mp+88338@code.launchpad.net
To post a comment you must log in.
120. By Lorenzo Battistini

[FIX] duplicating instances

121. By Lorenzo Battistini

[FIX] handling general cases

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'account_analytic_distribution_menu'
=== added file 'account_analytic_distribution_menu/AUTHORS.txt'
--- account_analytic_distribution_menu/AUTHORS.txt 1970-01-01 00:00:00 +0000
+++ account_analytic_distribution_menu/AUTHORS.txt 2012-01-16 18:10:27 +0000
@@ -0,0 +1,2 @@
1Leonardo Pistone <leonardo.pistone@domsense.com>
2Lorenzo Battistini <lorenzo.battistini@domsense.com>
03
=== added file 'account_analytic_distribution_menu/__init__.py'
--- account_analytic_distribution_menu/__init__.py 1970-01-01 00:00:00 +0000
+++ account_analytic_distribution_menu/__init__.py 2012-01-16 18:10:27 +0000
@@ -0,0 +1,22 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
5# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
6# All Rights Reserved
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as published
10# by the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22import account_analytic_plans
023
=== added file 'account_analytic_distribution_menu/__openerp__.py'
--- account_analytic_distribution_menu/__openerp__.py 1970-01-01 00:00:00 +0000
+++ account_analytic_distribution_menu/__openerp__.py 2012-01-16 18:10:27 +0000
@@ -0,0 +1,43 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
5# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
6# All Rights Reserved
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as published
10# by the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22{
23 'name': "Account Analytic Distribution Menu",
24 'version': '0.1',
25 'category' : 'Accounting & Finance',
26 'complexity': "easy",
27 'description': """
28Account Analytic Distribution Menu
29
30This little module adds a menuitem to see all the analytic distributions
31in the system""",
32 'author': 'Agile Business Group & Domsense',
33 'website': 'http://www.agilebg.com',
34 'license': 'AGPL-3',
35 "depends" : ['account_analytic_plans'],
36 "init_xml" : [],
37 "update_xml" : [
38 'account_distribution.xml',
39 ],
40 "demo_xml" : [],
41 "active": False,
42 "installable": True
43}
044
=== added file 'account_analytic_distribution_menu/account_analytic_plans.py'
--- account_analytic_distribution_menu/account_analytic_plans.py 1970-01-01 00:00:00 +0000
+++ account_analytic_distribution_menu/account_analytic_plans.py 2012-01-16 18:10:27 +0000
@@ -0,0 +1,37 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
5# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
6# All Rights Reserved
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as published
10# by the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23from osv import fields, osv
24
25class account_analytic_plan_instance(osv.osv):
26
27 _inherit = "account.analytic.plan.instance"
28
29 def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
30 if context is None:
31 context = {}
32 this = self.browse(cr, uid, ids[0], context=context)
33 if this.plan_id and not vals.has_key('plan_id'):
34 vals['plan_id'] = this.plan_id.id
35 return super(account_analytic_plan_instance, self).write(cr, uid, ids, vals, context=context)
36
37account_analytic_plan_instance()
038
=== added file 'account_analytic_distribution_menu/account_distribution.xml'
--- account_analytic_distribution_menu/account_distribution.xml 1970-01-01 00:00:00 +0000
+++ account_analytic_distribution_menu/account_distribution.xml 2012-01-16 18:10:27 +0000
@@ -0,0 +1,50 @@
1<?xml version="1.0"?>
2<openerp>
3<data>
4
5 <record model="ir.ui.view" id="account_analytic_plan_instance_form">
6 <field name="name">account.analytic.plan.instance.form</field>
7 <field name="model">account.analytic.plan.instance</field>
8 <field name="type">form</field>
9 <field name="inherit_id" ref="account_analytic_plans.account_analytic_plan_instance_form"></field>
10 <field name="arch" type="xml">
11 <field name="account_ids" nolabel="1" colspan="4" position="replace">
12 <field name="account_ids" nolabel="1" colspan="4" />
13 </field>
14 </field>
15 </record>
16
17 <record model="ir.ui.view" id="account_analytic_plan_instance_line_form">
18 <field name="name">account.analytic.plan.instance.line.form</field>
19 <field name="model">account.analytic.plan.instance.line</field>
20 <field name="type">form</field>
21 <field name="inherit_id" ref="account_analytic_plans.account_analytic_plan_instance_line_form"></field>
22 <field name="arch" type="xml">
23 <field name="plan_id" position="replace"/>
24 </field>
25 </record>
26
27 <record model="ir.ui.view" id="account_analytic_plan_instance_line_tree">
28 <field name="name">account.analytic.plan.instance.line.tree</field>
29 <field name="model">account.analytic.plan.instance.line</field>
30 <field name="inherit_id" ref="account_analytic_plans.account_analytic_plan_instance_line_tree"></field>
31 <field name="type">tree</field>
32 <field name="arch" type="xml">
33 <field name="plan_id" position="replace"/>
34 </field>
35 </record>
36
37 <record model="ir.actions.act_window" id="account_analytic_plan_instance_action">
38 <field name="name">Analytic Distribution's Models</field>
39 <field name="type">ir.actions.act_window</field>
40 <field name="res_model">account.analytic.plan.instance</field>
41 <field name="view_type">form</field>
42 <field name="view_mode">tree,form</field>
43 </record>
44
45 <menuitem
46 parent="account_analytic_plans.menu_account_analytic_multi_plan_action"
47 id="menu_account_analytic_plan_instance"
48 action="account_analytic_plan_instance_action"/>
49</data>
50</openerp>

Subscribers

People subscribed via source and target branches

to status/vote changes: