Merge lp:~vauxoo/openerp-venezuela-localization/israel_nro-ctrl-wiz-integration into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
- israel_nro-ctrl-wiz-integration
- Merge into 6.0-trunk
Proposed by
Israel Fermin Montilla
Status: | Merged |
---|---|
Merge reported by: | Israel Fermin Montilla |
Merged at revision: | not available |
Proposed branch: | lp:~vauxoo/openerp-venezuela-localization/israel_nro-ctrl-wiz-integration |
Merge into: | lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk |
Diff against target: |
400 lines (+186/-47) 5 files modified
l10n_ve_fiscal_requirements/__openerp__.py (+8/-5) l10n_ve_fiscal_requirements/i18n/es_VE.po (+83/-41) l10n_ve_fiscal_requirements/wizard/__init__.py (+1/-1) l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl.py (+61/-0) l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl_view.xml (+33/-0) |
To merge this branch: | bzr merge lp:~vauxoo/openerp-venezuela-localization/israel_nro-ctrl-wiz-integration |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nhomar - Vauxoo | Pending | ||
Review via email: mp+77776@code.launchpad.net |
Commit message
Description of the change
Changed v5 old style wizard to osv_memory wizard system, adapted the logic to comply osv_memory standards, translated texts in spanish to english and re-translated the module.
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 | === modified file 'l10n_ve_fiscal_requirements/__openerp__.py' |
2 | --- l10n_ve_fiscal_requirements/__openerp__.py 2011-09-30 18:31:58 +0000 |
3 | +++ l10n_ve_fiscal_requirements/__openerp__.py 2011-10-01 01:45:28 +0000 |
4 | @@ -32,22 +32,24 @@ |
5 | - Required address invoice |
6 | - Unique address invoice. |
7 | - VAT verification for Venezuela rules. |
8 | - - Damaged invoices justification. |
9 | + - Damaged "free forms" justification. |
10 | --------------------------------------------------------------------------- |
11 | - For damaged invoices, you must go to the company and, under the configuration section, |
12 | + For damaged invoices (Free form formats), you must go to the company and, under the configuration section, |
13 | create the corresponding journal and account. |
14 | |
15 | + If you install this module with invoice data on the database, the concept_id will be |
16 | + Empty for all those invoices, so, when you try to modify them you have to add a value on |
17 | + that field |
18 | ------------------------TECH INFO------------------------------------------- |
19 | CHANGELOG: |
20 | - For the migration to the l10n_ve on OpenERP: |
21 | + - Added the functionality to change the control number on an invoice (free form format) |
22 | - Changed the Invoice Ref label to Control Number |
23 | - Integrated the l10n_ve_nro_ctrl module functionality on this one |
24 | - Since the concept_id field is added by the l10n_ve_islr_withholding, an |
25 | error es rised if it's not installed and it is necesary to withhold |
26 | - If you need to withhold ISLR, you must install the module mentioned abofe |
27 | |
28 | - FURTHER DEVELOPMENT: |
29 | - - Find a way to decouple this module and l10n_ve_islr_withholding |
30 | """, |
31 | 'init_xml': [], |
32 | "depends" : ["base", "base_vat", "purchase", "stock", "account"], |
33 | @@ -55,7 +57,8 @@ |
34 | 'view/stock_view.xml', |
35 | 'view/account_invoice_view.xml', |
36 | 'view/res_company_view.xml', |
37 | - 'wizard/wizard_invoice_nro_ctrl_view.xml' |
38 | + 'wizard/wizard_invoice_nro_ctrl_view.xml', |
39 | + 'wizard/wizard_nro_ctrl_view.xml' |
40 | ], |
41 | 'demo_xml': [], |
42 | 'test': [], |
43 | |
44 | === modified file 'l10n_ve_fiscal_requirements/i18n/es_VE.po' |
45 | --- l10n_ve_fiscal_requirements/i18n/es_VE.po 2011-09-30 19:01:27 +0000 |
46 | +++ l10n_ve_fiscal_requirements/i18n/es_VE.po 2011-10-01 01:45:28 +0000 |
47 | @@ -6,8 +6,8 @@ |
48 | msgstr "" |
49 | "Project-Id-Version: OpenERP Server 6.0.3\n" |
50 | "Report-Msgid-Bugs-To: support@openerp.com\n" |
51 | -"POT-Creation-Date: 2011-09-30 18:40+0000\n" |
52 | -"PO-Revision-Date: 2011-09-30 18:40+0000\n" |
53 | +"POT-Creation-Date: 2011-09-30 23:50+0000\n" |
54 | +"PO-Revision-Date: 2011-09-30 23:50+0000\n" |
55 | "Last-Translator: <>\n" |
56 | "Language-Team: \n" |
57 | "MIME-Version: 1.0\n" |
58 | @@ -29,12 +29,12 @@ |
59 | #. module: l10n_ve_fiscal_requirements |
60 | #: field:account.invoice,sin_cred:0 |
61 | msgid "Tax-exempt?" |
62 | -msgstr "Libre de impuesto?" |
63 | +msgstr "¿Libre de impuesto?" |
64 | |
65 | #. module: l10n_ve_fiscal_requirements |
66 | -#: view:wizard.invoice.nro.ctrl:0 |
67 | -msgid "Create an invoice to justify the damaged one" |
68 | -msgstr "Crear una factura para justificar otra dañada" |
69 | +#: view:wiz.nroctrl:0 |
70 | +msgid "Confirm" |
71 | +msgstr "Confirm" |
72 | |
73 | #. module: l10n_ve_fiscal_requirements |
74 | #: view:res.company:0 |
75 | @@ -48,9 +48,15 @@ |
76 | msgstr "Por favor, confirme que está seguro de que desea hacer esto!" |
77 | |
78 | #. module: l10n_ve_fiscal_requirements |
79 | -#: constraint:res.company:0 |
80 | -msgid "Error! You can not create recursive companies." |
81 | -msgstr "Error! no puede crear compañías recursivas." |
82 | +#: model:ir.actions.act_window,name:l10n_ve_fiscal_requirements.wizard_invoice_nro_control |
83 | +msgid "Create null paper" |
84 | +msgstr "Crear papel dañado" |
85 | + |
86 | +#. module: l10n_ve_fiscal_requirements |
87 | +#: code:addons/l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl.py:42 |
88 | +#, python-format |
89 | +msgid "Please confirm that you want to do this by checking the option" |
90 | +msgstr "Por favor, confirme que desea hacer esto marcando la opción" |
91 | |
92 | #. module: l10n_ve_fiscal_requirements |
93 | #: view:wizard.invoice.nro.ctrl:0 |
94 | @@ -58,6 +64,12 @@ |
95 | msgstr "Crear Factura" |
96 | |
97 | #. module: l10n_ve_fiscal_requirements |
98 | +#: code:addons/l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl.py:48 |
99 | +#, python-format |
100 | +msgid "You cannot change the state of a Draft invoice" |
101 | +msgstr "No puede cambiar una factura en Borrador" |
102 | + |
103 | +#. module: l10n_ve_fiscal_requirements |
104 | #: model:ir.module.module,shortdesc:l10n_ve_fiscal_requirements.module_meta_information |
105 | msgid "Fiscal requirements Venezuelan laws" |
106 | msgstr "Requerimientos fiscales de las Leyes Venezolanas" |
107 | @@ -65,7 +77,12 @@ |
108 | #. module: l10n_ve_fiscal_requirements |
109 | #: model:ir.model,name:l10n_ve_fiscal_requirements.model_stock_picking |
110 | msgid "Picking List" |
111 | -msgstr "Lista de picking" |
112 | +msgstr "Albarán" |
113 | + |
114 | +#. module: l10n_ve_fiscal_requirements |
115 | +#: field:wiz.nroctrl,sure:0 |
116 | +msgid "Are you sure?" |
117 | +msgstr "¿Está seguro?" |
118 | |
119 | #. module: l10n_ve_fiscal_requirements |
120 | #: constraint:res.partner.address:0 |
121 | @@ -95,6 +112,11 @@ |
122 | msgstr "ERROR !" |
123 | |
124 | #. module: l10n_ve_fiscal_requirements |
125 | +#: view:wiz.nroctrl:0 |
126 | +msgid "Changing the Control Number" |
127 | +msgstr "Cambio de número de control" |
128 | + |
129 | +#. module: l10n_ve_fiscal_requirements |
130 | #: field:res.company,journal_id:0 |
131 | msgid "Journal" |
132 | msgstr "Diario" |
133 | @@ -106,11 +128,22 @@ |
134 | |
135 | #. module: l10n_ve_fiscal_requirements |
136 | #: field:account.invoice,nro_ctrl:0 |
137 | +#: field:wiz.nroctrl,name:0 |
138 | #: field:wizard.invoice.nro.ctrl,nro_ctrl:0 |
139 | msgid "Control Number" |
140 | msgstr "Número de control" |
141 | |
142 | #. module: l10n_ve_fiscal_requirements |
143 | +#: model:ir.model,name:l10n_ve_fiscal_requirements.model_wiz_nroctrl |
144 | +msgid "Wizard that changes the invoice control number" |
145 | +msgstr "Asistemte para cambiar el número de control" |
146 | + |
147 | +#. module: l10n_ve_fiscal_requirements |
148 | +#: model:ir.actions.act_window,name:l10n_ve_fiscal_requirements.change_nro_ctrl_act |
149 | +msgid "Change Control Number" |
150 | +msgstr "Cambiar el número de control" |
151 | + |
152 | +#. module: l10n_ve_fiscal_requirements |
153 | #: view:res.company:0 |
154 | msgid "Configuration" |
155 | msgstr "Configuración" |
156 | @@ -126,14 +159,14 @@ |
157 | msgstr "Cuenta" |
158 | |
159 | #. module: l10n_ve_fiscal_requirements |
160 | -#: constraint:res.partner:0 |
161 | -msgid "Error ! The partner does not have an invoice address. " |
162 | -msgstr "Error ! Este cliente no posée una dirección fiscal. " |
163 | +#: model:ir.model,name:l10n_ve_fiscal_requirements.model_account_invoice |
164 | +msgid "Invoice" |
165 | +msgstr "Factura" |
166 | |
167 | #. module: l10n_ve_fiscal_requirements |
168 | -#: model:ir.actions.act_window,name:l10n_ve_fiscal_requirements.wizard_invoice_nro_control |
169 | -msgid "Create null paper" |
170 | -msgstr "Crear papel dañado" |
171 | +#: constraint:res.company:0 |
172 | +msgid "Error! You can not create recursive companies." |
173 | +msgstr "Error! no puede crear compañías recursivas." |
174 | |
175 | #. module: l10n_ve_fiscal_requirements |
176 | #: model:ir.model,name:l10n_ve_fiscal_requirements.model_res_company |
177 | @@ -149,11 +182,13 @@ |
178 | #. module: l10n_ve_fiscal_requirements |
179 | #: model:ir.model,name:l10n_ve_fiscal_requirements.model_purchase_order |
180 | msgid "Purchase Order" |
181 | -msgstr "Orden de compra" |
182 | +msgstr "Pedido de compra" |
183 | |
184 | #. module: l10n_ve_fiscal_requirements |
185 | #: code:addons/l10n_ve_fiscal_requirements/wizard/wizard_invoice_nro_ctrl.py:113 |
186 | #: code:addons/l10n_ve_fiscal_requirements/wizard/wizard_invoice_nro_ctrl.py:117 |
187 | +#: code:addons/l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl.py:42 |
188 | +#: code:addons/l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl.py:48 |
189 | #, python-format |
190 | msgid "Error!" |
191 | msgstr "Error!" |
192 | @@ -164,9 +199,15 @@ |
193 | msgstr "wizard.invoice.nro.ctrl" |
194 | |
195 | #. module: l10n_ve_fiscal_requirements |
196 | +#: view:wiz.nroctrl:0 |
197 | #: view:wizard.invoice.nro.ctrl:0 |
198 | msgid "Are you sure you want to do this?" |
199 | -msgstr "¿Está seguro de que desea hacer esto?" |
200 | +msgstr "¿Está seguro que desea hacer esto?" |
201 | + |
202 | +#. module: l10n_ve_fiscal_requirements |
203 | +#: view:wizard.invoice.nro.ctrl:0 |
204 | +msgid "Create an invoice to justify the damaged one" |
205 | +msgstr "Crear una factura para justificar otra dañada" |
206 | |
207 | #. module: l10n_ve_fiscal_requirements |
208 | #: help:account.invoice,sin_cred:0 |
209 | @@ -195,9 +236,9 @@ |
210 | msgstr "Debe ir a la compañía y configurar un diario y una cuenta para facturas dañadas" |
211 | |
212 | #. module: l10n_ve_fiscal_requirements |
213 | -#: model:ir.model,name:l10n_ve_fiscal_requirements.model_account_invoice |
214 | -msgid "Invoice" |
215 | -msgstr "Factura" |
216 | +#: constraint:res.partner:0 |
217 | +msgid "Error ! The partner does not have an invoice address. " |
218 | +msgstr "Error ! Este cliente no posée una dirección fiscal. " |
219 | |
220 | #. module: l10n_ve_fiscal_requirements |
221 | #: model:ir.module.module,description:l10n_ve_fiscal_requirements.module_meta_information |
222 | @@ -224,31 +265,32 @@ |
223 | " FURTHER DEVELOPMENT:\n" |
224 | " - Find a way to decouple this module and l10n_ve_islr_withholding\n" |
225 | " " |
226 | -msgstr "Requerimientos fiscales de las Leyes Venezolanas:\n" |
227 | -" - Número de control para facturas\n" |
228 | -" - Excento de impuesto\n" |
229 | -" - Se requiere de una dirección fiscal\n" |
230 | -" - Dirección de facturación única.\n" |
231 | -" - Verificación de RIF.\n" |
232 | -" - Justificación de facturas dañadas.\n" |
233 | +msgstr "Venezuelan Tax Laws Requirements:\n" |
234 | +" - Invoice Control Number\n" |
235 | +" - Tax-except\n" |
236 | +" - Required address invoice\n" |
237 | +" - Unique address invoice.\n" |
238 | +" - VAT verification for Venezuela rules.\n" |
239 | +" - Damaged invoices justification.\n" |
240 | " ---------------------------------------------------------------------------\n" |
241 | -" Para justificar facturas dañadas, debe ir a la compañía y, en la pestaña de Configuración,\n" |
242 | -" crear el diario y la cuenta cosrrespondiente.\n" |
243 | +" For damaged invoices, you must go to the company and, under the configuration section,\n" |
244 | +" create the corresponding journal and account.\n" |
245 | "\n" |
246 | -" ------------------------Info Técnica-------------------------------------------\n" |
247 | +" ------------------------TECH INFO-------------------------------------------\n" |
248 | " CHANGELOG:\n" |
249 | -" - Para la migración de la localización a la versión 6:\n" |
250 | -" - Se cambió la etiqueta de referencia de factura a Número de Control\n" |
251 | -" - Se integró la funcionalidad del módulo l10n_invoice_nro_ctrl\n" |
252 | -" - Debido a que el campo concept_id es agregado por el módulo l10n_ve_islr_withholding, se genera un\n" |
253 | -" error si dicho módulo no está instalado, es decir, si el campo no existe\n" |
254 | -" - Si necesita retener ISLR, debe instalar el módulo mencionado anteriormente\n" |
255 | +" - For the migration to the l10n_ve on OpenERP:\n" |
256 | +" - Changed the Invoice Ref label to Control Number\n" |
257 | +" - Integrated the l10n_ve_nro_ctrl module functionality on this one\n" |
258 | +" - Since the concept_id field is added by the l10n_ve_islr_withholding, an\n" |
259 | +" error es rised if it's not installed and it is necesary to withhold\n" |
260 | +" - If you need to withhold ISLR, you must install the module mentioned abofe\n" |
261 | "\n" |
262 | -" Desarrollos futuros:\n" |
263 | -" - Desacoplar este módulo y el de retención de ISLR\n" |
264 | +" FURTHER DEVELOPMENT:\n" |
265 | +" - Find a way to decouple this module and l10n_ve_islr_withholding\n" |
266 | " " |
267 | |
268 | #. module: l10n_ve_fiscal_requirements |
269 | +#: view:wiz.nroctrl:0 |
270 | #: view:wizard.invoice.nro.ctrl:0 |
271 | msgid "Cancel" |
272 | msgstr "Cancelar" |
273 | @@ -256,10 +298,10 @@ |
274 | #. module: l10n_ve_fiscal_requirements |
275 | #: model:ir.model,name:l10n_ve_fiscal_requirements.model_res_partner |
276 | msgid "Partner" |
277 | -msgstr "Cliente" |
278 | +msgstr "Empresa" |
279 | |
280 | #. module: l10n_ve_fiscal_requirements |
281 | #: model:ir.model,name:l10n_ve_fiscal_requirements.model_res_partner_address |
282 | msgid "Partner Addresses" |
283 | -msgstr "Direcciones de Clientes" |
284 | +msgstr "Direcciones de empresa" |
285 | |
286 | |
287 | === modified file 'l10n_ve_fiscal_requirements/wizard/__init__.py' |
288 | --- l10n_ve_fiscal_requirements/wizard/__init__.py 2011-09-29 22:40:49 +0000 |
289 | +++ l10n_ve_fiscal_requirements/wizard/__init__.py 2011-10-01 01:45:28 +0000 |
290 | @@ -23,5 +23,5 @@ |
291 | # You should have received a copy of the GNU General Public License |
292 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
293 | ############################################################################## |
294 | - |
295 | +import wizard_nro_ctrl |
296 | import wizard_invoice_nro_ctrl |
297 | |
298 | === added file 'l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl.py' |
299 | --- l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl.py 1970-01-01 00:00:00 +0000 |
300 | +++ l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl.py 2011-10-01 01:45:28 +0000 |
301 | @@ -0,0 +1,61 @@ |
302 | +# -*- encoding: utf-8 -*- |
303 | +############################################################################## |
304 | +# |
305 | +# Copyright (c) 2009 Vauxoo C.A. (http://openerp.com.ve/) All Rights Reserved. |
306 | +# Javier Duran <javier@vauxoo.com> |
307 | +# |
308 | +# |
309 | +# WARNING: This program as such is intended to be used by professional |
310 | +# programmers who take the whole responsability of assessing all potential |
311 | +# consequences resulting from its eventual inadequacies and bugs |
312 | +# End users who are looking for a ready-to-use solution with commercial |
313 | +# garantees and support are strongly adviced to contract a Free Software |
314 | +# Service Company |
315 | +# |
316 | +# This program is Free Software; you can redistribute it and/or |
317 | +# modify it under the terms of the GNU General Public License |
318 | +# as published by the Free Software Foundation; either version 2 |
319 | +# of the License, or (at your option) any later version. |
320 | +# |
321 | +# This program is distributed in the hope that it will be useful, |
322 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
323 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
324 | +# GNU General Public License for more details. |
325 | +# |
326 | +# You should have received a copy of the GNU General Public License |
327 | +# along with this program; if not, write to the Free Software |
328 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
329 | +# |
330 | +############################################################################## |
331 | + |
332 | +from osv import osv |
333 | +from osv import fields |
334 | +from tools.translate import _ |
335 | + |
336 | +class wiz_nroctrl(osv.osv_memory): |
337 | + _name = 'wiz.nroctrl' |
338 | + _description = "Wizard that changes the invoice control number" |
339 | + |
340 | + def set_noctrl(self, cr, uid, ids, context): |
341 | + data = self.pool.get('wiz.nroctrl').read(cr, uid, ids)[0] |
342 | + if not data['sure']: |
343 | + raise osv.except_osv(_("Error!"), _("Please confirm that you want to do this by checking the option")) |
344 | + inv_obj = self.pool.get('account.invoice') |
345 | + n_ctrl = data['name'] |
346 | + |
347 | + invoice = inv_obj.browse(cr, uid, context['active_id']) |
348 | + if invoice.state == 'draft': |
349 | + raise osv.except_osv(_("Error!"), _("You cannot change the state of a Draft invoice")) |
350 | + |
351 | + inv_obj.write(cr, uid, context['active_id'], {'nro_ctrl': n_ctrl}, context=context) |
352 | + return {} |
353 | + |
354 | + _columns = { |
355 | + 'name': fields.char('Control Number', 32, required=True), |
356 | + 'sure': fields.boolean('Are you sure?'), |
357 | + } |
358 | +wiz_nroctrl() |
359 | + |
360 | + |
361 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
362 | + |
363 | |
364 | === added file 'l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl_view.xml' |
365 | --- l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl_view.xml 1970-01-01 00:00:00 +0000 |
366 | +++ l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl_view.xml 2011-10-01 01:45:28 +0000 |
367 | @@ -0,0 +1,33 @@ |
368 | +<?xml version="1.0" encoding="utf-8"?> |
369 | +<openerp> |
370 | + <data> |
371 | + <record model="ir.ui.view" id="wizard_nro_ctrl_form"> |
372 | + <field name="name">wizard.nro.ctrl.form</field> |
373 | + <field name="model">wiz.nroctrl</field> |
374 | + <field name="type">form</field> |
375 | + <field name="arch" type="xml"> |
376 | + <form string="Changing the Control Number"> |
377 | + <field name="name" /> |
378 | + <separator string="Are you sure you want to do this?" colspan="4" /> |
379 | + <field name="sure" /> |
380 | + <button special='cancel' string="Cancel" icon="terp-gtk-stop" /> |
381 | + <button name="set_noctrl" string="Confirm" type="object" icon="terp-check" /> |
382 | + </form> |
383 | + </field> |
384 | + </record> |
385 | + <record model="ir.actions.act_window" id="change_nro_ctrl_act"> |
386 | + <field name="name">Change Control Number</field> |
387 | + <field name="res_model">wiz.nroctrl</field> |
388 | + <field name="src_model">account.invoice</field> |
389 | + <field name="view_type">form</field> |
390 | + <field name="view_mode">form</field> |
391 | + <field name="target">new</field> |
392 | + </record> |
393 | + <act_window |
394 | + id="change_nro_ctrl_act" |
395 | + res_model="wiz.nroctrl" |
396 | + src_model="account.invoice" |
397 | + name="Change Control Number" /> |
398 | + </data> |
399 | +</openerp> |
400 | + |