Merge lp:~juan-pimentel/openerp-venezuela-localization/juan-pimentel_openerp-venezuela-localization_bug919314 into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk

Proposed by Juan José Pimentel (Digisolution)
Status: Merged
Merged at revision: 584
Proposed branch: lp:~juan-pimentel/openerp-venezuela-localization/juan-pimentel_openerp-venezuela-localization_bug919314
Merge into: lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
Diff against target: 405 lines (+177/-126)
8 files modified
l10n_ve_fiscal_reports/__openerp__.py (+1/-0)
l10n_ve_fiscal_reports/fiscal_report_wizard.xml (+0/-15)
l10n_ve_fiscal_reports/i18n/es.po (+35/-14)
l10n_ve_fiscal_reports/i18n/es_ES.po (+37/-13)
l10n_ve_fiscal_reports/wizard/__init__.py (+1/-1)
l10n_ve_fiscal_reports/wizard/wh_book_wizard.py (+69/-0)
l10n_ve_fiscal_reports/wizard/wh_book_wizard_view.xml (+34/-0)
l10n_ve_fiscal_reports/wizard/wiz_book.py (+0/-83)
To merge this branch: bzr merge lp:~juan-pimentel/openerp-venezuela-localization/juan-pimentel_openerp-venezuela-localization_bug919314
Reviewer Review Type Date Requested Status
Javier Duran (community) Approve
Gabriela Quilarque Pending
Review via email: mp+90280@code.launchpad.net

Description of the change

In order to fix this bug, witholding book wizard have been changed from wizard.interface to osv_memory.

To post a comment you must log in.
566. By Juan José Pimentel (Digisolution)

[REM] removed old wizards style file wiz_book.py

Revision history for this message
Javier Duran (javieredm) wrote :

Unidoo a la rama principal:

revno: 584 [merge]
revision-id: javier@squezee-vir-20120127194548-kma9e2nzhqdyb5mm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ve_fiscal_reports/__openerp__.py'
2--- l10n_ve_fiscal_reports/__openerp__.py 2011-12-29 22:13:12 +0000
3+++ l10n_ve_fiscal_reports/__openerp__.py 2012-01-27 16:30:42 +0000
4@@ -58,6 +58,7 @@
5 "fiscal_report_report.xml",
6 "fiscal_report_wizard.xml",
7 "wizard/sales_book_wizard_view.xml",
8+ "wizard/wh_book_wizard_view.xml",
9 "invoice_view.xml",
10 "adjustment_book.xml",
11 ],
12
13=== modified file 'l10n_ve_fiscal_reports/fiscal_report_wizard.xml'
14--- l10n_ve_fiscal_reports/fiscal_report_wizard.xml 2011-12-29 04:02:48 +0000
15+++ l10n_ve_fiscal_reports/fiscal_report_wizard.xml 2012-01-27 16:30:42 +0000
16@@ -2,21 +2,6 @@
17 <openerp>
18 <data>
19
20- <wizard
21- id="wizard_wh_book"
22- model="fiscal.reports.whp"
23- name="fiscal.reports.whp.wh_book"
24- string="Witholding Book"/>
25-
26- <menuitem
27- name="Print Report Witholding Sales or Purchase"
28- parent="l10n_ve_fiscal_reports.menu_fr_main"
29- action="wizard_wh_book"
30- type="wizard"
31- icon="STOCK_PRINT"
32- id="menu_wizard_wh_book_report"
33- groups="account.group_account_manager"
34- sequence="50"/>
35
36 <wizard
37 id="wizard_recalc_taxes"
38
39=== modified file 'l10n_ve_fiscal_reports/i18n/es.po'
40--- l10n_ve_fiscal_reports/i18n/es.po 2012-01-05 17:04:56 +0000
41+++ l10n_ve_fiscal_reports/i18n/es.po 2012-01-27 16:30:42 +0000
42@@ -573,11 +573,6 @@
43 msgstr "Correspodiente al Mes de"
44
45 #. module: l10n_ve_fiscal_reports
46-#: selection:fiscal.reports.whp.wh_book_HG,init,model:0
47-msgid "Witholding Purchase"
48-msgstr "Retención Compra"
49-
50-#. module: l10n_ve_fiscal_reports
51 #: model:ir.module.module,description:l10n_ve_fiscal_reports.module_meta_information
52 msgid "\n"
53 " What this module does:\n"
54@@ -605,11 +600,7 @@
55 msgid "Date"
56 msgstr "Fecha"
57
58-#. module: l10n_ve_fiscal_reports
59-#: code:addons/l10n_ve_fiscal_reports/wizard/sales_book_wizard.py:0
60-#, python-format
61-msgid "No period defined for this date !\nPlease create a fiscal year."
62-msgstr "No period defined for this date !\nPlease create a fiscal year."
63+
64
65 #. module: l10n_ve_fiscal_reports
66 #: rml:fiscal.reports.whp.whp_seniat_HG:0
67@@ -939,10 +930,6 @@
68 msgid "sales.book.wizard"
69 msgstr "sales.book.wizard"
70
71-#. module: l10n_ve_fiscal_reports
72-#: selection:fiscal.reports.whp.wh_book_HG,init,model:0
73-msgid "Witholding Sales"
74-msgstr "Retención Ventas"
75
76 #. module: l10n_ve_fiscal_reports
77 #: model:ir.actions.wizard,name:l10n_ve_fiscal_reports.wizard_sale_purchase_book
78@@ -986,3 +973,37 @@
79 msgid "Recompute Taxes."
80 msgstr "Recalcule Impuestos."
81
82+#. module: l10n_ve_fiscal_reports
83+#: field:fiscal.reports.purchase,ar_date_document:0
84+#: field:fiscal.reports.sale,ar_date_document:0
85+#: field:fiscal.reports.whp,ar_date_document:0
86+#: field:fiscal.reports.whs,ar_date_document:0
87+msgid "Date Account Retencion"
88+msgstr "Fecha Contable de la Retencion"
89+
90+#. module: l10n_ve_fiscal_reports
91+#: code:addons/l10n_ve_fiscal_reports/wizard/wh_book_wizard.py:45
92+#: selection:wh.book.wizard,model:0
93+#, python-format
94+msgid "Witholding Purchase"
95+msgstr "Retenciones en Compras"
96+
97+#. module: l10n_ve_fiscal_reports
98+#: sql_constraint:adjustment.book:0
99+msgid "The period and type combination must be unique!"
100+msgstr "El periodo y el tipo deben ser unicos"
101+
102+#. module: l10n_ve_fiscal_reports
103+#: code:addons/l10n_ve_fiscal_reports/wizard/sales_book_wizard.py:46
104+#, python-format
105+msgid "No period defined for this date !\n"
106+"Please create a fiscal year."
107+msgstr "No se han definido periodos para esta fecha!\n"
108+
109+#. module: l10n_ve_fiscal_reports
110+#: code:addons/l10n_ve_fiscal_reports/wizard/wh_book_wizard.py:46
111+#: selection:wh.book.wizard,model:0
112+#, python-format
113+msgid "Witholding Sales"
114+msgstr "Retenciones en Ventas"
115+
116
117=== modified file 'l10n_ve_fiscal_reports/i18n/es_ES.po'
118--- l10n_ve_fiscal_reports/i18n/es_ES.po 2011-12-29 04:02:48 +0000
119+++ l10n_ve_fiscal_reports/i18n/es_ES.po 2012-01-27 16:30:42 +0000
120@@ -572,10 +572,7 @@
121 msgid "Correspodiente al Mes de"
122 msgstr "Correspodiente al Mes de"
123
124-#. module: l10n_ve_fiscal_reports
125-#: selection:fiscal.reports.whp.wh_book_HG,init,model:0
126-msgid "Witholding Purchase"
127-msgstr "Retención Compra"
128+
129
130 #. module: l10n_ve_fiscal_reports
131 #: model:ir.module.module,description:l10n_ve_fiscal_reports.module_meta_information
132@@ -605,11 +602,6 @@
133 msgid "Date"
134 msgstr "Fecha"
135
136-#. module: l10n_ve_fiscal_reports
137-#: code:addons/l10n_ve_fiscal_reports/wizard/sales_book_wizard.py:0
138-#, python-format
139-msgid "No period defined for this date !\nPlease create a fiscal year."
140-msgstr "No period defined for this date !\nPlease create a fiscal year."
141
142 #. module: l10n_ve_fiscal_reports
143 #: rml:fiscal.reports.whp.whp_seniat_HG:0
144@@ -939,10 +931,7 @@
145 msgid "sales.book.wizard"
146 msgstr "sales.book.wizard"
147
148-#. module: l10n_ve_fiscal_reports
149-#: selection:fiscal.reports.whp.wh_book_HG,init,model:0
150-msgid "Witholding Sales"
151-msgstr "Retención Ventas"
152+
153
154 #. module: l10n_ve_fiscal_reports
155 #: model:ir.actions.wizard,name:l10n_ve_fiscal_reports.wizard_sale_purchase_book
156@@ -986,3 +975,38 @@
157 msgid "Recompute Taxes."
158 msgstr "Recalcule Impuestos."
159
160+#. module: l10n_ve_fiscal_reports
161+#: field:fiscal.reports.purchase,ar_date_document:0
162+#: field:fiscal.reports.sale,ar_date_document:0
163+#: field:fiscal.reports.whp,ar_date_document:0
164+#: field:fiscal.reports.whs,ar_date_document:0
165+msgid "Date Account Retencion"
166+msgstr "Fecha Contable de la Retencion"
167+
168+#. module: l10n_ve_fiscal_reports
169+#: code:addons/l10n_ve_fiscal_reports/wizard/wh_book_wizard.py:45
170+#: selection:wh.book.wizard,model:0
171+#, python-format
172+msgid "Witholding Purchase"
173+msgstr "Retenciones en Compras"
174+
175+#. module: l10n_ve_fiscal_reports
176+#: sql_constraint:adjustment.book:0
177+msgid "The period and type combination must be unique!"
178+msgstr "El periodo y el tipo deben ser unicos"
179+
180+#. module: l10n_ve_fiscal_reports
181+#: code:addons/l10n_ve_fiscal_reports/wizard/sales_book_wizard.py:46
182+#, python-format
183+msgid "No period defined for this date !\n"
184+"Please create a fiscal year."
185+msgstr "No se han definido periodos para esta fecha!\n"
186+
187+#. module: l10n_ve_fiscal_reports
188+#: code:addons/l10n_ve_fiscal_reports/wizard/wh_book_wizard.py:46
189+#: selection:wh.book.wizard,model:0
190+#, python-format
191+msgid "Witholding Sales"
192+msgstr "Retenciones en Ventas"
193+
194+
195
196=== modified file 'l10n_ve_fiscal_reports/wizard/__init__.py'
197--- l10n_ve_fiscal_reports/wizard/__init__.py 2011-12-29 23:10:47 +0000
198+++ l10n_ve_fiscal_reports/wizard/__init__.py 2012-01-27 16:30:42 +0000
199@@ -29,4 +29,4 @@
200 ##############################################################################
201
202 import sales_book_wizard
203-import wiz_wh_book
204+import wh_book_wizard
205
206=== added file 'l10n_ve_fiscal_reports/wizard/wh_book_wizard.py'
207--- l10n_ve_fiscal_reports/wizard/wh_book_wizard.py 1970-01-01 00:00:00 +0000
208+++ l10n_ve_fiscal_reports/wizard/wh_book_wizard.py 2012-01-27 16:30:42 +0000
209@@ -0,0 +1,69 @@
210+# -*- encoding: utf-8 -*-
211+##############################################################################
212+# Copyright (c) 2011 OpenERP Venezuela (http://openerp.com.ve)
213+# All Rights Reserved.
214+# Programmed by: Israel Fermín Montilla <israel@openerp.com.ve>
215+#
216+# WARNING: This program as such is intended to be used by professional
217+# programmers who take the whole responsability of assessing all potential
218+# consequences resulting from its eventual inadequacies and bugs
219+# End users who are looking for a ready-to-use solution with commercial
220+# garantees and support are strongly adviced to contract a Free Software
221+# Service Company
222+#
223+# This program is Free Software; you can redistribute it and/or
224+# modify it under the terms of the GNU General Public License
225+# as published by the Free Software Foundation; either version 2
226+# of the License, or (at your option) any later version.
227+#
228+# This program is distributed in the hope that it will be useful,
229+# but WITHOUT ANY WARRANTY; without even the implied warranty of
230+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
231+# GNU General Public License for more details.
232+#
233+# You should have received a copy of the GNU General Public License
234+# along with this program; if not, write to the Free Software
235+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
236+###############################################################################
237+from osv import osv
238+from osv import fields
239+import sys
240+from tools.translate import _
241+import time
242+
243+
244+class wh_book_wizard(osv.osv_memory):
245+ """
246+ Withholding book wizard implemented using the osv_memory wizard system
247+ """
248+ _name = "wh.book.wizard"
249+
250+ _columns = {
251+ "date_start": fields.date("Start Date", required=True),
252+ "date_end": fields.date("End Date", required=True),
253+ "model": fields.selection([
254+ ("wh_p", _("Witholding Purchase")),
255+ ("wh_s", _("Witholding Sales")),
256+ ],"Type", required=True,
257+ ),
258+ }
259+
260+ def check_report(self, cr, uid, ids, context=None):
261+ if context is None:
262+ context = {}
263+ data = {}
264+ data['ids'] = context.get('active_ids', [])
265+ data['model'] = context.get('active_model', 'ir.ui.menu')
266+ data['form'] = self.read(cr, uid, ids, ['date_start', 'date_end', 'model'])[0]
267+ return self._print_report(cr, uid, ids, data, context=context)
268+
269+ def _print_report(self, cr, uid, ids,data, context=None):
270+ return { 'type': 'ir.actions.report.xml', 'report_name': 'fiscal.reports.whp.whp_seniat', 'datas': data}
271+
272+
273+ _defaults = {
274+ 'date_start': lambda *a: time.strftime('%Y-%m-%d'),
275+ 'date_end': lambda *a: time.strftime('%Y-%m-%d'),
276+ 'model': lambda *a: 'wh_p',
277+ }
278+wh_book_wizard()
279
280=== added file 'l10n_ve_fiscal_reports/wizard/wh_book_wizard_view.xml'
281--- l10n_ve_fiscal_reports/wizard/wh_book_wizard_view.xml 1970-01-01 00:00:00 +0000
282+++ l10n_ve_fiscal_reports/wizard/wh_book_wizard_view.xml 2012-01-27 16:30:42 +0000
283@@ -0,0 +1,34 @@
284+<?xml version="1.0" encoding="utf-8"?>
285+<openerp>
286+ <data>
287+ <record model="ir.ui.view" id="wh_book_wizard_form">
288+ <field name="name">wh.book.wizard.form</field>
289+ <field name="model">wh.book.wizard</field>
290+ <field name="type">form</field>
291+ <field name="arch" type="xml">
292+ <form string="Print Report Witholding Sales or Purchase">
293+ <notebook colspan="4">
294+ <page string="General">
295+ <field name="date_start" />
296+ <field name="date_end" />
297+ <field name="model" />
298+ <button special="cancel" string="Cancel" icon="gtk-cancel" />
299+ <button name="check_report" string="Print Report" type="object" icon="gtk-print" />
300+ </page>
301+ </notebook>
302+ </form>
303+ </field>
304+ </record>
305+ <record model="ir.actions.act_window" id="wh_book_wizard_act">
306+ <field name="name">Report Witholding Sales or Purchase</field>
307+ <field name="res_model">wh.book.wizard</field>
308+ <field name="type">ir.actions.act_window</field>
309+ <field name="view_type">form</field>
310+ <field name="view_mode">form</field>
311+ <field name="view_id" ref="wh_book_wizard_form"/>
312+ <field name="target">new</field>
313+ </record>
314+ <menuitem name="Print Report Witholding Sales or Purchase" id="wh_book_wizard_menu"
315+ parent="menu_fr_main" action="wh_book_wizard_act" />
316+ </data>
317+</openerp>
318
319=== removed file 'l10n_ve_fiscal_reports/wizard/wiz_book.py'
320--- l10n_ve_fiscal_reports/wizard/wiz_book.py 2011-12-29 04:02:48 +0000
321+++ l10n_ve_fiscal_reports/wizard/wiz_book.py 1970-01-01 00:00:00 +0000
322@@ -1,83 +0,0 @@
323-# -*- encoding: utf-8 -*-
324-##############################################################################
325-#
326-# Copyright (c) 2010 Vauxoo C.A. (http://openerp.com.ve/) All Rights Reserved.
327-# Javier Duran <javier@vauxoo.com>
328-#
329-#
330-# WARNING: This program as such is intended to be used by professional
331-# programmers who take the whole responsability of assessing all potential
332-# consequences resulting from its eventual inadequacies and bugs
333-# End users who are looking for a ready-to-use solution with commercial
334-# garantees and support are strongly adviced to contract a Free Software
335-# Service Company
336-#
337-# This program is Free Software; you can redistribute it and/or
338-# modify it under the terms of the GNU General Public License
339-# as published by the Free Software Foundation; either version 2
340-# of the License, or (at your option) any later version.
341-#
342-# This program is distributed in the hope that it will be useful,
343-# but WITHOUT ANY WARRANTY; without even the implied warranty of
344-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
345-# GNU General Public License for more details.
346-#
347-# You should have received a copy of the GNU General Public License
348-# along with this program; if not, write to the Free Software
349-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
350-#
351-##############################################################################
352-
353-'''
354-Fiscal Report For Venezuela
355-'''
356-
357-from osv import fields
358-from osv import osv
359-import time
360-import ir
361-from mx import DateTime
362-import datetime
363-import pooler
364-from tools import config
365-import wizard
366-import netsvc
367-
368-
369-book_form= """<?xml version="1.0"?>
370-<form string="Seniat Book">
371- <field name="date_start" />
372- <field name="date_end" />
373- <field name="model" />
374-</form>
375-"""
376-
377-book_field= {
378- 'date_start': {'string':'Start Date','type':'date','required': True},
379- 'date_end': {'string':'End Date','type':'date','required': True},
380- 'model':{'string':"Type of Report", 'type':'selection', 'selection':[('b_p','Book Purchase'),('b_s','Book Sales')]},
381-
382-}
383-
384-
385-class wiz_invoice_list(wizard.interface):
386- '''
387- Wizzard invoice list
388- '''
389-
390- states = {
391- 'init' : {
392- 'actions' : [],
393- 'result' : {'type' : 'form',
394- 'arch' : book_form,
395- 'fields' : book_field,
396- 'state' : [('end', 'Cancel','gtk-cancel'),('print_report', 'Print Report','gtk-print') ]}
397- },
398- 'print_report' : {
399- 'actions' : [],
400- 'result' : {'type' : 'print',
401- 'report':'fiscal.reports.purchase.purchase_seniat',
402- 'state' : 'end'}
403- },
404- }
405-wiz_invoice_list("fiscal.reports.purchase.book_seniat")