Merge lp:~vauxoo/openerp-venezuela-localization/hbto_src_fix_islr into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
- hbto_src_fix_islr
- Merge into 6.0-trunk
Proposed by
Jose Moreno
Status: | Superseded |
---|---|
Proposed branch: | lp:~vauxoo/openerp-venezuela-localization/hbto_src_fix_islr |
Merge into: | lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk |
Diff against target: |
2088 lines (+1843/-23) 28 files modified
l10n_ve_withholding/account.py (+1/-1) l10n_ve_withholding/l10n_ve_withholding_view.xml (+11/-8) l10n_ve_withholding_islr/data/l10n_ve_islr_withholding_data.xml (+1/-1) l10n_ve_withholding_islr/invoice.py (+34/-11) l10n_ve_withholding_islr/islr_wh_doc.py (+1/-2) l10n_ve_withholding_src/__init__.py (+27/-0) l10n_ve_withholding_src/__openerp__.py (+74/-0) l10n_ve_withholding_src/data/data.xml (+48/-0) l10n_ve_withholding_src/data/wh_src_sequence.xml (+26/-0) l10n_ve_withholding_src/model/__init__.py (+29/-0) l10n_ve_withholding_src/model/invoice.py (+113/-0) l10n_ve_withholding_src/model/partner.py (+44/-0) l10n_ve_withholding_src/model/res_company.py (+55/-0) l10n_ve_withholding_src/model/wh_src.py (+341/-0) l10n_ve_withholding_src/report/wh_src_report.rml (+418/-0) l10n_ve_withholding_src/security/ir.model.access.csv (+5/-0) l10n_ve_withholding_src/security/wh_muni_security.xml (+13/-0) l10n_ve_withholding_src/view/account_invoice_view.xml (+44/-0) l10n_ve_withholding_src/view/company_view.xml (+21/-0) l10n_ve_withholding_src/view/partner_view.xml (+33/-0) l10n_ve_withholding_src/view/wh_src_view.xml (+214/-0) l10n_ve_withholding_src/wh_src_report.xml (+17/-0) l10n_ve_withholding_src/wizard/__init__.py (+32/-0) l10n_ve_withholding_src/wizard/out.txt (+1/-0) l10n_ve_withholding_src/wizard/prueba1.py (+33/-0) l10n_ve_withholding_src/wizard/retencion_munici_wizard.xml (+16/-0) l10n_ve_withholding_src/wizard/wizard_ret_munici_xml.py (+116/-0) l10n_ve_withholding_src/workflow/l10n_ve_wh_src_wf.xml (+75/-0) |
To merge this branch: | bzr merge lp:~vauxoo/openerp-venezuela-localization/hbto_src_fix_islr |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aristóbulo Meneses | Pending | ||
hbto [Vauxoo] http://www.vauxoo.com | Pending | ||
Review via email: mp+93196@code.launchpad.net |
This proposal has been superseded by a proposal from 2013-12-05.
Commit message
Description of the change
Se reparo el subtrayendo de el 1% y se cambio la presicion decimal de ISLR a 4 digitos se agrego una validacion
y se coloco un comentario sobre el cambio
To post a comment you must log in.
Unmerged revisions
- 583. By Jose Moreno
-
[FIX] Se reparo el subtrayendo de el 1% y se cambio la presicion decimal de ISLR a 4 digitos se agrego una validacion
y se coloco un comentario sobre el cambio - 582. By Jose Moreno
-
[FIX] Se reparo el subtrayendo de el 1% y se cambio la presicion decimal de ISLR a 4 digitos
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'l10n_ve_withholding/account.py' |
2 | --- l10n_ve_withholding/account.py 2011-10-25 20:33:16 +0000 |
3 | +++ l10n_ve_withholding/account.py 2012-02-15 12:43:18 +0000 |
4 | @@ -29,7 +29,7 @@ |
5 | class account_journal(osv.osv): |
6 | _inherit = 'account.journal' |
7 | _columns = { |
8 | - 'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'), ('cash', 'Cash'), ('bank', 'Bank and Cheques'), ('general', 'General'), ('situation', 'Opening/Closing Situation'), ('iva_sale', 'Sale Wh VAT'), ('iva_purchase', 'Purchase Wh VAT'), ('islr_purchase', 'Purchase Wh Income'), ('islr_sale', 'Sale Wh Income'), ('mun_sale', 'Sale Wh County'), ('mun_purchase', 'Purchase Wh County')], 'Type', size=32, required=True, |
9 | + 'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'), ('cash', 'Cash'), ('bank', 'Bank and Cheques'), ('general', 'General'), ('situation', 'Opening/Closing Situation'), ('iva_sale', 'Sale Wh VAT'), ('iva_purchase', 'Purchase Wh VAT'), ('islr_purchase', 'Purchase Wh Income'), ('islr_sale', 'Sale Wh Income'), ('mun_sale', 'Sale Wh County'), ('mun_purchase', 'Purchase Wh County'),('src_sale', 'Sale Wh src'), ('src_purchase', 'Purchase Wh src')], 'Type', size=32, required=True, |
10 | help="Select 'Sale' for Sale journal to be used at the time of making invoice."\ |
11 | " Select 'Purchase' for Purchase Journal to be used at the time of approving purchase order."\ |
12 | " Select 'Cash' to be used at the time of making payment."\ |
13 | |
14 | === modified file 'l10n_ve_withholding/l10n_ve_withholding_view.xml' |
15 | --- l10n_ve_withholding/l10n_ve_withholding_view.xml 2012-01-27 19:23:00 +0000 |
16 | +++ l10n_ve_withholding/l10n_ve_withholding_view.xml 2012-02-15 12:43:18 +0000 |
17 | @@ -22,8 +22,9 @@ |
18 | <field name="arch" type="xml"> |
19 | <xpath expr="/form/notebook/page[@string='Invoice']" position="after"> |
20 | <page string="Withholdings" > |
21 | - <separator string="vsep"/> |
22 | - <separator string="isep"/> |
23 | + <separator colspan='4' string="vsep"/> |
24 | + <separator colspan='4' string="isep"/> |
25 | + <separator colspan='4' string="rsep"/> |
26 | </page> |
27 | </xpath> |
28 | </field> |
29 | @@ -41,8 +42,9 @@ |
30 | <field name="arch" type="xml"> |
31 | <xpath expr="/form/notebook/page[@string='Invoice']" position="after"> |
32 | <page string="Withholdings" > |
33 | - <separator string="vsep"/> |
34 | - <separator string="isep"/> |
35 | + <separator colspan='4' string="vsep"/> |
36 | + <separator colspan='4' string="isep"/> |
37 | + <separator colspan='4' string="rsep"/> |
38 | </page> |
39 | </xpath> |
40 | </field> |
41 | @@ -60,9 +62,11 @@ |
42 | <field name="arch" type="xml"> |
43 | <xpath expr="/form/notebook/page[@string='Notes']" position="after"> |
44 | <page string="Withholdings" > |
45 | - <separator string="vsep"/> |
46 | - <newline/> |
47 | - <separator string="isep"/> |
48 | + <separator colspan='4' string="vsep"/> |
49 | + <newline/> |
50 | + <separator colspan='4' string="isep"/> |
51 | + <newline/> |
52 | + <separator colspan='4' string="rsep"/> |
53 | </page> |
54 | </xpath> |
55 | </field> |
56 | @@ -125,4 +129,3 @@ |
57 | |
58 | </data> |
59 | </openerp> |
60 | - |
61 | |
62 | === modified file 'l10n_ve_withholding_islr/data/l10n_ve_islr_withholding_data.xml' |
63 | --- l10n_ve_withholding_islr/data/l10n_ve_islr_withholding_data.xml 2012-01-18 12:24:05 +0000 |
64 | +++ l10n_ve_withholding_islr/data/l10n_ve_islr_withholding_data.xml 2012-02-15 12:43:18 +0000 |
65 | @@ -4,7 +4,7 @@ |
66 | <!-- Decimal Precision --> |
67 | <record forcecreate="True" id="decimal_withhold_islr" model="decimal.precision"> |
68 | <field name="name">Withhold ISLR</field> |
69 | - <field name="digits">2</field> |
70 | + <field name="digits">4</field> |
71 | </record> |
72 | <!-- Begin of Concepts --> |
73 | <record id="islr_wh_concept_no_apply_withholding" model="islr.wh.concept"> |
74 | |
75 | === modified file 'l10n_ve_withholding_islr/invoice.py' |
76 | --- l10n_ve_withholding_islr/invoice.py 2012-02-08 16:41:00 +0000 |
77 | +++ l10n_ve_withholding_islr/invoice.py 2012-02-15 12:43:18 +0000 |
78 | @@ -511,6 +511,7 @@ |
79 | wf_service = netsvc.LocalService("workflow") |
80 | wf_service.trg_validate(uid, 'islr.wh.doc', islr_wh_doc_id, 'button_confirm', cr) |
81 | # wf_service.trg_write(uid, 'islr.wh.doc', islr_wh_doc_id, cr) |
82 | + |
83 | return islr_wh_doc_id |
84 | |
85 | |
86 | @@ -520,18 +521,41 @@ |
87 | ''' |
88 | doc_line_obj = self.pool.get('islr.wh.doc.line') |
89 | rate_obj = self.pool.get('islr.rates') |
90 | + ut_obj = self.pool.get('l10n.ut') |
91 | dict_concept = self._get_amount(cr,uid,dictt) |
92 | inv_line_id = dictc[key2][0].keys()[0] |
93 | rate_id = dictc[key2][0][inv_line_id]['rate_id'] |
94 | - |
95 | - islr_wh_doc_line_id = doc_line_obj.create(cr,uid, |
96 | - {'islr_wh_doc_id':islr_wh_doc_id, |
97 | - 'concept_id':key2, |
98 | - 'islr_rates_id':rate_id, |
99 | - 'invoice_id': inv_brw.invoice_id.id, |
100 | - 'retencion_islr': rate_obj.browse(cr,uid,rate_id).wh_perc, |
101 | - 'amount':dict_concept[key2],}) |
102 | - |
103 | + |
104 | + ut_ids = ut_obj.search(cr,uid,[]) |
105 | + ut_brw = ut_obj.browse(cr,uid,ut_ids) |
106 | + reg = 0.0 |
107 | + for ut in ut_brw: |
108 | + if float(ut.name) > reg: |
109 | + ut_amount = ut.amount |
110 | + reg = float(ut.name) |
111 | + |
112 | + percent = rate_obj.browse(cr,uid,rate_id).wh_perc |
113 | + subtract = rate_obj.browse(cr,uid,rate_id).subtract |
114 | + valor = subtract * ut_amount |
115 | + |
116 | + #Se Agrego esta Validación para las cooperativas |
117 | + if percent == 1.0: |
118 | + islr_wh_doc_line_id = doc_line_obj.create(cr,uid, |
119 | + {'islr_wh_doc_id':islr_wh_doc_id, |
120 | + 'concept_id':key2, |
121 | + 'islr_rates_id':rate_id, |
122 | + 'invoice_id': inv_brw.invoice_id.id, |
123 | + 'retencion_islr': rate_obj.browse(cr,uid,rate_id).wh_perc, |
124 | + 'amount':dict_concept[key2]-valor,}) |
125 | + else: |
126 | + islr_wh_doc_line_id = doc_line_obj.create(cr,uid, |
127 | + {'islr_wh_doc_id':islr_wh_doc_id, |
128 | + 'concept_id':key2, |
129 | + 'islr_rates_id':rate_id, |
130 | + 'invoice_id': inv_brw.invoice_id.id, |
131 | + 'retencion_islr': rate_obj.browse(cr,uid,rate_id).wh_perc, |
132 | + 'amount':dict_concept[key2],}) |
133 | + |
134 | return islr_wh_doc_line_id |
135 | |
136 | def _create_doc_invoices(self,cr,uid,key,islr_wh_doc_id): |
137 | @@ -541,8 +565,7 @@ |
138 | doc_inv_obj = self.pool.get('islr.wh.doc.invoices') |
139 | inv_id = key |
140 | islr_wh_doc_invoices_id = doc_inv_obj.create(cr,uid,{'invoice_id':inv_id,'islr_wh_doc_id':islr_wh_doc_id}) |
141 | - |
142 | - |
143 | + |
144 | def _write_wh_xml(self,cr,uid,key,islr_wh_doc_line_id): |
145 | ''' |
146 | Funcion para escribir en el modelo xml_wh_line |
147 | |
148 | === modified file 'l10n_ve_withholding_islr/islr_wh_doc.py' |
149 | --- l10n_ve_withholding_islr/islr_wh_doc.py 2012-01-26 19:16:16 +0000 |
150 | +++ l10n_ve_withholding_islr/islr_wh_doc.py 2012-02-15 12:43:18 +0000 |
151 | @@ -65,7 +65,7 @@ |
152 | for rete in self.browse(cr,uid,ids,context): |
153 | res[rete.id]= 0.0 |
154 | for line in rete.concept_ids: |
155 | - res[rete.id] += line.amount |
156 | + res[rete.id] += line.amount |
157 | return res |
158 | |
159 | def _get_period(self,cr,uid,ids,name,args,context={}): |
160 | @@ -455,7 +455,6 @@ |
161 | default = {} |
162 | default = default.copy() |
163 | default.update({'islr_wh_doc_id':0 }) |
164 | - |
165 | return super(account_invoice, self).copy(cr, uid, id, default, context) |
166 | |
167 | account_invoice() |
168 | |
169 | === added directory 'l10n_ve_withholding_src' |
170 | === added file 'l10n_ve_withholding_src/__init__.py' |
171 | --- l10n_ve_withholding_src/__init__.py 1970-01-01 00:00:00 +0000 |
172 | +++ l10n_ve_withholding_src/__init__.py 2012-02-15 12:43:18 +0000 |
173 | @@ -0,0 +1,27 @@ |
174 | +#!/usr/bin/python |
175 | +# -*- encoding: utf-8 -*- |
176 | +########################################################################### |
177 | +# Module Writen to OpenERP, Open Source Management Solution |
178 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
179 | +# All Rights Reserved |
180 | +###############Credits###################################################### |
181 | +# Coded by: Humberto Arocha <hbto@vauxoo.com> |
182 | +# Planified by: Humberto Arocha / Nhomar Hernandez |
183 | +# Audited by: Vauxoo C.A. |
184 | +############################################################################# |
185 | +# This program is free software: you can redistribute it and/or modify |
186 | +# it under the terms of the GNU Affero General Public License as published by |
187 | +# the Free Software Foundation, either version 3 of the License, or |
188 | +# (at your option) any later version. |
189 | +# |
190 | +# This program is distributed in the hope that it will be useful, |
191 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
192 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
193 | +# GNU Affero General Public License for more details. |
194 | +# |
195 | +# You should have received a copy of the GNU Affero General Public License |
196 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
197 | +################################################################################ |
198 | + |
199 | +import model |
200 | +#~ import report |
201 | |
202 | === added file 'l10n_ve_withholding_src/__openerp__.py' |
203 | --- l10n_ve_withholding_src/__openerp__.py 1970-01-01 00:00:00 +0000 |
204 | +++ l10n_ve_withholding_src/__openerp__.py 2012-02-15 12:43:18 +0000 |
205 | @@ -0,0 +1,74 @@ |
206 | +#!/usr/bin/python |
207 | +# -*- encoding: utf-8 -*- |
208 | +########################################################################### |
209 | +# Module Writen to OpenERP, Open Source Management Solution |
210 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
211 | +# All Rights Reserved |
212 | +###############Credits###################################################### |
213 | +# Coded by: Humberto Arocha <hbto@vauxoo.com> |
214 | +# Planified by: Humberto Arocha / Nhomar Hernandez |
215 | +# Audited by: Vauxoo C.A. |
216 | +############################################################################# |
217 | +# This program is free software: you can redistribute it and/or modify |
218 | +# it under the terms of the GNU Affero General Public License as published by |
219 | +# the Free Software Foundation, either version 3 of the License, or |
220 | +# (at your option) any later version. |
221 | +# |
222 | +# This program is distributed in the hope that it will be useful, |
223 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
224 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
225 | +# GNU Affero General Public License for more details. |
226 | +# |
227 | +# You should have received a copy of the GNU Affero General Public License |
228 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
229 | +################################################################################ |
230 | + |
231 | +{ |
232 | + "name" : "Compromiso de Responsabilidad Social", |
233 | + "version" : "0.2", |
234 | + "author" : "Vauxoo", |
235 | + "category" : "Generic Modules", |
236 | + "website": "http://wiki.openerp.org.ve/", |
237 | + "description": ''' |
238 | + Administración de la Aplicacion del Compromiso de Responsabilidad Social |
239 | +que se establece en el Reglamento de Ley de Contrataciones Públicas, |
240 | +(Gaceta Oficial Nº 39.181 del 19 de mayo de 2009) Decreto Nº 6.708. |
241 | + |
242 | +Artículo 34 |
243 | +Supuesto cuantitativo de procedencia |
244 | +El Compromiso de Responsabilidad Social será requerido en todas las ofertas presentadas en las |
245 | +modalidades de selección de Contratistas previstas en la Ley de Contrataciones Públicas, así |
246 | +como; en los procedimientos excluidos de la aplicación de éstas, cuyo monto total, incluidos los |
247 | +tributos, superen las dos mil quinientas unidades tributarias (2.500 U.T). |
248 | + |
249 | +Artículo 35 |
250 | +Rango y normativa interna |
251 | +Para el suministro de bienes, prestación de servicios o ejecución de obras, se establece para el |
252 | +Compromiso de Responsabilidad Social un valor mínimo del uno por ciento (1%) y un valor máximo |
253 | +del cinco por ciento (5%) del monto del contrato suscrito, el cual asumirán los Contratistas |
254 | +beneficiarios de la adjudicación del mismo. Los órganos o entes contratantes deberán fijar los |
255 | +porcentajes a ser aplicados a cada condición del Compromiso de Responsabilidad Social, así |
256 | +como, establecer categorías o escalas proporcionales con base en los montos de los contratos a |
257 | +ser suscritos. |
258 | +''', |
259 | + "depends" : [ |
260 | + "base", |
261 | + "account", |
262 | + "l10n_ve_withholding", |
263 | + ], |
264 | + "init_xml" : [], |
265 | + "demo_xml" : [ |
266 | + |
267 | + ], |
268 | + "update_xml" : [ |
269 | + 'view/wh_src_view.xml', |
270 | + 'view/account_invoice_view.xml', |
271 | + 'view/company_view.xml', |
272 | + 'workflow/l10n_ve_wh_src_wf.xml', |
273 | + 'data/wh_src_sequence.xml', |
274 | + 'data/data.xml', |
275 | + 'wh_src_report.xml', |
276 | + ], |
277 | + "active": False, |
278 | + "installable": True |
279 | +} |
280 | |
281 | === added directory 'l10n_ve_withholding_src/data' |
282 | === added file 'l10n_ve_withholding_src/data/data.xml' |
283 | --- l10n_ve_withholding_src/data/data.xml 1970-01-01 00:00:00 +0000 |
284 | +++ l10n_ve_withholding_src/data/data.xml 2012-02-15 12:43:18 +0000 |
285 | @@ -0,0 +1,48 @@ |
286 | +<?xml version="1.0" encoding="utf-8"?> |
287 | +<openerp> |
288 | + <data> |
289 | + |
290 | + <record id="seq_type_account_wh_iva" model="ir.sequence.type"> |
291 | + <field name="name">Withholding src costumer</field> |
292 | + <field name="code">wh.src.out</field> |
293 | + </record> |
294 | + |
295 | + <record id="seq_type_account_wh_iva_purchase" model="ir.sequence.type"> |
296 | + <field name="name">Withholding src supplier</field> |
297 | + <field name="code">wh.src.in</field> |
298 | + </record> |
299 | + |
300 | + <record id="seq_type_account_wh_src_supplier" model="ir.sequence"> |
301 | + <field name="name">Withholding src</field> |
302 | + <field name="code">wh.src.out</field> |
303 | + <field name="prefix">src:</field> |
304 | + <field name="padding">8</field> |
305 | + <field name="number_increment">1</field> |
306 | + </record> |
307 | + |
308 | + <record id="seq_account_retencion_src_customer" model="ir.sequence"> |
309 | + <field name="name">Withholding src purchase</field> |
310 | + <field name="code">wh.src.in</field> |
311 | + <field name="prefix">%(year)s-%(month)s-</field> |
312 | + <field name="padding">8</field> |
313 | + <field name="number_increment">1</field> |
314 | + </record> |
315 | + <record id="withholding_scr_purchase_journal" model="account.journal"> |
316 | + <field name="name">DIARIO DE SRC PARA PROVEEDORES</field> |
317 | + <field name="code">srcP</field> |
318 | + <field name="type">src_purchase</field> |
319 | + <field name="view_id" ref="account.account_journal_view"/> |
320 | + <field name="sequence_id" ref="seq_type_account_wh_src_supplier"/> |
321 | + </record> |
322 | + |
323 | + <record id="withholding_src_sale_journal" model="account.journal"> |
324 | + <field name="name">DIARIO DE SRC PARA CLIENTES</field> |
325 | + <field name="code">srcC</field> |
326 | + <field name="type">src_sale</field> |
327 | + <field name="view_id" ref="account.account_journal_view"/> |
328 | + <field name="sequence_id" ref="seq_account_retencion_src_customer"/> |
329 | + </record> |
330 | + |
331 | + |
332 | + </data> |
333 | +</openerp> |
334 | |
335 | === added file 'l10n_ve_withholding_src/data/wh_src_sequence.xml' |
336 | --- l10n_ve_withholding_src/data/wh_src_sequence.xml 1970-01-01 00:00:00 +0000 |
337 | +++ l10n_ve_withholding_src/data/wh_src_sequence.xml 2012-02-15 12:43:18 +0000 |
338 | @@ -0,0 +1,26 @@ |
339 | +<?xml version="1.0" encoding="utf-8"?> |
340 | +<openerp> |
341 | + <data noupdate="1"> |
342 | + |
343 | + <!-- Sequences type for account.wh.src --> |
344 | + |
345 | + |
346 | + <record id="seq_type_account_wh_src_supplier" model="ir.sequence.type"> |
347 | + <field name="name">Withholding local.supplier</field> |
348 | + <field name="code">account.wh.src.in_invoice</field> |
349 | + </record> |
350 | + |
351 | + <!-- Sequences for account.wh.src --> |
352 | + |
353 | + |
354 | + <record id="seq_account_retencion_src_customer" model="ir.sequence"> |
355 | + <field name="name">Withholding local customer</field> |
356 | + <field name="code">account.wh.src.in_invoice</field> |
357 | + <field name="prefix">RET-SRC</field> |
358 | + <field name="padding">8</field> |
359 | + <field name="number_increment">1</field> |
360 | + </record> |
361 | + |
362 | + |
363 | + </data> |
364 | +</openerp> |
365 | |
366 | === added directory 'l10n_ve_withholding_src/files' |
367 | === added file 'l10n_ve_withholding_src/files/reglamento_de_la_ley_de_contrataciones.pdf' |
368 | Binary files l10n_ve_withholding_src/files/reglamento_de_la_ley_de_contrataciones.pdf 1970-01-01 00:00:00 +0000 and l10n_ve_withholding_src/files/reglamento_de_la_ley_de_contrataciones.pdf 2012-02-15 12:43:18 +0000 differ |
369 | === added directory 'l10n_ve_withholding_src/model' |
370 | === added file 'l10n_ve_withholding_src/model/__init__.py' |
371 | --- l10n_ve_withholding_src/model/__init__.py 1970-01-01 00:00:00 +0000 |
372 | +++ l10n_ve_withholding_src/model/__init__.py 2012-02-15 12:43:18 +0000 |
373 | @@ -0,0 +1,29 @@ |
374 | +#!/usr/bin/python |
375 | +# -*- encoding: utf-8 -*- |
376 | +########################################################################### |
377 | +# Module Writen to OpenERP, Open Source Management Solution |
378 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
379 | +# All Rights Reserved |
380 | +###############Credits###################################################### |
381 | +# Coded by: Humberto Arocha <hbto@vauxoo.com> |
382 | +# Planified by: Humberto Arocha / Nhomar Hernandez |
383 | +# Audited by: Vauxoo C.A. |
384 | +############################################################################# |
385 | +# This program is free software: you can redistribute it and/or modify |
386 | +# it under the terms of the GNU Affero General Public License as published by |
387 | +# the Free Software Foundation, either version 3 of the License, or |
388 | +# (at your option) any later version. |
389 | +# |
390 | +# This program is distributed in the hope that it will be useful, |
391 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
392 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
393 | +# GNU Affero General Public License for more details. |
394 | +# |
395 | +# You should have received a copy of the GNU Affero General Public License |
396 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
397 | +################################################################################ |
398 | + |
399 | +import wh_src |
400 | +import invoice |
401 | +import res_company |
402 | + |
403 | |
404 | === added file 'l10n_ve_withholding_src/model/invoice.py' |
405 | --- l10n_ve_withholding_src/model/invoice.py 1970-01-01 00:00:00 +0000 |
406 | +++ l10n_ve_withholding_src/model/invoice.py 2012-02-15 12:43:18 +0000 |
407 | @@ -0,0 +1,113 @@ |
408 | +#!/usr/bin/python |
409 | +# -*- encoding: utf-8 -*- |
410 | +########################################################################### |
411 | +# Module Writen to OpenERP, Open Source Management Solution |
412 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
413 | +# All Rights Reserved |
414 | +###############Credits###################################################### |
415 | +# Coded by: Humberto Arocha <hbto@vauxoo.com> |
416 | +# Planified by: Humberto Arocha / Nhomar Hernandez |
417 | +# Audited by: Vauxoo C.A. |
418 | +############################################################################# |
419 | +# This program is free software: you can redistribute it and/or modify |
420 | +# it under the terms of the GNU Affero General Public License as published by |
421 | +# the Free Software Foundation, either version 3 of the License, or |
422 | +# (at your option) any later version. |
423 | +# |
424 | +# This program is distributed in the hope that it will be useful, |
425 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
426 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
427 | +# GNU Affero General Public License for more details. |
428 | +# |
429 | +# You should have received a copy of the GNU Affero General Public License |
430 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
431 | +################################################################################ |
432 | + |
433 | +import time |
434 | +from osv import fields, osv |
435 | +from tools.translate import _ |
436 | +import decimal_precision as dp |
437 | + |
438 | +class account_invoice(osv.osv): |
439 | + _inherit = 'account.invoice' |
440 | + |
441 | + def _retenida(self, cr, uid, ids, name, args, context): |
442 | + res = {} |
443 | + if context is None: |
444 | + context = {} |
445 | + for id in ids: |
446 | + res[id] = self.test_retenida(cr, uid, [id]) |
447 | + return res |
448 | + |
449 | + def _get_inv_from_line(self, cr, uid, ids, context={}): |
450 | + move = {} |
451 | + for line in self.pool.get('account.move.line').browse(cr, uid, ids): |
452 | + if line.reconcile_partial_id: |
453 | + for line2 in line.reconcile_partial_id.line_partial_ids: |
454 | + move[line2.move_id.id] = True |
455 | + if line.reconcile_id: |
456 | + for line2 in line.reconcile_id.line_id: |
457 | + move[line2.move_id.id] = True |
458 | + invoice_ids = [] |
459 | + if move: |
460 | + invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context) |
461 | + return invoice_ids |
462 | + |
463 | + def _get_inv_from_reconcile(self, cr, uid, ids, context={}): |
464 | + move = {} |
465 | + for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids): |
466 | + for line in r.line_partial_ids: |
467 | + move[line.move_id.id] = True |
468 | + for line in r.line_id: |
469 | + move[line.move_id.id] = True |
470 | + |
471 | + invoice_ids = [] |
472 | + if move: |
473 | + invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context) |
474 | + return invoice_ids |
475 | + |
476 | + _columns = { |
477 | + 'wh_src': fields.boolean('Social Responsibility Commitment Withheld'), |
478 | + 'wh_src_rate': fields.float('SRC Wh rate', digits_compute= dp.get_precision('Withhold'), readonly=True, states={'draft':[('readonly',False)]}, help="Social Responsibility Commitment Withholding Rate"), |
479 | + 'wh_src_id': fields.many2one('account.wh.src', 'Wh. SRC Doc.', readonly=True, help="Social Responsibility Commitment Withholding Document"), |
480 | + } |
481 | + _defaults={ |
482 | + 'wh_src': False, |
483 | + } |
484 | + |
485 | + def _get_move_lines(self, cr, uid, ids, to_wh, period_id, |
486 | + pay_journal_id, writeoff_acc_id, |
487 | + writeoff_period_id, writeoff_journal_id, date, |
488 | + name, context=None): |
489 | + if context is None: context = {} |
490 | + res = super(account_invoice,self)._get_move_lines(cr, uid, ids, to_wh, period_id, |
491 | + pay_journal_id, writeoff_acc_id, |
492 | + writeoff_period_id, writeoff_journal_id, date, |
493 | + name, context=context) |
494 | + if context.get('src_wh',False): |
495 | + invoice = self.browse(cr, uid, ids[0]) |
496 | + |
497 | + types = {'out_invoice': -1, 'in_invoice': 1, 'out_refund': 1, 'in_refund': -1} |
498 | + direction = types[invoice.type] |
499 | + |
500 | + for tax_brw in to_wh: |
501 | + if types[invoice.type]==1: |
502 | + acc = tax_brw.wh_id.company_id.wh_src_collected_account_id and tax_brw.wh_id.company_id.wh_src_collected_account_id.id or False |
503 | + else: |
504 | + acc = tax_brw.wh_id.company_id.wh_src_paid_account_id and tax_brw.wh_id.company_id.wh_src_paid_account_id.id or False |
505 | + if not acc: |
506 | + raise osv.except_osv(_('Missing Account in Tax!'),_("Tax [%s] has missing account. Please, fill the missing fields") % (tax_brw.wh_id.company_id.name,)) |
507 | + res.append((0,0,{ |
508 | + 'debit': direction * tax_brw.wh_amount<0 and - direction * tax_brw.wh_amount, |
509 | + 'credit': direction * tax_brw.wh_amount>0 and direction * tax_brw.wh_amount, |
510 | + 'account_id': acc, |
511 | + 'partner_id': invoice.partner_id.id, |
512 | + 'ref':invoice.number, |
513 | + 'date': date, |
514 | + 'currency_id': False, |
515 | + 'name':name |
516 | + })) |
517 | + |
518 | + return res |
519 | + |
520 | +account_invoice() |
521 | |
522 | === added file 'l10n_ve_withholding_src/model/partner.py' |
523 | --- l10n_ve_withholding_src/model/partner.py 1970-01-01 00:00:00 +0000 |
524 | +++ l10n_ve_withholding_src/model/partner.py 2012-02-15 12:43:18 +0000 |
525 | @@ -0,0 +1,44 @@ |
526 | +#!/usr/bin/python |
527 | +# -*- encoding: utf-8 -*- |
528 | +########################################################################### |
529 | +# Module Writen to OpenERP, Open Source Management Solution |
530 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
531 | +# All Rights Reserved |
532 | +###############Credits###################################################### |
533 | +# Coded by: Humberto Arocha <hbto@vauxoo.com> |
534 | +# Planified by: Humberto Arocha / Nhomar Hernandez |
535 | +# Audited by: Vauxoo C.A. |
536 | +############################################################################# |
537 | +# Copyright (c) 2009 Latinux Inc (http://www.latinux.com/) All Rights Reserved. |
538 | +# This program is free software: you can redistribute it and/or modify |
539 | +# it under the terms of the GNU Affero General Public License as published by |
540 | +# the Free Software Foundation, either version 3 of the License, or |
541 | +# (at your option) any later version. |
542 | +# |
543 | +# This program is distributed in the hope that it will be useful, |
544 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
545 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
546 | +# GNU Affero General Public License for more details. |
547 | +# |
548 | +# You should have received a copy of the GNU Affero General Public License |
549 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
550 | +################################################################################ |
551 | + |
552 | +from osv import fields, osv |
553 | +from tools.translate import _ |
554 | +import decimal_precision as dp |
555 | +import netsvc |
556 | + |
557 | +class res_partner(osv.osv): |
558 | + _inherit = 'res.partner' |
559 | + #~ logger = netsvc.Logger() |
560 | + #~ _columns = { |
561 | + #~ 'wh_src_agent': fields.boolean('Wh. Agent', help="Indicate if the partner is a withholding vat agent"), |
562 | + #~ 'wh_src_rate': fields.float(string='Rate', digits_compute= dp.get_precision('Withhold'), help="Withholding vat rate"), |
563 | + #~ } |
564 | + #~ _defaults = { |
565 | + #~ 'wh_src_rate': lambda *a: 0, |
566 | + #~ } |
567 | + |
568 | + |
569 | +res_partner() |
570 | |
571 | === added file 'l10n_ve_withholding_src/model/res_company.py' |
572 | --- l10n_ve_withholding_src/model/res_company.py 1970-01-01 00:00:00 +0000 |
573 | +++ l10n_ve_withholding_src/model/res_company.py 2012-02-15 12:43:18 +0000 |
574 | @@ -0,0 +1,55 @@ |
575 | +#!/usr/bin/python |
576 | +# -*- encoding: utf-8 -*- |
577 | +########################################################################### |
578 | +# Module Writen to OpenERP, Open Source Management Solution |
579 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
580 | +# All Rights Reserved |
581 | +###############Credits###################################################### |
582 | +# Coded by: Humberto Arocha <hbto@vauxoo.com> |
583 | +# Planified by: Humberto Arocha / Nhomar Hernandez |
584 | +# Audited by: Vauxoo C.A. |
585 | +############################################################################# |
586 | +# This program is free software: you can redistribute it and/or modify |
587 | +# it under the terms of the GNU Affero General Public License as published by |
588 | +# the Free Software Foundation, either version 3 of the License, or |
589 | +# (at your option) any later version. |
590 | +# |
591 | +# This program is distributed in the hope that it will be useful, |
592 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
593 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
594 | +# GNU Affero General Public License for more details. |
595 | +# |
596 | +# You should have received a copy of the GNU Affero General Public License |
597 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
598 | +################################################################################ |
599 | + |
600 | +import time |
601 | +from osv import fields, osv |
602 | +from tools.translate import _ |
603 | +import decimal_precision as dp |
604 | + |
605 | +class res_company(osv.osv): |
606 | + _inherit = 'res.company' |
607 | + |
608 | + _columns = { |
609 | + 'wh_src_collected_account_id': fields.many2one( |
610 | + 'account.account', |
611 | + type='many2one', |
612 | + relation='account.account', |
613 | + string="Collected Withholding SRC Account", |
614 | + method=True, |
615 | + view_load=True, |
616 | + domain="[('type', '=', 'other')]", |
617 | + help="This account will be used when applying a withhold to an Supplier"), |
618 | + 'wh_src_paid_account_id': fields.many2one( |
619 | + 'account.account', |
620 | + type='many2one', |
621 | + relation='account.account', |
622 | + string="Paid Withholding SRC Account", |
623 | + method=True, |
624 | + view_load=True, |
625 | + domain="[('type', '=', 'other')]", |
626 | + help="This account will be used when applying a withhold to a Customer"), |
627 | + } |
628 | + |
629 | +res_company() |
630 | |
631 | === added file 'l10n_ve_withholding_src/model/wh_src.py' |
632 | --- l10n_ve_withholding_src/model/wh_src.py 1970-01-01 00:00:00 +0000 |
633 | +++ l10n_ve_withholding_src/model/wh_src.py 2012-02-15 12:43:18 +0000 |
634 | @@ -0,0 +1,341 @@ |
635 | +#!/usr/bin/python |
636 | +# -*- encoding: utf-8 -*- |
637 | +########################################################################### |
638 | +# Module Writen to OpenERP, Open Source Management Solution |
639 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
640 | +# All Rights Reserved |
641 | +###############Credits###################################################### |
642 | +# Coded by: Humberto Arocha <hbto@vauxoo.com> |
643 | +# Planified by: Humberto Arocha / Nhomar Hernandez |
644 | +# Audited by: Vauxoo C.A. |
645 | +############################################################################# |
646 | +# This program is free software: you can redistribute it and/or modify |
647 | +# it under the terms of the GNU Affero General Public License as published by |
648 | +# the Free Software Foundation, either version 3 of the License, or |
649 | +# (at your option) any later version. |
650 | +# |
651 | +# This program is distributed in the hope that it will be useful, |
652 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
653 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
654 | +# GNU Affero General Public License for more details. |
655 | +# |
656 | +# You should have received a copy of the GNU Affero General Public License |
657 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
658 | +################################################################################ |
659 | + |
660 | + |
661 | +from osv import osv, fields |
662 | +import time |
663 | +from tools import config |
664 | +from tools.translate import _ |
665 | +import decimal_precision as dp |
666 | + |
667 | + |
668 | +class account_wh_src(osv.osv): |
669 | + |
670 | + def name_get(self, cursor, user, ids, context=None): |
671 | + if isinstance(ids, (int, long)): |
672 | + ids = [ids] |
673 | + if not ids: |
674 | + return [] |
675 | + res = [] |
676 | + data_move = self.pool.get('account.wh.src').browse(cursor, user, ids, context=context) |
677 | + for move in data_move: |
678 | + if not move.name: |
679 | + if move.number: |
680 | + name = move.number |
681 | + else: |
682 | + name = 'CRS * ID = ' + str(move.id) |
683 | + else: |
684 | + name = move.name |
685 | + res.append((move.id, name)) |
686 | + return res |
687 | + |
688 | + _name = "account.wh.src" |
689 | + _description = "Social Responsibility Commitment Withholding" |
690 | + _columns = { |
691 | + 'name': fields.char('Description', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Description of withholding"), |
692 | + 'code': fields.char('Code', size=32, readonly=True, states={'draft':[('readonly',False)]}, help="Withholding reference"), |
693 | + 'number': fields.char('Number', size=32, states={'draft':[('readonly',False)]}, help="Withholding number"), |
694 | + 'type': fields.selection([ |
695 | + ('out_invoice','Customer Invoice'), |
696 | + ('in_invoice','Supplier Invoice'), |
697 | + ],'Type', readonly=False, help="Withholding type"), |
698 | + 'state': fields.selection([ |
699 | + ('draft','Draft'), |
700 | + ('confirmed', 'Confirmed'), |
701 | + ('done','Done'), |
702 | + ('cancel','Cancelled') |
703 | + ],'Estado', readonly=True, help="Estado del Comprobante"), |
704 | + 'date_ret': fields.date('Withholding date', readonly=True, states={'draft':[('readonly',False)]}, help="Keep empty to use the current date"), |
705 | + 'date': fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}, help="Date"), |
706 | + 'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','!=','done')], readonly=True, states={'draft':[('readonly',False)]}, help="Keep empty to use the period of the validation(Withholding date) date."), |
707 | + 'account_id': fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="The pay account used for this withholding."), |
708 | + 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True, required=True, states={'draft':[('readonly',False)]}, help="Withholding customer/supplier"), |
709 | + 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Currency"), |
710 | + 'journal_id': fields.many2one('account.journal', 'Journal', required=True,readonly=True, states={'draft':[('readonly',False)]}, help="Journal entry"), |
711 | + 'company_id': fields.many2one('res.company', 'Company', required=True, help="Company"), |
712 | + 'line_ids': fields.one2many('account.wh.src.line', 'wh_id', 'Local withholding lines', readonly=True, states={'draft':[('readonly',False)]}, help="Facturas a la cual se realizarán las retenciones"), |
713 | + 'wh_amount': fields.float('Amount', required=False, digits_compute= dp.get_precision('Withhold'), help="Amount withheld"), |
714 | + 'move_id':fields.many2one('account.move', 'Account Entry'), |
715 | + |
716 | + |
717 | + } |
718 | + |
719 | + def _diario(self, cr, uid, model, context=None): |
720 | + if context is None: |
721 | + context={} |
722 | + ir_model_data = self.pool.get('ir.model.data') |
723 | + journal_purchase=ir_model_data.search(cr, uid, [('model','=','account.journal'),('module','=','l10n_ve_withholding_src'),('name','=','withholding_scr_purchase_journal')]) |
724 | + journal_sale=ir_model_data.search(cr, uid, [('model','=','account.journal'),('module','=','l10n_ve_withholding_src'),('name','=','withholding_src_sale_journal')]) |
725 | + ir_model_purchase_brw=ir_model_data.browse(cr, uid, journal_purchase, context=context) |
726 | + ir_model_sale_brw=ir_model_data.browse(cr, uid, journal_sale, context=context) |
727 | + if context.get('type') == 'in_invoice': |
728 | + return ir_model_purchase_brw[0].res_id |
729 | + else: |
730 | + return ir_model_sale_brw[0].res_id |
731 | + |
732 | + |
733 | + _defaults = { |
734 | + 'state': lambda *a: 'draft', |
735 | + 'currency_id': lambda self, cr, uid, context: \ |
736 | + self.pool.get('res.company').browse(cr, uid, uid, |
737 | + context=context).currency_id.id, |
738 | + 'journal_id':lambda self, cr, uid, context: \ |
739 | + self._diario(cr, uid, uid, context), |
740 | + 'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, |
741 | + |
742 | + } |
743 | + |
744 | + _sql_constraints = [ |
745 | + |
746 | + ] |
747 | + |
748 | + def onchange_partner_id(self, cr, uid, ids, type, partner_id,context=None): |
749 | + if context is None: context = {} |
750 | + acc_id = False |
751 | + res = {} |
752 | + inv_obj = self.pool.get('account.invoice') |
753 | + wh_line_obj = self.pool.get('account.wh.src.line') |
754 | + |
755 | + if partner_id: |
756 | + p = self.pool.get('res.partner').browse(cr, uid, partner_id) |
757 | + if type in ('out_invoice', 'out_refund'): |
758 | + acc_id = p.property_account_receivable and p.property_account_receivable.id or False |
759 | + else: |
760 | + acc_id = p.property_account_payable and p.property_account_payable.id or False |
761 | + |
762 | + wh_lines = ids and wh_line_obj.search(cr, uid, [('wh_id', '=', ids[0])]) or False |
763 | + p_id_prv = ids and self.browse(cr, uid, ids[0], context=context).partner_id.id or False |
764 | + print 'idssssssssss, ',ids |
765 | + print 'partner_id, ',partner_id |
766 | + print 'p_id_prv, ',p_id_prv |
767 | + if wh_lines and p_id_prv != partner_id: |
768 | + wh_line_obj.unlink(cr, uid, wh_lines) |
769 | + |
770 | + res = {'value': { |
771 | + 'account_id': acc_id, |
772 | + } |
773 | + } |
774 | + return res |
775 | + |
776 | + |
777 | + def action_date_ret(self,cr,uid,ids,context=None): |
778 | + #~ TO-CHECK |
779 | + #~ SI EL DOCUMENTO YA TIENE FECHA SE DEVUELVE LA MISMA FECHA, |
780 | + #~ NO SE DEBE HACER NADA |
781 | + for wh in self.browse(cr, uid, ids, context): |
782 | + wh.date_ret or self.write(cr, uid, [wh.id], {'date_ret':time.strftime('%Y-%m-%d')}) |
783 | + return True |
784 | + |
785 | + |
786 | + def action_draft(self, cr, uid, ids, context={}): |
787 | + if context is None: |
788 | + context={} |
789 | + print 'ENTROOOOOO EN SET TO DRAFT' |
790 | + inv_obj = self.pool.get('account.invoice') |
791 | + |
792 | + brw = self.browse(cr,uid,ids[0],context) |
793 | + inv_ids = [i.invoice_id.id for i in brw.line_ids] |
794 | + if inv_ids: |
795 | + inv_obj.write(cr,uid,inv_ids,{'wh_src_id':False}) |
796 | + |
797 | + return self.write(cr,uid,ids[0],{'state':'draft'}) |
798 | + |
799 | + def action_confirm(self, cr, uid, ids, context={}): |
800 | + if context is None: |
801 | + context={} |
802 | + inv_obj = self.pool.get('account.invoice') |
803 | + |
804 | + brw = self.browse(cr,uid,ids[0],context) |
805 | + line_ids = brw.line_ids |
806 | + if not line_ids: |
807 | + raise osv.except_osv(_('Procedimiento invalido!'),_("No hay lineas de retencion")) |
808 | + |
809 | + res = [True] |
810 | + res+=[False for i in line_ids if i.wh_amount <= 0.0 or i.base_amount <= 0.0 or i.wh_src_rate <= 0.0 ] |
811 | + if not all(res): |
812 | + raise osv.except_osv(_('Procedimiento invalido!'),_("Verificar que las lineas de retencion\nno tenga Valores nulos (0.00)")) |
813 | + |
814 | + res = 0.0 |
815 | + for i in line_ids: |
816 | + res+=i.wh_amount |
817 | + if not res== brw.wh_amount: |
818 | + raise osv.except_osv(_('Procedimiento invalido!'),_("Verificar la suma de las retenciones")) |
819 | + |
820 | + inv_ids = [i.invoice_id.id for i in brw.line_ids] |
821 | + if inv_ids: |
822 | + inv_obj.write(cr,uid,inv_ids,{'wh_src_id':ids[0]}) |
823 | + |
824 | + return self.write(cr,uid,ids[0],{'state':'confirmed'}) |
825 | + |
826 | + def action_done(self, cr, uid, ids, context=None): |
827 | + if context is None: |
828 | + context = {} |
829 | + #~ |
830 | + self.action_date_ret(cr, uid, ids, context=context) |
831 | + self.action_number(cr, uid, ids) |
832 | + self.action_move_create(cr, uid, ids, context=context) |
833 | + |
834 | + return self.write(cr,uid,ids,{'state':'done'}) |
835 | + |
836 | + def action_cancel(self,cr,uid,ids,context={}): |
837 | + raise osv.except_osv(_('Procedimiento invalido!'),_("Por el momento, el sistema no le permite Cancelar estas Retenciones.")) |
838 | + return True |
839 | + |
840 | + def copy(self,cr,uid,id,default,context=None): |
841 | + raise osv.except_osv('Procedimiento invalido!',"No puede duplicar lineas") |
842 | + return True |
843 | + |
844 | + def unlink(self, cr, uid, ids, context=None): |
845 | + raise osv.except_osv('Procedimiento invalido!',"No puede eliminar lineas") |
846 | + return True |
847 | + |
848 | + |
849 | + |
850 | + def action_move_create(self, cr, uid, ids, context=None): |
851 | + |
852 | + inv_obj = self.pool.get('account.invoice') |
853 | + if context is None: context = {} |
854 | + |
855 | + context.update({'src_wh':True}) |
856 | + |
857 | + ret = self.browse(cr, uid, ids[0], context) |
858 | + #~ TO-CHECK |
859 | + #~ SI EL DOCUMENTO YA TIENE UN ASIENTO CONTABLE, |
860 | + #~ PRIMERO SE DEBE DESTRUIR, Y ANTES DE DESTRUIR, |
861 | + #~ SE DEBE CUMPLIR CON UNA SERIE DE CONDICIONES |
862 | + #~ PARA SU DESTRUCCION |
863 | + for line in ret.line_ids: |
864 | + if line.move_id: |
865 | + raise osv.except_osv(_('Invoice already withhold !'),\ |
866 | + _("You must omit the follow invoice '%s' !") %\ |
867 | + (line.invoice_id.number,)) |
868 | + |
869 | + acc_id = ret.account_id.id |
870 | + |
871 | + period_id = ret.period_id and ret.period_id.id or False |
872 | + journal_id = ret.journal_id.id |
873 | + if not period_id: |
874 | + per_obj = self.pool.get('account.period') |
875 | + period_id = per_obj.find(cr, uid,ret.date_ret or time.strftime('%Y-%m-%d')) |
876 | + period_id = per_obj.search(cr,uid,[('id','in',period_id),('special','=',False)]) |
877 | + if not period_id: |
878 | + raise osv.except_osv(_('Missing Periods!'),\ |
879 | + _("There are not Periods created for the pointed day: %s!") %\ |
880 | + (ret.date_ret or time.strftime('%Y-%m-%d'))) |
881 | + period_id = period_id[0] |
882 | + if period_id: |
883 | + if ret.line_ids: |
884 | + for line in ret.line_ids: |
885 | + writeoff_account_id,writeoff_journal_id = False, False |
886 | + amount = line.wh_amount |
887 | + if line.invoice_id.type in ['in_invoice','in_refund']: |
888 | + name = 'COMP. RET. CRS ' + ret.number + ' Doc. '+ (line.invoice_id.reference or '') |
889 | + else: |
890 | + name = 'COMP. RET. CRS ' + ret.number + ' Doc. '+ (line.invoice_id.number or '') |
891 | + ret_move = inv_obj.ret_and_reconcile(cr, uid, [line.invoice_id.id], |
892 | + amount, acc_id, period_id, journal_id, writeoff_account_id, |
893 | + period_id, writeoff_journal_id, ret.date_ret, name,[line], context) |
894 | + rl = { |
895 | + 'move_id': ret_move['move_id'], |
896 | + } |
897 | + lines = [(1, line.id, rl)] |
898 | + self.write(cr, uid, [ret.id], {'line_ids':lines, 'period_id':period_id}) |
899 | + |
900 | + if rl and line.invoice_id.type in ['out_invoice','out_refund']: |
901 | + inv_obj.write(cr,uid,[line.invoice_id.id],{'wh_src_id':ret.id}) |
902 | + else: |
903 | + return False |
904 | + return True |
905 | + |
906 | + def action_number(self, cr, uid, ids, *args): |
907 | + #~ TO-CHECK |
908 | + #~ SI EL DOCUMENTO YA TIENE NUMERO |
909 | + #~ SE DEVUELVE TRUE UNA VEZ |
910 | + obj_ret = self.browse(cr, uid, ids)[0] |
911 | + if obj_ret.type == 'in_invoice': |
912 | + cr.execute('SELECT id, number ' \ |
913 | + 'FROM account_wh_src ' \ |
914 | + 'WHERE id IN ('+','.join(map(str,ids))+')') |
915 | + |
916 | + for (id, number) in cr.fetchall(): |
917 | + if not number: |
918 | + number = self.pool.get('ir.sequence').get(cr, uid, 'account.wh.src.%s' % obj_ret.type) |
919 | + cr.execute('UPDATE account_wh_src SET number=%s ' \ |
920 | + 'WHERE id=%s', (number, id)) |
921 | + return True |
922 | + |
923 | + |
924 | + def wh_src_confirmed(self, cr, uid, ids): |
925 | + number = self.pool.get('account.wh.src.line') |
926 | + return True |
927 | + |
928 | + |
929 | + |
930 | +account_wh_src() |
931 | + |
932 | +class account_wh_src_line(osv.osv): |
933 | + |
934 | + _name = "account.wh.src.line" |
935 | + _description = "Social Responsibility Commitment Withholding Line" |
936 | + _columns = { |
937 | + 'name': fields.char('Description', size=64, required=True, help="Local Withholding line Description"), |
938 | + 'wh_id': fields.many2one('account.wh.src', 'Local withholding', ondelete='cascade', help="Local withholding"), |
939 | + 'invoice_id': fields.many2one('account.invoice', 'Invoice', required=True, ondelete='set null', help="Withholding invoice"), |
940 | + 'base_amount':fields.float('Base Amount', digits_compute= dp.get_precision('Base Amount to be Withheld')), |
941 | + 'wh_amount':fields.float('Withheld Amount', digits_compute= dp.get_precision('Withhold')), |
942 | + 'move_id': fields.many2one('account.move', 'Account Entry', readonly=True, help="Account Entry"), |
943 | + 'wh_src_rate':fields.float('Withholding Rate', help="Withholding rate"), |
944 | + } |
945 | + _defaults = { |
946 | + |
947 | + } |
948 | + _sql_constraints = [ |
949 | + |
950 | + ] |
951 | + |
952 | + def onchange_invoice_id(self, cr, uid, ids, type, invoice_id=False,base_amount=0.0,wh_src_rate=5.0,context=None): |
953 | + if context is None: context = {} |
954 | + res = {} |
955 | + inv_obj = self.pool.get('account.invoice') |
956 | + if not invoice_id: |
957 | + return {'value': { |
958 | + 'invoice_id': False, |
959 | + 'base_amount': 0.0, |
960 | + 'wh_src_rate': 0.0, |
961 | + 'wh_amount': 0.0,} |
962 | + } |
963 | + |
964 | + inv_brw = inv_obj.browse(cr, uid, invoice_id) |
965 | + base_amount = base_amount or inv_brw.amount_untaxed |
966 | + wh_src_rate = wh_src_rate or inv_brw.wh_src_rate or 5.0 |
967 | + wh_amount = base_amount * wh_src_rate/100.0 |
968 | + res = {'value': { |
969 | + 'base_amount': base_amount, |
970 | + 'wh_src_rate': wh_src_rate, |
971 | + 'wh_amount': wh_amount, |
972 | + } |
973 | + } |
974 | + return res |
975 | +account_wh_src_line() |
976 | |
977 | === added directory 'l10n_ve_withholding_src/report' |
978 | === added file 'l10n_ve_withholding_src/report/wh_src_report.rml' |
979 | --- l10n_ve_withholding_src/report/wh_src_report.rml 1970-01-01 00:00:00 +0000 |
980 | +++ l10n_ve_withholding_src/report/wh_src_report.rml 2012-02-15 12:43:18 +0000 |
981 | @@ -0,0 +1,418 @@ |
982 | +<?xml version="1.0"?> |
983 | +<document filename="Voucher.pdf"> |
984 | + <template pageSize="(595.0,842.0)" title="Voucher" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20"> |
985 | + <pageTemplate id="first"> |
986 | + <frame id="first" x1="28.0" y1="42.0" width="525" height="772"/> |
987 | + </pageTemplate> |
988 | + </template> |
989 | + <stylesheet> |
990 | + <blockTableStyle id="Table7"> |
991 | + <blockAlignment value="LEFT" /> |
992 | + <blockValign value="TOP" /> |
993 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
994 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
995 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
996 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
997 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="1,2" /> |
998 | + <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,2" /> |
999 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,2" /> |
1000 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1001 | + </blockTableStyle> |
1002 | + <blockTableStyle id="Table5"> |
1003 | + <blockAlignment value="LEFT" /> |
1004 | + <blockValign value="TOP" /> |
1005 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1006 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1007 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1008 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1009 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="1,2" /> |
1010 | + <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,2" /> |
1011 | +<!-- |
1012 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,2" /> |
1013 | +--> |
1014 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1015 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1016 | + </blockTableStyle> |
1017 | + <blockTableStyle id="Table8"> |
1018 | + <blockAlignment value="LEFT" /> |
1019 | + <blockValign value="TOP" /> |
1020 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1021 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1022 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1023 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1024 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="1,2" /> |
1025 | + <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,2" /> |
1026 | +<!-- |
1027 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,2" /> |
1028 | +--> |
1029 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1030 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1031 | + </blockTableStyle> |
1032 | + <blockTableStyle id="Table9"> |
1033 | + <blockAlignment value="LEFT" /> |
1034 | + <blockValign value="TOP" /> |
1035 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1036 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1037 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,1" /> |
1038 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,1" /> |
1039 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,1" /> |
1040 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,1" /> |
1041 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,2" /> |
1042 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,1" stop="3,2" /> |
1043 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,1" stop="4,2" /> |
1044 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,1" stop="5,2" /> |
1045 | +<!-- |
1046 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,3" /> |
1047 | +--> |
1048 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1049 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,1" /> |
1050 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,1" /> |
1051 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,1" /> |
1052 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,1" /> |
1053 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,1" /> |
1054 | + <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1055 | + |
1056 | + </blockTableStyle> |
1057 | + |
1058 | + <blockTableStyle id="Table11"> |
1059 | + <blockAlignment value="LEFT" /> |
1060 | + <blockValign value="TOP" /> |
1061 | + |
1062 | + |
1063 | + |
1064 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1065 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1066 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,1" /> |
1067 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,1" /> |
1068 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,1" /> |
1069 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,1" /> |
1070 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,2" /> |
1071 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,1" stop="3,2" /> |
1072 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,1" stop="4,2" /> |
1073 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,1" stop="5,2" /> |
1074 | + |
1075 | +<!-- |
1076 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,3" /> |
1077 | +--> |
1078 | + |
1079 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1080 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,1" /> |
1081 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,1" /> |
1082 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,1" /> |
1083 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,1" /> |
1084 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,1" /> |
1085 | + <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1086 | + |
1087 | + |
1088 | + </blockTableStyle> |
1089 | + |
1090 | + <blockTableStyle id="Table10"> |
1091 | + <blockAlignment value="LEFT" /> |
1092 | + <blockValign value="TOP" /> |
1093 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1094 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,2" /> |
1095 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,1" /> |
1096 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,1" /> |
1097 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,1" /> |
1098 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="5,0" stop="5,1" /> |
1099 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,1" stop="2,2" /> |
1100 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,1" stop="3,2" /> |
1101 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,1" stop="4,2" /> |
1102 | + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,1" stop="5,2" /> |
1103 | +<!-- |
1104 | + <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,3" /> |
1105 | +--> |
1106 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1107 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="1,0" stop="1,1" /> |
1108 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,1" /> |
1109 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,1" /> |
1110 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,1" /> |
1111 | + <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="5,0" stop="5,1" /> |
1112 | + <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,1" /> |
1113 | + |
1114 | + </blockTableStyle> |
1115 | + <blockTableStyle id="Table6"> |
1116 | + <blockAlignment value="LEFT"/> |
1117 | + <blockValign value="TOP"/> |
1118 | + </blockTableStyle> |
1119 | + |
1120 | + <initialize> |
1121 | + <paraStyle name="all" alignment="justify"/> |
1122 | + </initialize> |
1123 | + |
1124 | + <paraStyle name="P1" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/> |
1125 | + <paraStyle name="P2" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1126 | + <paraStyle name="P3" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
1127 | + <paraStyle name="P4" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1128 | + <paraStyle name="P5" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1129 | + <paraStyle name="P6" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1130 | + <paraStyle name="P7" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1131 | + <paraStyle name="P8" fontName="Courier-Bold" fontSize="13.0" leading="16" alignment="CENTER"/> |
1132 | + <paraStyle name="P9" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1133 | + <paraStyle name="P10" fontName="Courier" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> |
1134 | + <paraStyle name="P11" fontName="Courier-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> |
1135 | + <paraStyle name="P12" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1136 | + <paraStyle name="P13" fontName="Courier-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1137 | + <paraStyle name="P14" fontName="Courier-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1138 | + <paraStyle name="P15" fontName="Courier-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1139 | + <paraStyle name="P16" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1140 | + <paraStyle name="P17" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1141 | + <paraStyle name="P18" fontName="Courier" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1142 | + <paraStyle name="P19" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1143 | + <paraStyle name="P20" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1144 | + <paraStyle name="P20_b" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1145 | + <paraStyle name="P20_c" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1146 | + <paraStyle name="P20_a" fontName="Courier-Bold" fontSize="12.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1147 | + <paraStyle name="P21" fontName="Courier-Bold" fontSize="10.0" leading="27" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1148 | + <paraStyle name="P21_a" fontName="Helvetica-Bold" fontSize="9.0" leading="27" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1149 | + <paraStyle name="P_b" fontName="Helvetica-Bold" fontSize="9.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1150 | + <paraStyle name="P21_b" fontName="Helvetica" fontSize="10.0" leading="27" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1151 | + <paraStyle name="P21_C" fontName="Helvetica" fontSize="10.0" leading="27" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1152 | + <paraStyle name="P22" fontName="Courier" fontSize="11.0" leading="12" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1153 | + <paraStyle name="P_a" fontName="Helvetica" fontSize="10.0" leading="12" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1154 | + <paraStyle name="P22_a" fontName="Courier" fontSize="11.0" leading="12" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1155 | + <paraStyle name="P23" fontName="Courier" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1156 | + <paraStyle name="P24" fontName="Courier-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1157 | + <paraStyle name="P25" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1158 | + <paraStyle name="P26" fontName="Courier-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1159 | + <paraStyle name="P27" fontName="Helvetica-Bold" fontSize="10.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1160 | + <paraStyle name="P27_a" fontName="Helvetica-Bold" fontSize="10.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
1161 | + <paraStyle name="P28" rightIndent="0.0" leftIndent="35.0" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1162 | + <paraStyle name="P29" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1163 | + <paraStyle name="P30" rightIndent="0.0" leftIndent="71.0" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1164 | + <paraStyle name="P31" fontName="Courier" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/> |
1165 | + <paraStyle name="P32" rightIndent="0.0" leftIndent="0.0" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1166 | + <paraStyle name="P33" rightIndent="0.0" leftIndent="0.0" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1167 | + <paraStyle name="P1" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/> |
1168 | + <paraStyle name="P2" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1169 | + <paraStyle name="P3" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1170 | + <paraStyle name="P4" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1171 | + <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1172 | + |
1173 | + |
1174 | + <images/> |
1175 | + </stylesheet> |
1176 | + <story> |
1177 | + <para style="P9">[[repeatIn(objects,'o')]]</para> |
1178 | + <blockTable colWidths="241.0,241.0"> |
1179 | + <tr> |
1180 | + <td> |
1181 | + <para style="P20">[[ repeatIn(objects,'voucher') ]]</para> |
1182 | + <para style="P20">[[ setLang(company.partner_id.lang) ]]</para> |
1183 | + <para style="P_a">[[ company.name ]]</para> |
1184 | + <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para> |
1185 | + <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para> |
1186 | + <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para> |
1187 | + <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para> |
1188 | + </td> |
1189 | + <td> |
1190 | +<!-- |
1191 | + <para style="P11">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para> |
1192 | + <para style="P8">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para> |
1193 | + <para style="P11">Comprobante de Cobro Bancario [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para> |
1194 | + <para style="P8">Comprobante de Pago Bancario [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para> |
1195 | +--> |
1196 | + <blockTable colWidths="118.0,118.0" > |
1197 | + <tr> |
1198 | + <td> |
1199 | + <para style="P24"></para> |
1200 | + </td> |
1201 | + <td> |
1202 | + <para style="P25"></para> |
1203 | + </td> |
1204 | + </tr> |
1205 | + <tr> |
1206 | + <td> |
1207 | + <para style="P24"></para> |
1208 | + </td> |
1209 | + <td> |
1210 | + <para style="P25"></para> |
1211 | + </td> |
1212 | + </tr> |
1213 | + <tr> |
1214 | + <td> |
1215 | + <para style="P24"></para> |
1216 | + </td> |
1217 | + <td> |
1218 | + |
1219 | + <para style="P9"></para> |
1220 | + </td> |
1221 | + </tr> |
1222 | + </blockTable> |
1223 | + </td> |
1224 | + </tr> |
1225 | + </blockTable> |
1226 | +<!-- |
1227 | + <para style="P5">[[ repeatIn(objects,'voucher') ]]</para> |
1228 | +--> |
1229 | + |
1230 | +<!-- |
1231 | + <para style="P5">[[ repeatIn(voucher.line_ids,'l') ]]</para> |
1232 | +--> |
1233 | + <spacer length='5mm'/> |
1234 | + |
1235 | + <blockTable colWidths="524.0" style="Table6"> |
1236 | + <tr> |
1237 | + <td> |
1238 | + <para style="P21_a">COMPROBANTE DE RETENCION DE RESPONSABILIDAD SOCIAL</para> |
1239 | + </td> |
1240 | + </tr> |
1241 | + </blockTable> |
1242 | + <spacer length='2mm'/> |
1243 | + <blockTable colWidths="524.0" style="Table6"> |
1244 | + <tr> |
1245 | + <td> |
1246 | + <para style="P21_a">DATOS DEL BENEFICIARIO</para> |
1247 | + </td> |
1248 | + </tr> |
1249 | + </blockTable> |
1250 | + |
1251 | + <blockTable colWidths="300.0,224.0" style="Table7"> |
1252 | + <tr> |
1253 | + <td> |
1254 | + <para style="P21_C">[[ company.name ]]</para> |
1255 | + </td> |
1256 | + <td> |
1257 | + <para style="P21_C">[[ company.partner_id.vat or '']]</para> |
1258 | + </td> |
1259 | + </tr> |
1260 | + <tr> |
1261 | + <td> |
1262 | + <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para> |
1263 | + </td> |
1264 | + <td> |
1265 | + <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para> |
1266 | + </td> |
1267 | + </tr> |
1268 | + <tr> |
1269 | + <td> |
1270 | + <para style="P20_a"></para> |
1271 | + </td> |
1272 | + <td> |
1273 | + <para style="P21_b">Contrato</para> |
1274 | + </td> |
1275 | + </tr> |
1276 | + </blockTable> |
1277 | + |
1278 | + <spacer length='5mm'/> |
1279 | + <blockTable colWidths="524.0" style="Table6"> |
1280 | + <tr> |
1281 | + <td> |
1282 | + <para style="P21_a">DATOS DEL AGENTE DE RETENCION</para> |
1283 | + </td> |
1284 | + </tr> |
1285 | + </blockTable> |
1286 | + <blockTable colWidths="524" style="Table5"> |
1287 | + <tr> |
1288 | + <td> |
1289 | + <para style="P21_b" alignment="CENTER">[[ company.name ]] [[ company.partner_id.vat or '']]</para> |
1290 | + </td> |
1291 | + |
1292 | + </tr> |
1293 | + </blockTable> |
1294 | + <blockTable colWidths="524" style="Table8"> |
1295 | + <tr> |
1296 | + <td> |
1297 | + <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para> |
1298 | + </td> |
1299 | + </tr> |
1300 | + </blockTable> |
1301 | + |
1302 | + <spacer length='5mm'/> |
1303 | + <blockTable colWidths="524.0" style="Table6"> |
1304 | + <tr> |
1305 | + <td> |
1306 | + <para style="P21_a">POR CONCEPTO DE RETENCION</para> |
1307 | + </td> |
1308 | + </tr> |
1309 | + </blockTable> |
1310 | + |
1311 | + <blockTable colWidths="87.3,87.3,87.3,87.3,87.3,87.3" style="Table9"> |
1312 | + <tr> |
1313 | + <td> |
1314 | + <para style="P_b" alignment="CENTER">POR CONCEPTO DE:</para> |
1315 | + </td> |
1316 | + <td> |
1317 | + <para style="P_b" alignment="CENTER">MONTO RETENIDO BS.</para> |
1318 | + </td> |
1319 | + <td> |
1320 | + <para style="P_b" alignment="CENTER">% DE LA RETENCION </para> |
1321 | + </td> |
1322 | + <td> |
1323 | + <para style="P_b" alignment="CENTER">MONTO BRUTO BS</para> |
1324 | + </td> |
1325 | + <td> |
1326 | + <para style="P_b" alignment="CENTER">MONTO NETO</para> |
1327 | + </td> |
1328 | + <td> |
1329 | + <para style="P_b" alignment="CENTER">FECHA</para> |
1330 | + </td> |
1331 | + </tr> |
1332 | + </blockTable> |
1333 | +<!-- |
1334 | + <spacer length='5mm'/> |
1335 | +--> |
1336 | + <section> |
1337 | + <para style="P9">[[repeatIn(o.line_ids,'l')]]</para> |
1338 | + <blockTable colWidths="87.3,87.3,87.3,87.3,87.3,87.3" style="Table11"> |
1339 | + <tr> |
1340 | + <td> |
1341 | + <para style="P21_b" alignment="CENTER">[[l.name]]</para> |
1342 | + </td> |
1343 | + <td> |
1344 | + <para style="P21_b" alignment="CENTER">[[l.wh_amount]]</para> |
1345 | + </td> |
1346 | + <td> |
1347 | + <para style="P21_b" alignment="CENTER">[[l.wh_src_rate]]%</para> |
1348 | + </td> |
1349 | + <td> |
1350 | + <para style="P21_b" alignment="CENTER">[[l.base_amount]]</para> |
1351 | + </td> |
1352 | + <td> |
1353 | + <para style="P21_b" alignment="CENTER">[[l.invoice_id.amount_total]]</para> |
1354 | + </td> |
1355 | + <td> |
1356 | + <para style="P21_b" alignment="CENTER">[[l.invoice_id.date_invoice]]</para> |
1357 | + </td> |
1358 | + </tr> |
1359 | + </blockTable> |
1360 | + </section> |
1361 | + |
1362 | + <spacer length='5mm'/> |
1363 | + |
1364 | + <blockTable colWidths="87.3,436.7" style="Table10"> |
1365 | + <tr> |
1366 | + <td> |
1367 | + <para style="estilo6" alignment="CENTER">Código de Retención</para> |
1368 | + </td> |
1369 | + <td> |
1370 | + <para style="estilo6" alignment="CENTER">TIPO DE RETENCIÓN: RETENCIÓN DE RESPONSABILIDAD SOCIAL</para> |
1371 | + </td> |
1372 | + </tr> |
1373 | + </blockTable> |
1374 | + |
1375 | + |
1376 | + <spacer length='30mm'/> |
1377 | + <blockTable colWidths="174.0,174.0,174.0"> |
1378 | + <tr> |
1379 | + <td> |
1380 | + <para style="P27_a">Elaborado por: </para> |
1381 | + <spacer length='15mm'/> |
1382 | + <para style="P27_a">Firma y Fecha: </para> |
1383 | + </td> |
1384 | + <spacer length='10mm'/> |
1385 | + <td> |
1386 | + <para style="P27_a">Conforme por:</para> |
1387 | + <spacer length='15mm'/> |
1388 | + <para style="P27_a">Firma y Fecha: </para> |
1389 | + </td> |
1390 | + <spacer length='10mm'/> |
1391 | + <td> |
1392 | + <para style="P27_a">Recibido por:</para> |
1393 | + <spacer length='15mm'/> |
1394 | + <para style="P27_a">Firma y Fecha: </para> |
1395 | + </td> |
1396 | + </tr> |
1397 | + </blockTable> |
1398 | + </story> |
1399 | +</document> |
1400 | |
1401 | === added directory 'l10n_ve_withholding_src/security' |
1402 | === added file 'l10n_ve_withholding_src/security/ir.model.access.csv' |
1403 | --- l10n_ve_withholding_src/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 |
1404 | +++ l10n_ve_withholding_src/security/ir.model.access.csv 2012-02-15 12:43:18 +0000 |
1405 | @@ -0,0 +1,5 @@ |
1406 | +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" |
1407 | +"access_account_wh_muni_user","account.wh.muni.user","model_account_wh_munici","l10n_ve_withholding_muni.group_account_wh_muni_user",1,0,0,0 |
1408 | +"access_account_wh_muni_line_user","account.wh.muni.line.user","model_account_wh_munici_line","l10n_ve_withholding_muni.group_account_wh_muni_user",1,0,0,0 |
1409 | +"access_account_wh_muni_manager","account.wh.muni.manager","model_account_wh_munici","l10n_ve_withholding_muni.group_account_wh_muni_manager",1,1,1,1 |
1410 | +"access_account_wh_muni_line_manager","account.wh.muni.line.manager","model_account_wh_munici_line","l10n_ve_withholding_muni.group_account_wh_muni_manager",1,1,1,1 |
1411 | |
1412 | === added file 'l10n_ve_withholding_src/security/wh_muni_security.xml' |
1413 | --- l10n_ve_withholding_src/security/wh_muni_security.xml 1970-01-01 00:00:00 +0000 |
1414 | +++ l10n_ve_withholding_src/security/wh_muni_security.xml 2012-02-15 12:43:18 +0000 |
1415 | @@ -0,0 +1,13 @@ |
1416 | +<?xml version="1.0" encoding="utf-8"?> |
1417 | +<openerp> |
1418 | +<data noupdate="0"> |
1419 | + |
1420 | + <record id="group_account_wh_muni_user" model="res.groups"> |
1421 | + <field name="name">Withhold Local / User</field> |
1422 | + </record> |
1423 | + <record id="group_account_wh_muni_manager" model="res.groups"> |
1424 | + <field name="name">Withhold Local / Manager</field> |
1425 | + </record> |
1426 | + |
1427 | +</data> |
1428 | +</openerp> |
1429 | |
1430 | === added directory 'l10n_ve_withholding_src/view' |
1431 | === added file 'l10n_ve_withholding_src/view/account_invoice_view.xml' |
1432 | --- l10n_ve_withholding_src/view/account_invoice_view.xml 1970-01-01 00:00:00 +0000 |
1433 | +++ l10n_ve_withholding_src/view/account_invoice_view.xml 2012-02-15 12:43:18 +0000 |
1434 | @@ -0,0 +1,44 @@ |
1435 | +<?xml version="1.0" encoding="utf-8"?> |
1436 | +<openerp> |
1437 | + <data> |
1438 | + |
1439 | + <record id="account_invoice_wh_src_customer" model="ir.ui.view"> |
1440 | + <field name="name">account.invoice.wh.src.customer</field> |
1441 | + <field name="model">account.invoice</field> |
1442 | + <field name="type">form</field> |
1443 | + <field name="inherit_id" ref="l10n_ve_withholding.wh_inv_customer"/> |
1444 | + <field name="arch" type="xml"> |
1445 | + <xpath expr="//separator[@string='rsep']" position="after"> |
1446 | + <newline/> |
1447 | + <group col="6" colspan="4"> |
1448 | + <field name="wh_src_rate"/> |
1449 | + <field name="wh_src_id"/> |
1450 | + </group> |
1451 | + </xpath> |
1452 | + <xpath expr='//separator[@string="rsep"]' position='attributes'> |
1453 | + <attribute name="string">SRC Withholdings</attribute> |
1454 | + </xpath> |
1455 | + </field> |
1456 | + </record> |
1457 | + |
1458 | + <record id="account_invoice_wh_src_supplier" model="ir.ui.view"> |
1459 | + <field name="name">account.invoice.wh.src.supplier</field> |
1460 | + <field name="model">account.invoice</field> |
1461 | + <field name="type">form</field> |
1462 | + <field name="inherit_id" ref="l10n_ve_withholding.wh_inv_supplier"/> |
1463 | + <field name="arch" type="xml"> |
1464 | + <xpath expr="//separator[@string='rsep']" position="after"> |
1465 | + <newline/> |
1466 | + <group col="6" colspan="4"> |
1467 | + <field name="wh_src_rate"/> |
1468 | + <field name="wh_src_id"/> |
1469 | + </group> |
1470 | + </xpath> |
1471 | + <xpath expr='//separator[@string="rsep"]' position='attributes'> |
1472 | + <attribute name="string">SRC Withholdings</attribute> |
1473 | + </xpath> |
1474 | + </field> |
1475 | + </record> |
1476 | + |
1477 | + </data> |
1478 | +</openerp> |
1479 | |
1480 | === added file 'l10n_ve_withholding_src/view/company_view.xml' |
1481 | --- l10n_ve_withholding_src/view/company_view.xml 1970-01-01 00:00:00 +0000 |
1482 | +++ l10n_ve_withholding_src/view/company_view.xml 2012-02-15 12:43:18 +0000 |
1483 | @@ -0,0 +1,21 @@ |
1484 | +<?xml version="1.0" encoding="utf-8"?> |
1485 | +<openerp> |
1486 | + <data> |
1487 | + |
1488 | + <record id="account_company" model="ir.ui.view"> |
1489 | + <field name="name">res.company.account</field> |
1490 | + <field name="model">res.company</field> |
1491 | + <field name="type">form</field> |
1492 | + <field name="inherit_id" ref="base.view_company_form"/> |
1493 | + <field name="arch" type="xml"> |
1494 | + <page string="Configuration" position="inside"> |
1495 | + <separator string="Social Responsability Commitment Accounts" colspan="4"/> |
1496 | + <field name="wh_src_collected_account_id" required='1'/> |
1497 | + <field name="wh_src_paid_account_id" required='1'/> |
1498 | + <newline/> |
1499 | + </page> |
1500 | + </field> |
1501 | + </record> |
1502 | + |
1503 | + </data> |
1504 | +</openerp> |
1505 | |
1506 | === added file 'l10n_ve_withholding_src/view/partner_view.xml' |
1507 | --- l10n_ve_withholding_src/view/partner_view.xml 1970-01-01 00:00:00 +0000 |
1508 | +++ l10n_ve_withholding_src/view/partner_view.xml 2012-02-15 12:43:18 +0000 |
1509 | @@ -0,0 +1,33 @@ |
1510 | +<?xml version="1.0" encoding="utf-8"?> |
1511 | +<openerp> |
1512 | + <data> |
1513 | + |
1514 | + |
1515 | + |
1516 | + <!-- |
1517 | + ===================================================== |
1518 | + Partners Extension |
1519 | + ===================================================== |
1520 | + --> |
1521 | + |
1522 | + <record id="partner_ext_munici_view_form_loc_ve" model="ir.ui.view"> |
1523 | + <field name="name">partner_extended_munici.partner.form.view.loc_ve</field> |
1524 | + <field name="model">res.partner</field> |
1525 | + <field name="type">form</field> |
1526 | + <field name="inherit_id" ref="l10n_ve_withholding.wh_partner"/> |
1527 | + <field name="arch" type="xml"> |
1528 | + <page string="Withholdings" position="inside"> |
1529 | + <notebook> |
1530 | + <page string="Local Withholdings"> |
1531 | + <group col="4" colspan="2"> |
1532 | + <field name="property_wh_munici_payable"/> |
1533 | + <field name="property_wh_munici_receivable"/> |
1534 | + </group> |
1535 | + </page> |
1536 | + </notebook> |
1537 | + </page> |
1538 | + </field> |
1539 | + </record> |
1540 | + |
1541 | + </data> |
1542 | +</openerp> |
1543 | |
1544 | === added file 'l10n_ve_withholding_src/view/wh_src_view.xml' |
1545 | --- l10n_ve_withholding_src/view/wh_src_view.xml 1970-01-01 00:00:00 +0000 |
1546 | +++ l10n_ve_withholding_src/view/wh_src_view.xml 2012-02-15 12:43:18 +0000 |
1547 | @@ -0,0 +1,214 @@ |
1548 | +<?xml version="1.0" encoding="utf-8"?> |
1549 | +<openerp> |
1550 | + <data> |
1551 | + |
1552 | + <!-- |
1553 | + ===================================================== |
1554 | + Withholding Line View |
1555 | + ===================================================== |
1556 | + --> |
1557 | + |
1558 | + <record id="view_wh_src_line_tree" model="ir.ui.view"> |
1559 | + <field name="name">account.wh.src.line.tree</field> |
1560 | + <field name="model">account.wh.src.line</field> |
1561 | + <field name="type">tree</field> |
1562 | + <field name="arch" type="xml"> |
1563 | + <tree string="Social Responsibility Commitment Withholding Lines" editable="bottom"> |
1564 | + <field name="name"/> |
1565 | + <field name="invoice_id" on_change="onchange_invoice_id(parent.type,invoice_id,base_amount,wh_src_rate)" domain="[('wh_src_id', '=', False),('state', '=', 'open'),('partner_id','=',parent.partner_id),]"/> |
1566 | + <field name="base_amount" on_change="onchange_invoice_id(parent.type,invoice_id,base_amount,wh_src_rate)" sum='Total Base a Retener'/> |
1567 | + <field name="wh_src_rate" on_change="onchange_invoice_id(parent.type,invoice_id,base_amount,wh_src_rate)" /> |
1568 | + <field name="wh_amount" sum='Total Retenido'/> |
1569 | + <field name="move_id"/> |
1570 | + </tree> |
1571 | + </field> |
1572 | + </record> |
1573 | + |
1574 | + <record id="view_wh_src_line_form" model="ir.ui.view"> |
1575 | + <field name="name">account.wh.src.line.form</field> |
1576 | + <field name="model">account.wh.src.line</field> |
1577 | + <field name="type">form</field> |
1578 | + <field name="arch" type="xml"> |
1579 | + <form string="Social Responsibility Commitment Withholding Lines"> |
1580 | + <notebook> |
1581 | + <page string="Linea"> |
1582 | + <field name="invoice_id" on_change="onchange_invoice_id(parent.type,invoice_id,base_amount,wh_src_rate)" domain="[('wh_src_id', '=', False),('state', '=', 'open'),('partner_id','=',parent.partner_id),]"/> |
1583 | + <field colspan="4" name="name" select="1"/> |
1584 | + <field name="base_amount" on_change="onchange_invoice_id(parent.type,invoice_id,base_amount,wh_src_rate)" /> |
1585 | + <field name="wh_src_rate" on_change="onchange_invoice_id(parent.type,invoice_id,base_amount,wh_src_rate)" /> |
1586 | + <field name="wh_amount"/> |
1587 | + <field name="move_id"/> |
1588 | + </page> |
1589 | + </notebook> |
1590 | + </form> |
1591 | + </field> |
1592 | + </record> |
1593 | + |
1594 | + <!-- |
1595 | + ===================================================== |
1596 | + Withholding View |
1597 | + ===================================================== |
1598 | + --> |
1599 | + |
1600 | + <record id="view_wh_src_filter" model="ir.ui.view"> |
1601 | + <field name="name">account.wh.src.search</field> |
1602 | + <field name="model">account.wh.src</field> |
1603 | + <field name="type">search</field> |
1604 | + <field name="arch" type="xml"> |
1605 | + <search string="Search Withholding Local"> |
1606 | + <group col="10" colspan="4"> |
1607 | + <filter name="wh_src_draft" icon="terp-gtk-media-pause" string="Draft" domain="[('state','=','draft')]" help="Draft Withholding Local"/> |
1608 | + <filter name="wh_src_confirmed" icon="terp-gtk-media-pause" string="Confirmed" domain="[('state','=','confirmed')]" help="Draft Withholding Local"/> |
1609 | + <filter name="wh_src_done" icon="terp-check" string="Done" domain="[('state','=','done')]" help="Done Withholding Local"/> |
1610 | + <filter name="wh_src_cancel" icon="terp-dialog-close" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Withholding Local"/> |
1611 | + <separator orientation="vertical"/> |
1612 | + <field name="code"/> |
1613 | + <field name="number"/> |
1614 | + <field name="partner_id"/> |
1615 | + <field name="journal_id" widget="selection" string="Journal"/> |
1616 | + <field name="date_ret"/> |
1617 | + </group> |
1618 | + <newline/> |
1619 | + <group expand="1" string="Group By..."> |
1620 | + <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/> |
1621 | + <separator orientation="vertical"/> |
1622 | + <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/> |
1623 | + <separator orientation="vertical"/> |
1624 | + <filter string="Accounting Date of Withhold" icon="terp-go-month" domain="[]" context="{'group_by':'date_ret'}"/> |
1625 | + </group> |
1626 | + </search> |
1627 | + </field> |
1628 | + </record> |
1629 | + |
1630 | + <record id="view_wh_src_tree" model="ir.ui.view"> |
1631 | + <field name="name">account.wh.src.tree</field> |
1632 | + <field name="model">account.wh.src</field> |
1633 | + <field name="type">tree</field> |
1634 | + <field name="arch" type="xml"> |
1635 | + <tree colors="blue:state=='draft'" string="Social Responsibility Commitment Withholding"> |
1636 | + <field name="name"/> |
1637 | + <field name="type"/> |
1638 | + <field name="code"/> |
1639 | + <field name="number"/> |
1640 | + <field name="partner_id"/> |
1641 | + <field name="date_ret"/> |
1642 | + <field name="currency_id"/> |
1643 | + <field name="period_id"/> |
1644 | + <field name="state"/> |
1645 | + <field name="wh_amount" sum='Total Retenido'/> |
1646 | + |
1647 | + </tree> |
1648 | + </field> |
1649 | + </record> |
1650 | + |
1651 | + <record id="view_wh_src_form" model="ir.ui.view"> |
1652 | + <field name="name">account.wh.src.form</field> |
1653 | + <field name="model">account.wh.src</field> |
1654 | + <field name="type">form</field> |
1655 | + <field name="arch" type="xml"> |
1656 | + <form string="Social Responsibility Commitment Withholding"> |
1657 | + <group colspan="4" col="6"> |
1658 | + <field name="journal_id"/> |
1659 | + <field name="type"/> |
1660 | + <field name="code"/> |
1661 | + <field name="partner_id" on_change="onchange_partner_id(type,partner_id)"/> |
1662 | + <field name="currency_id"/> |
1663 | + <field name="date_ret"/> |
1664 | + <field name="account_id"/> |
1665 | + <field name="name"/> |
1666 | + <field name="period_id"/> |
1667 | + <field name="number" attrs="{'readonly':[('type','=','in_invoice')],'required':[('type','in',['out_invoice','out_refund'])]}"/> |
1668 | + <field name="date" /> |
1669 | + <field name="wh_amount"/> |
1670 | + </group> |
1671 | + <notebook colspan="4"> |
1672 | + <page string="Withholding"> |
1673 | + <field name="line_ids" default_get="{'lines': line_ids }" colspan="4" nolabel="1" height="275"> |
1674 | +<!-- |
1675 | + <field name="invoice_id" domain="[('wh_src_id', '!=', False),('state', '=', 'open'), ('partner_id','=',parent.partner_id),]"/> |
1676 | +--> |
1677 | + </field> |
1678 | + <group col="4" colspan="2"> |
1679 | + <field name="state"/> |
1680 | + </group> |
1681 | + <group col="4" colspan="2"> |
1682 | + <button name="wh_src_confirmed" states="draft" string="Confirm" icon="gtk-ok"/> |
1683 | + <button name="wh_src_done" states="confirmed" string="Done" icon="gtk-execute"/> |
1684 | + <button name="wh_src_cancel" states="done" string="Cancel" icon="gtk-cancel"/> |
1685 | + <button name="wh_src_draft" states="cancel,confirmed" string="Set to draft" icon="gtk-refresh"/> |
1686 | + </group> |
1687 | + </page> |
1688 | + <page string="Other Information"> |
1689 | + <field name="company_id"/> |
1690 | + </page> |
1691 | + </notebook> |
1692 | + </form> |
1693 | + </field> |
1694 | + </record> |
1695 | + |
1696 | + <record model="ir.actions.act_window" id="action_account_wh_src_customer"> |
1697 | + <field name="name">Social Responsibility Commitment Withholding Customer</field> |
1698 | + <field name="res_model">account.wh.src</field> |
1699 | + <field name="type">ir.actions.act_window</field> |
1700 | + <field name="view_type">form</field> |
1701 | + <field name="view_mode">tree,form</field> |
1702 | + <field name="domain">[('type','=','out_invoice')]</field> |
1703 | + <field name="context">{'type':'out_invoice'}</field> |
1704 | + <field name="search_view_id" ref="view_wh_src_filter"/> |
1705 | + <field name="help">With Social Responsibility Commitment Withholding Customer you can create and manage document withholding issued to your customers. OpenERP can also generate document withholding automatically from invoices. For retention must add the invoices, process them and then validate the document.</field> |
1706 | + </record> |
1707 | + |
1708 | + <record model="ir.actions.act_window.view" id="act_wv_account_wh_src_customer_tree"> |
1709 | + <field name="sequence" eval="10"/> |
1710 | + <field name="view_mode">tree</field> |
1711 | + <field name="view_id" ref="view_wh_src_tree"/> |
1712 | + <field name="act_window_id" ref="action_account_wh_src_customer"/> |
1713 | + </record> |
1714 | + |
1715 | + <record model="ir.actions.act_window.view" id="act_wv_account_wh_src_customer_form"> |
1716 | + <field name="sequence" eval="20"/> |
1717 | + <field name="view_mode">form</field> |
1718 | + <field name="view_id" ref="view_wh_src_form"/> |
1719 | + <field name="act_window_id" ref="action_account_wh_src_customer"/> |
1720 | + </record> |
1721 | + |
1722 | + <menuitem |
1723 | + id="menu_action_account_wh_src_customer" |
1724 | + name="Social Responsibility Commitment Withholding Customer" |
1725 | + parent="account.menu_finance_receivables" |
1726 | + action="action_account_wh_src_customer"/> |
1727 | + |
1728 | + <record model="ir.actions.act_window" id="action_account_wh_src_supplier"> |
1729 | + <field name="name">Social Responsibility Commitment Withholding Supplier</field> |
1730 | + <field name="res_model">account.wh.src</field> |
1731 | + <field name="type">ir.actions.act_window</field> |
1732 | + <field name="view_type">form</field> |
1733 | + <field name="view_mode">tree,form</field> |
1734 | + <field name="domain">[('type','=','in_invoice')]</field> |
1735 | + <field name="context">{'type':'in_invoice'}</field> |
1736 | + <field name="search_view_id" ref="view_wh_src_filter"/> |
1737 | + <field name="help">With Social Responsibility Commitment Withholding Supplier you can create and manage document withholding issued to your customers. OpenERP can also generate document withholding automatically from invoices. For retention must add the invoices, process them and then validate the document.</field> |
1738 | + </record> |
1739 | + |
1740 | + <record model="ir.actions.act_window.view" id="act_wv_account_wh_src_supplier_tree"> |
1741 | + <field name="sequence" eval="10"/> |
1742 | + <field name="view_mode">tree</field> |
1743 | + <field name="view_id" ref="view_wh_src_tree"/> |
1744 | + <field name="act_window_id" ref="action_account_wh_src_supplier"/> |
1745 | + </record> |
1746 | + |
1747 | + <record model="ir.actions.act_window.view" id="act_wv_account_wh_src_supplier_form"> |
1748 | + <field name="sequence" eval="20"/> |
1749 | + <field name="view_mode">form</field> |
1750 | + <field name="view_id" ref="view_wh_src_form"/> |
1751 | + <field name="act_window_id" ref="action_account_wh_src_supplier"/> |
1752 | + </record> |
1753 | + |
1754 | + <menuitem |
1755 | + id="menu_action_account_wh_src_supplier" |
1756 | + name="Social Responsibility Commitment Withholding Supplier" |
1757 | + parent="account.menu_finance_payables" |
1758 | + action="action_account_wh_src_supplier"/> |
1759 | + |
1760 | + </data> |
1761 | +</openerp> |
1762 | |
1763 | === added file 'l10n_ve_withholding_src/wh_src_report.xml' |
1764 | --- l10n_ve_withholding_src/wh_src_report.xml 1970-01-01 00:00:00 +0000 |
1765 | +++ l10n_ve_withholding_src/wh_src_report.xml 2012-02-15 12:43:18 +0000 |
1766 | @@ -0,0 +1,17 @@ |
1767 | +<?xml version="1.0" encoding="utf-8"?> |
1768 | +<openerp> |
1769 | + <data> |
1770 | + |
1771 | + <report |
1772 | + auto="True" |
1773 | + id="wh_src_report" |
1774 | + model="account.wh.src" |
1775 | + name="wh.src.report" |
1776 | + rml="l10n_ve_withholding_src/report/wh_src_report.rml" |
1777 | + string="Reporte Compromiso Social" |
1778 | + menu="True" |
1779 | + header="False" |
1780 | + /> |
1781 | + |
1782 | + </data> |
1783 | +</openerp> |
1784 | |
1785 | === added directory 'l10n_ve_withholding_src/wizard' |
1786 | === added file 'l10n_ve_withholding_src/wizard/__init__.py' |
1787 | --- l10n_ve_withholding_src/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
1788 | +++ l10n_ve_withholding_src/wizard/__init__.py 2012-02-15 12:43:18 +0000 |
1789 | @@ -0,0 +1,32 @@ |
1790 | +#!/usr/bin/python |
1791 | +# -*- encoding: utf-8 -*- |
1792 | +########################################################################### |
1793 | +# Module Writen to OpenERP, Open Source Management Solution |
1794 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
1795 | +# All Rights Reserved |
1796 | +###############Credits###################################################### |
1797 | +# Coded by: Javier Duran <javier@vauxoo.com> |
1798 | +# Planified by: Nhomar Hernandez |
1799 | +# Audited by: Vauxoo C.A. |
1800 | +############################################################################# |
1801 | +# This program is free software: you can redistribute it and/or modify |
1802 | +# it under the terms of the GNU Affero General Public License as published by |
1803 | +# the Free Software Foundation, either version 3 of the License, or |
1804 | +# (at your option) any later version. |
1805 | +# |
1806 | +# This program is distributed in the hope that it will be useful, |
1807 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1808 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1809 | +# GNU Affero General Public License for more details. |
1810 | +# |
1811 | +# You should have received a copy of the GNU Affero General Public License |
1812 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1813 | +################################################################################ |
1814 | + |
1815 | +import wizard_ret_munici_xml |
1816 | + |
1817 | + |
1818 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1819 | + |
1820 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1821 | + |
1822 | |
1823 | === added file 'l10n_ve_withholding_src/wizard/out.txt' |
1824 | --- l10n_ve_withholding_src/wizard/out.txt 1970-01-01 00:00:00 +0000 |
1825 | +++ l10n_ve_withholding_src/wizard/out.txt 2012-02-15 12:43:18 +0000 |
1826 | @@ -0,0 +1,1 @@ |
1827 | +False,2009/003,01245898,1,500.0,20.0 |
1828 | |
1829 | === added file 'l10n_ve_withholding_src/wizard/prueba1.py' |
1830 | --- l10n_ve_withholding_src/wizard/prueba1.py 1970-01-01 00:00:00 +0000 |
1831 | +++ l10n_ve_withholding_src/wizard/prueba1.py 2012-02-15 12:43:18 +0000 |
1832 | @@ -0,0 +1,33 @@ |
1833 | +#!/usr/bin/python |
1834 | +# -*- encoding: utf-8 -*- |
1835 | +########################################################################### |
1836 | +# Module Writen to OpenERP, Open Source Management Solution |
1837 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
1838 | +# All Rights Reserved |
1839 | +###############Credits###################################################### |
1840 | +# Coded by: Javier Duran <javier@vauxoo.com> |
1841 | +# Planified by: Nhomar Hernandez |
1842 | +# Audited by: Vauxoo C.A. |
1843 | +############################################################################# |
1844 | +# This program is free software: you can redistribute it and/or modify |
1845 | +# it under the terms of the GNU Affero General Public License as published by |
1846 | +# the Free Software Foundation, either version 3 of the License, or |
1847 | +# (at your option) any later version. |
1848 | +# |
1849 | +# This program is distributed in the hope that it will be useful, |
1850 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1851 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1852 | +# GNU Affero General Public License for more details. |
1853 | +# |
1854 | +# You should have received a copy of the GNU Affero General Public License |
1855 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1856 | +################################################################################ |
1857 | +import sys |
1858 | + |
1859 | + |
1860 | + |
1861 | +print 'Nombre Archivo:',sys.argv[0] |
1862 | +print 'Periodo:',sys.argv[1] |
1863 | + |
1864 | + |
1865 | + |
1866 | |
1867 | === added file 'l10n_ve_withholding_src/wizard/retencion_munici_wizard.xml' |
1868 | --- l10n_ve_withholding_src/wizard/retencion_munici_wizard.xml 1970-01-01 00:00:00 +0000 |
1869 | +++ l10n_ve_withholding_src/wizard/retencion_munici_wizard.xml 2012-02-15 12:43:18 +0000 |
1870 | @@ -0,0 +1,16 @@ |
1871 | +<?xml version="1.0" encoding="utf-8"?> |
1872 | +<openerp> |
1873 | + <data> |
1874 | + |
1875 | + |
1876 | + <wizard |
1877 | + string="Reporte Seniat" |
1878 | + model="account.retencion.munici" |
1879 | + name="account.ret.munici.xml.seniat" |
1880 | + id="wizard_ret_munici_xml_seniat" /> |
1881 | + |
1882 | + |
1883 | + |
1884 | + |
1885 | + </data> |
1886 | +</openerp> |
1887 | |
1888 | === added file 'l10n_ve_withholding_src/wizard/wizard_ret_munici_xml.py' |
1889 | --- l10n_ve_withholding_src/wizard/wizard_ret_munici_xml.py 1970-01-01 00:00:00 +0000 |
1890 | +++ l10n_ve_withholding_src/wizard/wizard_ret_munici_xml.py 2012-02-15 12:43:18 +0000 |
1891 | @@ -0,0 +1,116 @@ |
1892 | +#!/usr/bin/python |
1893 | +# -*- encoding: utf-8 -*- |
1894 | +########################################################################### |
1895 | +# Module Writen to OpenERP, Open Source Management Solution |
1896 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
1897 | +# All Rights Reserved |
1898 | +###############Credits###################################################### |
1899 | +# Coded by: Javier Duran <javier@vauxoo.com> |
1900 | +# Planified by: Nhomar Hernandez |
1901 | +# Audited by: Vauxoo C.A. |
1902 | +############################################################################# |
1903 | +# This program is free software: you can redistribute it and/or modify |
1904 | +# it under the terms of the GNU Affero General Public License as published by |
1905 | +# the Free Software Foundation, either version 3 of the License, or |
1906 | +# (at your option) any later version. |
1907 | +# |
1908 | +# This program is distributed in the hope that it will be useful, |
1909 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1910 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1911 | +# GNU Affero General Public License for more details. |
1912 | +# |
1913 | +# You should have received a copy of the GNU Affero General Public License |
1914 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1915 | +################################################################################ |
1916 | + |
1917 | +import wizard |
1918 | +import osv |
1919 | +import pooler |
1920 | +from tools.translate import _ |
1921 | +import os |
1922 | + |
1923 | +_transaction_form = '''<?xml version="1.0"?> |
1924 | +<form string=" Seleccione el periodo de declaracion"> |
1925 | + <field name="period_id"/> |
1926 | + |
1927 | +</form>''' |
1928 | + |
1929 | +_transaction_fields = { |
1930 | + 'period_id': { |
1931 | + 'string': 'Periodo', |
1932 | + 'type': 'many2one', |
1933 | + 'relation': 'account.period', |
1934 | + 'required': True |
1935 | + }, |
1936 | + |
1937 | +} |
1938 | + |
1939 | + |
1940 | + |
1941 | +def _data_save(self, cr, uid, data, context): |
1942 | + pool = pooler.get_pool(cr.dbname) |
1943 | + period_obj = pool.get('account.period') |
1944 | + comp_obj = pool.get('account.retencion.munici') |
1945 | + form = data['form'] |
1946 | + |
1947 | + res = {} |
1948 | + lst = [] |
1949 | + period = period_obj.browse(cr, uid, form['period_id']) |
1950 | + comp_ids = comp_obj.search(cr, uid, [('date_ret','>=',period.date_start),('date_ret','<=',period.date_stop)]) |
1951 | + for comprobante in comp_obj.browse(cr, uid, comp_ids): |
1952 | + res['rif_r'] = comprobante.partner_id.vat |
1953 | + for line in comprobante.munici_line_ids: |
1954 | + res['nro'] = line.invoice_id.number |
1955 | + res['ctrl'] = line.invoice_id.nro_ctrl |
1956 | + res['conce'] = line.concepto_id |
1957 | + res['monto'] = line.amount |
1958 | + res['ptaje'] = line.retencion_munici |
1959 | + |
1960 | + lst.append(res) |
1961 | + |
1962 | +# os.system("python /home/javier/openerp/stable/5.0/base/loc_ve_29122009/retencion_munici/wizard/prueba1.py "+period.name) |
1963 | + |
1964 | + |
1965 | + return self._csv_write(cr, uid, lst, context) |
1966 | + |
1967 | +class wiz_ret_munici_xml(wizard.interface): |
1968 | + |
1969 | + def _csv_write(self, cr, uid, data, context): |
1970 | + orden = [ |
1971 | + 'rif_r', |
1972 | + 'nro', |
1973 | + 'ctrl', |
1974 | + 'conce', |
1975 | + 'monto', |
1976 | + 'ptaje' |
1977 | + |
1978 | + ] |
1979 | + lt = [] |
1980 | + arch = [] |
1981 | + for d in data: |
1982 | + for col in orden: |
1983 | + lt.append(d[col]) |
1984 | + |
1985 | + arch.append(tuple(lt)) |
1986 | + |
1987 | + import csv |
1988 | + cw = csv.writer(open("/home/javier/openerp/stable/5.0/base/loc_ve_29122009/retencion_munici/wizard/out.csv", "wb")) |
1989 | + cw.writerows(arch) |
1990 | + return {} |
1991 | + |
1992 | + |
1993 | + states = { |
1994 | + 'init': { |
1995 | + 'actions': [], |
1996 | + 'result': {'type': 'form', 'arch':_transaction_form, 'fields':_transaction_fields, 'state':[('end','Cancel'),('change','Realizar')]} |
1997 | + }, |
1998 | + 'change': { |
1999 | + 'actions': [_data_save], |
2000 | + 'result': {'type': 'state', 'state':'end'} |
2001 | + } |
2002 | + } |
2003 | +wiz_ret_munici_xml('account.ret.munici.xml.seniat') |
2004 | + |
2005 | + |
2006 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2007 | + |
2008 | |
2009 | === added directory 'l10n_ve_withholding_src/workflow' |
2010 | === added file 'l10n_ve_withholding_src/workflow/l10n_ve_wh_src_wf.xml' |
2011 | --- l10n_ve_withholding_src/workflow/l10n_ve_wh_src_wf.xml 1970-01-01 00:00:00 +0000 |
2012 | +++ l10n_ve_withholding_src/workflow/l10n_ve_wh_src_wf.xml 2012-02-15 12:43:18 +0000 |
2013 | @@ -0,0 +1,75 @@ |
2014 | +<?xml version="1.0" encoding="utf-8"?> |
2015 | +<openerp> |
2016 | + <data> |
2017 | + |
2018 | + <record id="wh_src_wkf" model="workflow"> |
2019 | + <field name="name">Withholding SRC Order Basic Workflow</field> |
2020 | + <field name="osv">account.wh.src</field> |
2021 | + <field name="on_create">True</field> |
2022 | + </record> |
2023 | + |
2024 | + <record id="act_draft" model="workflow.activity"> |
2025 | + <field name="wkf_id" ref="wh_src_wkf"/> |
2026 | + <field name="flow_start">True</field> |
2027 | + <field name="action">action_draft()</field> |
2028 | + <field name="kind">function</field> |
2029 | + <field name="name">draft</field> |
2030 | + <field name="flow_start">True</field> |
2031 | + </record> |
2032 | + |
2033 | + <record id="act_confirmed" model="workflow.activity"> |
2034 | + <field name="wkf_id" ref="wh_src_wkf"/> |
2035 | + <field name="action">action_confirm()</field> |
2036 | + <field name="kind">function</field> |
2037 | + <field name="name">confirmed</field> |
2038 | + </record> |
2039 | + |
2040 | + <record id="act_cancel" model="workflow.activity"> |
2041 | + <field name="wkf_id" ref="wh_src_wkf"/> |
2042 | + <field name="action">action_cancel() |
2043 | + write({'state':'cancel'})</field> |
2044 | + <field name="kind">function</field> |
2045 | + <field name="name">cancel</field> |
2046 | + </record> |
2047 | + |
2048 | + <record id="act_done" model="workflow.activity"> |
2049 | + <field name="wkf_id" ref="wh_src_wkf"/> |
2050 | + <field name="action">action_done()</field> |
2051 | + <field name="kind">function</field> |
2052 | + <field name="name">done</field> |
2053 | + </record> |
2054 | + |
2055 | + |
2056 | + <record id="trans_draft_done" model="workflow.transition"> |
2057 | + <field name="act_from" ref="act_draft"/> |
2058 | + <field name="act_to" ref="act_confirmed"/> |
2059 | + <field name="signal">wh_src_confirmed</field> |
2060 | + </record> |
2061 | + |
2062 | + <record id="trans_done_cancel" model="workflow.transition"> |
2063 | + <field name="act_from" ref="act_done"/> |
2064 | + <field name="act_to" ref="act_cancel"/> |
2065 | + <field name="signal">wh_src_cancel</field> |
2066 | + </record> |
2067 | + |
2068 | + <record id="trans_cancel_draft" model="workflow.transition"> |
2069 | + <field name="act_from" ref="act_cancel"/> |
2070 | + <field name="act_to" ref="act_draft"/> |
2071 | + <field name="signal">wh_src_draft</field> |
2072 | + </record> |
2073 | + |
2074 | + <record id="trans_confirmed_draft" model="workflow.transition"> |
2075 | + <field name="act_from" ref="act_confirmed"/> |
2076 | + <field name="act_to" ref="act_draft"/> |
2077 | + <field name="signal">wh_src_draft</field> |
2078 | + </record> |
2079 | + |
2080 | + <record id="trans_confirmed_done" model="workflow.transition"> |
2081 | + <field name="act_from" ref="act_confirmed"/> |
2082 | + <field name="act_to" ref="act_done"/> |
2083 | + <field name="signal">wh_src_done</field> |
2084 | + </record> |
2085 | + |
2086 | + |
2087 | + </data> |
2088 | +</openerp> |