Merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.1-group_analytic_dev_carlos into lp:addons-vauxoo/6.1

Proposed by Juan Carlos Hernandez
Status: Merged
Merged at revision: 561
Proposed branch: lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.1-group_analytic_dev_carlos
Merge into: lp:addons-vauxoo/6.1
Diff against target: 150 lines (+130/-0)
4 files modified
account_move_line_group_analytic/__init__.py (+23/-0)
account_move_line_group_analytic/__openerp__.py (+41/-0)
account_move_line_group_analytic/account_move_line.py (+47/-0)
account_move_line_group_analytic/account_move_line.xml (+19/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.1-group_analytic_dev_carlos
Reviewer Review Type Date Requested Status
Isaac López Zúñiga Pending
Rodolfo Lopez Pending
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+131986@code.launchpad.net

Description of the change

Se agrupo en la vista account.move.line por cuenta analítica, product_id, move_id

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'account_move_line_group_analytic'
2=== added file 'account_move_line_group_analytic/__init__.py'
3--- account_move_line_group_analytic/__init__.py 1970-01-01 00:00:00 +0000
4+++ account_move_line_group_analytic/__init__.py 2012-10-29 22:30:28 +0000
5@@ -0,0 +1,23 @@
6+#!/usr/bin/python
7+# -*- encoding: utf-8 -*-
8+###########################################################################
9+# Module Writen to OpenERP, Open Source Management Solution
10+# Copyright (C) Vauxoo (<http://vauxoo.com>).
11+# All Rights Reserved
12+###############Credits######################################################
13+# Coded by: Juan Carlos Funes(juan@vauxoo.com)
14+#############################################################################
15+# This program is free software: you can redistribute it and/or modify
16+# it under the terms of the GNU Affero General Public License as published by
17+# the Free Software Foundation, either version 3 of the License, or
18+# (at your option) any later version.
19+#
20+# This program is distributed in the hope that it will be useful,
21+# but WITHOUT ANY WARRANTY; without even the implied warranty of
22+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+# GNU Affero General Public License for more details.
24+#
25+# You should have received a copy of the GNU Affero General Public License
26+# along with this program. If not, see <http://www.gnu.org/licenses/>.
27+################################################################################
28+import account_move_line
29
30=== added file 'account_move_line_group_analytic/__openerp__.py'
31--- account_move_line_group_analytic/__openerp__.py 1970-01-01 00:00:00 +0000
32+++ account_move_line_group_analytic/__openerp__.py 2012-10-29 22:30:28 +0000
33@@ -0,0 +1,41 @@
34+#!/usr/bin/python
35+# -*- encoding: utf-8 -*-
36+###########################################################################
37+# Module Writen to OpenERP, Open Source Management Solution
38+# Copyright (C) Vauxoo (<http://vauxoo.com>).
39+# All Rights Reserved
40+###############Credits######################################################
41+# Coded by: Juan Carlos Funes(juan@vauxoo.com)
42+#############################################################################
43+# This program is free software: you can redistribute it and/or modify
44+# it under the terms of the GNU Affero General Public License as published by
45+# the Free Software Foundation, either version 3 of the License, or
46+# (at your option) any later version.
47+#
48+# This program is distributed in the hope that it will be useful,
49+# but WITHOUT ANY WARRANTY; without even the implied warranty of
50+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51+# GNU Affero General Public License for more details.
52+#
53+# You should have received a copy of the GNU Affero General Public License
54+# along with this program. If not, see <http://www.gnu.org/licenses/>.
55+################################################################################
56+{
57+ "name" : "Grouped by product,move_id y analytic in model account_move_line",
58+ "version" : "1.0",
59+ "depends" : ['account'],
60+ "author" : "Vauxoo",
61+ #"license" : "AGPL-3",
62+ "description" : """This module Grouped by product,move_id y analytic in model account_move_line
63+ """,
64+ "website" : "http://vauxoo.com",
65+ "category" : "Generic Modules",
66+ "init_xml" : [],
67+ "demo_xml" : [],
68+ "test": [],
69+ "update_xml" : ['account_move_line.xml',
70+ ],
71+ "active": False,
72+ "installable": True,
73+}
74+
75
76=== added file 'account_move_line_group_analytic/account_move_line.py'
77--- account_move_line_group_analytic/account_move_line.py 1970-01-01 00:00:00 +0000
78+++ account_move_line_group_analytic/account_move_line.py 2012-10-29 22:30:28 +0000
79@@ -0,0 +1,47 @@
80+#!/usr/bin/python
81+# -*- encoding: utf-8 -*-
82+###########################################################################
83+# Module Writen to OpenERP, Open Source Management Solution
84+# Copyright (C) Vauxoo (<http://vauxoo.com>).
85+# All Rights Reserved
86+###############Credits######################################################
87+# Coded by: Juan Carlos Funes(juan@vauxoo.com)
88+#############################################################################
89+# This program is free software: you can redistribute it and/or modify
90+# it under the terms of the GNU Affero General Public License as published by
91+# the Free Software Foundation, either version 3 of the License, or
92+# (at your option) any later version.
93+#
94+# This program is distributed in the hope that it will be useful,
95+# but WITHOUT ANY WARRANTY; without even the implied warranty of
96+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
97+# GNU Affero General Public License for more details.
98+#
99+# You should have received a copy of the GNU Affero General Public License
100+# along with this program. If not, see <http://www.gnu.org/licenses/>.
101+################################################################################
102+
103+from osv import osv, fields, orm
104+from lxml import etree
105+import tools
106+
107+class account_move_line(osv.osv):
108+ _inherit = 'account.move.line'
109+ _columns = {
110+
111+ }
112+
113+ def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
114+ result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
115+ #fields_get = self.fields_get(cr, uid, ['stock_move_id'], context)
116+ xml_form = etree.fromstring(result['arch'])
117+ placeholder = xml_form.xpath("//field[@name='period_id']")
118+ placeholder[0].addnext(etree.Element('field', {'name': 'product_id'}))
119+ result['arch'] = etree.tostring(xml_form)
120+ result['fields'].update({
121+ 'product_id':{'domain': [], 'string': u'Product', 'readonly': False, 'relation': 'product.product', 'context': {}, 'selectable': True, 'type': 'many2one', 'select': 2}
122+ })
123+ return result
124+
125+account_move_line()
126+
127
128=== added file 'account_move_line_group_analytic/account_move_line.xml'
129--- account_move_line_group_analytic/account_move_line.xml 1970-01-01 00:00:00 +0000
130+++ account_move_line_group_analytic/account_move_line.xml 2012-10-29 22:30:28 +0000
131@@ -0,0 +1,19 @@
132+<?xml version="1.0" encoding="utf-8"?>
133+<openerp>
134+ <data>
135+ <record id="view_account_move_line_group_production_stock_move" model="ir.ui.view">
136+ <field name="name">account.move.line.group.production.stock.move</field>
137+ <field name="model">account.move.line</field>
138+ <field name="type">search</field>
139+ <field name="inherit_id" ref="account.view_account_move_line_filter"/>
140+ <field name="arch" type="xml">
141+ <xpath expr="/search/group[@string='Group By...']/filter[@string='Period']" position="after">
142+ <filter string="Analytic" icon="terp-folder-green" domain="[]" context="{'group_by':'analytic_account_id'}"/>
143+ <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
144+ <filter string="Poliza" icon="terp-folder-blue" domain="[]" context="{'group_by':'move_id'}"/>
145+ </xpath>
146+ </field>
147+ </record>
148+
149+ </data>
150+</openerp>