Merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.1-mrp_group_entries-dev-julio into lp:addons-vauxoo/6.1

Proposed by Julio Serna-http://www.vauxoo.com
Status: Rejected
Rejected by: Moisés López - http://www.vauxoo.com
Proposed branch: lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.1-mrp_group_entries-dev-julio
Merge into: lp:addons-vauxoo/6.1
Diff against target: 278 lines (+243/-0)
6 files modified
mrp_group_entries/__init__.py (+26/-0)
mrp_group_entries/__openerp__.py (+45/-0)
mrp_group_entries/i18n/es_MX.po (+34/-0)
mrp_group_entries/wizard/__init__.py (+26/-0)
mrp_group_entries/wizard/mrp_group_entries.py (+74/-0)
mrp_group_entries/wizard/mrp_group_entries_view.xml (+38/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-6.1-mrp_group_entries-dev-julio
Reviewer Review Type Date Requested Status
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+129052@code.launchpad.net

Description of the change

crea wizard para agrupar las polizas de la produccion

To post a comment you must log in.
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

Reject: Ya fue merged en otro fork

Unmerged revisions

508. By Julio Serna-http://www.vauxoo.com

[IMP][mrp_group_entries] added context in function

507. By Julio Serna-http://www.vauxoo.com

[ADD][mrp_group_entries] added translate to module

506. By Julio Serna-http://www.vauxoo.com

[IMP][mrp_group_entries]

505. By Julio Serna-http://www.vauxoo.com

[

504. By Julio Serna-http://www.vauxoo.com

[INIT] added modules mrp_group_entries

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'mrp_group_entries'
2=== added file 'mrp_group_entries/__init__.py'
3--- mrp_group_entries/__init__.py 1970-01-01 00:00:00 +0000
4+++ mrp_group_entries/__init__.py 2012-10-10 21:48:20 +0000
5@@ -0,0 +1,26 @@
6+# -*- encoding: utf-8 -*-
7+###########################################################################
8+# Module Writen to OpenERP, Open Source Management Solution
9+#
10+# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
11+# All Rights Reserved.
12+# info@vauxoo.com
13+############################################################################
14+# Coded by: julio (julio@vauxoo.com)
15+############################################################################
16+#
17+# This program is free software: you can redistribute it and/or modify
18+# it under the terms of the GNU Affero General Public License as
19+# published by the Free Software Foundation, either version 3 of the
20+# License, or (at your option) any later version.
21+#
22+# This program is distributed in the hope that it will be useful,
23+# but WITHOUT ANY WARRANTY; without even the implied warranty of
24+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25+# GNU Affero General Public License for more details.
26+#
27+# You should have received a copy of the GNU Affero General Public License
28+# along with this program. If not, see <http://www.gnu.org/licenses/>.
29+#
30+##############################################################################
31+import wizard
32
33=== added file 'mrp_group_entries/__openerp__.py'
34--- mrp_group_entries/__openerp__.py 1970-01-01 00:00:00 +0000
35+++ mrp_group_entries/__openerp__.py 2012-10-10 21:48:20 +0000
36@@ -0,0 +1,45 @@
37+# -*- encoding: utf-8 -*-
38+###########################################################################
39+# Module Writen to OpenERP, Open Source Management Solution
40+#
41+# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
42+# All Rights Reserved.
43+# info@vauxoo.com
44+############################################################################
45+# Coded by: julio (julio@vauxoo.com)
46+############################################################################
47+#
48+# This program is free software: you can redistribute it and/or modify
49+# it under the terms of the GNU Affero General Public License as
50+# published by the Free Software Foundation, either version 3 of the
51+# License, or (at your option) any later version.
52+#
53+# This program is distributed in the hope that it will be useful,
54+# but WITHOUT ANY WARRANTY; without even the implied warranty of
55+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+# GNU Affero General Public License for more details.
57+#
58+# You should have received a copy of the GNU Affero General Public License
59+# along with this program. If not, see <http://www.gnu.org/licenses/>.
60+#
61+##############################################################################
62+
63+{
64+ "name": "Group entries of production",
65+ "version": "1.1",
66+ "author" : "Vauxoo",
67+ "category": "Generic Modules/Account",
68+ "website" : "http://www.vauxoo.com/",
69+ "description": """ Add wizard to group entries
70+ """,
71+ 'depends': ['account_relation_move','account_move_group'],
72+ 'init_xml': [],
73+ 'update_xml': [
74+ 'wizard/mrp_group_entries_view.xml',
75+ ],
76+ 'demo_xml': [],
77+ 'test': [],
78+ 'installable': True,
79+ 'active': False,
80+}
81+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
82
83=== added directory 'mrp_group_entries/i18n'
84=== added file 'mrp_group_entries/i18n/es_MX.mo'
85Binary files mrp_group_entries/i18n/es_MX.mo 1970-01-01 00:00:00 +0000 and mrp_group_entries/i18n/es_MX.mo 2012-10-10 21:48:20 +0000 differ
86=== added file 'mrp_group_entries/i18n/es_MX.po'
87--- mrp_group_entries/i18n/es_MX.po 1970-01-01 00:00:00 +0000
88+++ mrp_group_entries/i18n/es_MX.po 2012-10-10 21:48:20 +0000
89@@ -0,0 +1,34 @@
90+# Translation of OpenERP Server.
91+# This file contains the translation of the following modules:
92+# * mrp_group_entries
93+#
94+msgid ""
95+msgstr ""
96+"Project-Id-Version: OpenERP Server 6.1\n"
97+"Report-Msgid-Bugs-To: \n"
98+"POT-Creation-Date: 2012-10-10 16:41+0000\n"
99+"PO-Revision-Date: 2012-10-10 11:48-0600\n"
100+"Last-Translator: julio <julio@vauxoo.com>\n"
101+"Language-Team: \n"
102+"MIME-Version: 1.0\n"
103+"Content-Type: text/plain; charset=UTF-8\n"
104+"Content-Transfer-Encoding: 8bit\n"
105+"Plural-Forms: \n"
106+
107+#. module: mrp_group_entries
108+#: view:mrp.group.entries:0
109+msgid "Cancel"
110+msgstr "Cancelar"
111+
112+#. module: mrp_group_entries
113+#: model:ir.actions.act_window,name:mrp_group_entries.create_group_entries_action
114+#: model:ir.actions.act_window,name:mrp_group_entries.group_entries_wizard
115+#: view:mrp.group.entries:0
116+msgid "Group Entries"
117+msgstr "Agrupar Polizas"
118+
119+#. module: mrp_group_entries
120+#: model:ir.model,name:mrp_group_entries.model_mrp_group_entries
121+msgid "mrp.group.entries"
122+msgstr "mrp.group.entries"
123+
124
125=== added directory 'mrp_group_entries/wizard'
126=== added file 'mrp_group_entries/wizard/__init__.py'
127--- mrp_group_entries/wizard/__init__.py 1970-01-01 00:00:00 +0000
128+++ mrp_group_entries/wizard/__init__.py 2012-10-10 21:48:20 +0000
129@@ -0,0 +1,26 @@
130+# -*- encoding: utf-8 -*-
131+###########################################################################
132+# Module Writen to OpenERP, Open Source Management Solution
133+#
134+# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
135+# All Rights Reserved.
136+# info@vauxoo.com
137+############################################################################
138+# Coded by: julio (julio@vauxoo.com)
139+############################################################################
140+#
141+# This program is free software: you can redistribute it and/or modify
142+# it under the terms of the GNU Affero General Public License as
143+# published by the Free Software Foundation, either version 3 of the
144+# License, or (at your option) any later version.
145+#
146+# This program is distributed in the hope that it will be useful,
147+# but WITHOUT ANY WARRANTY; without even the implied warranty of
148+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149+# GNU Affero General Public License for more details.
150+#
151+# You should have received a copy of the GNU Affero General Public License
152+# along with this program. If not, see <http://www.gnu.org/licenses/>.
153+#
154+##############################################################################
155+import mrp_group_entries
156\ No newline at end of file
157
158=== added file 'mrp_group_entries/wizard/mrp_group_entries.py'
159--- mrp_group_entries/wizard/mrp_group_entries.py 1970-01-01 00:00:00 +0000
160+++ mrp_group_entries/wizard/mrp_group_entries.py 2012-10-10 21:48:20 +0000
161@@ -0,0 +1,74 @@
162+# -*- encoding: utf-8 -*-
163+###########################################################################
164+# Module Writen to OpenERP, Open Source Management Solution
165+#
166+# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
167+# All Rights Reserved.
168+# info@vauxoo.com
169+############################################################################
170+# Coded by: julio (julio@vauxoo.com)
171+############################################################################
172+#
173+# This program is free software: you can redistribute it and/or modify
174+# it under the terms of the GNU Affero General Public License as
175+# published by the Free Software Foundation, either version 3 of the
176+# License, or (at your option) any later version.
177+#
178+# This program is distributed in the hope that it will be useful,
179+# but WITHOUT ANY WARRANTY; without even the implied warranty of
180+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
181+# GNU Affero General Public License for more details.
182+#
183+# You should have received a copy of the GNU Affero General Public License
184+# along with this program. If not, see <http://www.gnu.org/licenses/>.
185+#
186+##############################################################################
187+import time
188+from osv import osv, fields
189+import decimal_precision as dp
190+from tools.translate import _
191+
192+class mrp_group_entries(osv.osv_memory):
193+ _name='mrp.group.entries'
194+
195+ def _get_moves(self, cr, uid, move_ids=[], context=None):
196+ account_move_line = self.pool.get('account.move.line')
197+ res = {}
198+ for move_id in move_ids:
199+ account_move_line_id = account_move_line.search(cr, uid, [('stock_move_id','=',move_id)])
200+ for account_move_id in account_move_line.browse(cr, uid, account_move_line_id):
201+ res.setdefault(account_move_id.move_id.id, 1)
202+ return res
203+
204+ def group_entries(self, cr, uid, ids, context=None):
205+ mrp_production = self.pool.get('mrp.production')
206+ account_move_line = self.pool.get('account.move.line')
207+ if context is None:
208+ context = {}
209+ move_ids = context.get('active_ids', [])
210+
211+ for production in mrp_production.browse(cr, uid, move_ids):
212+ res = self._get_moves(cr, uid, [move_consumed.id for move_consumed in production.move_lines2]+[move_finished.id for move_finished in production.move_created_ids2], context=context)
213+ account_move_line._create_move_group(cr, uid, res.keys(), context=context)
214+ return {}
215+
216+
217+mrp_group_entries()
218+
219+
220+
221+
222+
223+
224+
225+
226+
227+
228+
229+
230+
231+
232+
233+
234+
235+
236
237=== added file 'mrp_group_entries/wizard/mrp_group_entries_view.xml'
238--- mrp_group_entries/wizard/mrp_group_entries_view.xml 1970-01-01 00:00:00 +0000
239+++ mrp_group_entries/wizard/mrp_group_entries_view.xml 2012-10-10 21:48:20 +0000
240@@ -0,0 +1,38 @@
241+<?xml version="1.0" encoding="utf-8"?>
242+<openerp>
243+ <data>
244+
245+ <record id="mrp_group_entries_form" model="ir.ui.view">
246+ <field name="name">mrp.group.entries.form</field>
247+ <field name="model">mrp.group.entries</field>
248+ <field name="type">form</field>
249+ <field name="arch" type="xml">
250+ <form string="Group Entries">
251+ <group colspan="4" width="615" height="80">
252+ <button string="Cancel" icon="gtk-cancel" type="object" special="cancel"/>
253+ <button string="Group Entries" icon="gtk-ok" name="group_entries" type="object"/>
254+ </group>
255+ </form>
256+ </field>
257+ </record>
258+
259+ <act_window id="group_entries_wizard"
260+ name="Group Entries"
261+ src_model="mrp.production"
262+ res_model="mrp.group.entries"
263+ view_mode="form"
264+ target="new"
265+ key2="client_action_multi"
266+ />
267+
268+
269+ <record id="create_group_entries_action" model="ir.actions.act_window">
270+ <field name="name">Group Entries</field>
271+ <field name="res_model">mrp.group.entries</field>
272+ <field name="view_type">form</field>
273+ <field name="view_mode">form</field>
274+ <field name="target">new</field>
275+ </record>
276+
277+ </data>
278+</openerp>