Merge lp:~vauxoo/openerp-venezuela-localization/israel_islr-withholding-decoupling into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
- israel_islr-withholding-decoupling
- Merge into 6.0-trunk
Proposed by
Israel Fermin Montilla
Status: | Superseded |
---|---|
Proposed branch: | lp:~vauxoo/openerp-venezuela-localization/israel_islr-withholding-decoupling |
Merge into: | lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk |
Diff against target: |
398 lines (+12/-311) 9 files modified
l10n_ve_islr_withholding/README (+5/-0) l10n_ve_islr_withholding/__init__.py (+1/-4) l10n_ve_islr_withholding/__openerp__.py (+4/-9) l10n_ve_islr_withholding/purchase.py (+0/-83) l10n_ve_islr_withholding/sale.py (+0/-66) l10n_ve_islr_withholding/stock.py (+0/-66) l10n_ve_islr_withholding/view/product_view.xml (+2/-2) l10n_ve_islr_withholding/view/purchase_view.xml (+0/-37) l10n_ve_islr_withholding/view/sale_order_view.xml (+0/-44) |
To merge this branch: | bzr merge lp:~vauxoo/openerp-venezuela-localization/israel_islr-withholding-decoupling |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nhomar - Vauxoo | Pending | ||
Review via email: mp+78125@code.launchpad.net |
Commit message
Description of the change
Info on README file inside the module
To post a comment you must log in.
- 406. By Israel Fermin Montilla
-
[REF] re-added the files that has to do with product
- 407. By Israel Fermin Montilla
-
[ADD] re-added the product files
- 408. By Israel Fermin Montilla
-
[ADD] referenced the view file on __openerp__.py
- 409. By Israel Fermin Montilla
-
[IMP] imported the product.py file on __init__.py
- 410. By Israel Fermin Montilla
-
[IMP] re-added the product dependency on __openerp__.py file
- 411. By Israel Fermin Montilla
-
[IMP] made the concept_id field optional also on view
- 412. By Israel Fermin Montilla
-
[IMP] made the concept_id field optional also on view
- 413. By Israel Fermin Montilla
-
[IMP] updated the documentation because the product dependency was re-added
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'l10n_ve_islr_withholding/README' |
2 | --- l10n_ve_islr_withholding/README 1970-01-01 00:00:00 +0000 |
3 | +++ l10n_ve_islr_withholding/README 2011-10-04 18:46:24 +0000 |
4 | @@ -0,0 +1,5 @@ |
5 | +1.- Eliminated the overriden models: files involved: product.py, sale.py, stock.py and purchase.py |
6 | +2.- Eliminated the views: files involved: sale_order_view.xml, purchase_view.xml and product_view.xml |
7 | + |
8 | +No logic modules were touched |
9 | +All deleted files were saved locally |
10 | |
11 | === modified file 'l10n_ve_islr_withholding/__init__.py' |
12 | --- l10n_ve_islr_withholding/__init__.py 2011-09-30 22:08:51 +0000 |
13 | +++ l10n_ve_islr_withholding/__init__.py 2011-10-04 18:46:24 +0000 |
14 | @@ -32,8 +32,5 @@ |
15 | import islr_wh_doc |
16 | import islr_xml_wh |
17 | import partner |
18 | -#~ import product |
19 | -#~ import purchase |
20 | -#~ import sale |
21 | -#~ import stock |
22 | +import product |
23 | import report |
24 | |
25 | === modified file 'l10n_ve_islr_withholding/__openerp__.py' |
26 | --- l10n_ve_islr_withholding/__openerp__.py 2011-10-04 15:30:46 +0000 |
27 | +++ l10n_ve_islr_withholding/__openerp__.py 2011-10-04 18:46:24 +0000 |
28 | @@ -45,14 +45,11 @@ |
29 | 1.- The periods must be defined with the format: 09/2011 (MM/YYYY). |
30 | 2.- Create the accounts of Withholding Income and assing to the partner. |
31 | 3.- Create the journal of type: islr. |
32 | + --------------------CHANGELOG------------------------------------- |
33 | + Oct 4, 2011: |
34 | + - Decoupled this module by eliminating dependencies con product, purchase, sale and stock. |
35 | ''', |
36 | - "depends" : [ "base", |
37 | - "account", |
38 | - "product", |
39 | - "purchase", |
40 | - "sale", |
41 | - "l10n_ve_withholding", |
42 | - ], |
43 | + "depends" : ["account", "l10n_ve_withholding", "product"], |
44 | "init_xml" : [], |
45 | "demo_xml":[ |
46 | "demo/l10n_ve_islr_withholding_demo.xml",], |
47 | @@ -67,8 +64,6 @@ |
48 | "view/partner_view.xml", |
49 | "view/islr_wh_doc_view.xml", |
50 | "view/islr_wh_concept_view.xml", |
51 | - "view/purchase_view.xml", |
52 | - "view/sale_order_view.xml", |
53 | "view/product_view.xml", |
54 | "islr_xml_wh_report.xml", |
55 | "islr_wh_report.xml", |
56 | |
57 | === removed file 'l10n_ve_islr_withholding/purchase.py' |
58 | --- l10n_ve_islr_withholding/purchase.py 2011-09-19 17:37:38 +0000 |
59 | +++ l10n_ve_islr_withholding/purchase.py 1970-01-01 00:00:00 +0000 |
60 | @@ -1,83 +0,0 @@ |
61 | -#!/usr/bin/python |
62 | -# -*- encoding: utf-8 -*- |
63 | -########################################################################### |
64 | -# Module Writen to OpenERP, Open Source Management Solution |
65 | -# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
66 | -# All Rights Reserved |
67 | -###############Credits###################################################### |
68 | -# Coded by: Humberto Arocha <humberto@openerp.com.ve> |
69 | -# Maria Gabriela Quilarque <gabrielaquilarque97@gmail.com> |
70 | -# Javier Duran <javier@vauxoo.com> |
71 | -# Planified by: Nhomar Hernandez |
72 | -# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve |
73 | -# Audited by: Humberto Arocha humberto@openerp.com.ve |
74 | -############################################################################# |
75 | -# This program is free software: you can redistribute it and/or modify |
76 | -# it under the terms of the GNU General Public License as published by |
77 | -# the Free Software Foundation, either version 3 of the License, or |
78 | -# (at your option) any later version. |
79 | -# |
80 | -# This program is distributed in the hope that it will be useful, |
81 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
82 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
83 | -# GNU General Public License for more details. |
84 | -# |
85 | -# You should have received a copy of the GNU General Public License |
86 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
87 | -############################################################################## |
88 | -from osv import osv |
89 | -from osv import fields |
90 | -from tools.translate import _ |
91 | -from tools import config |
92 | -import time |
93 | -import datetime |
94 | - |
95 | -class purchase_order_line(osv.osv): |
96 | - |
97 | - _name="purchase.order.line" |
98 | - _inherit ="purchase.order.line" |
99 | - |
100 | - _columns = { |
101 | - 'concept_id': fields.many2one('islr.wh.concept','Withhold Concept',help="Withhold concept associated with this rate",required=False), |
102 | - } |
103 | - |
104 | - def product_id_change(self, cr, uid, ids, pricelist, product, qty, uom, partner_id, date_order=False, fiscal_position=False, date_planned=False, name=False, price_unit=False, notes=False): |
105 | - ''' |
106 | - Funcion para entrar en el onchange del producto de la orden de compra y |
107 | - hacer que se cargue el campo de Concepto de Retencion automaticamente al seleccionar el producto. |
108 | - ''' |
109 | - data = super(purchase_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty, uom,partner_id, date_order, fiscal_position) |
110 | - if not product: |
111 | - return {'value': {'price_unit': 0.0, 'name':'','notes':'', 'product_uom' : False}, 'domain':{'product_uom':[]}} |
112 | - pro = self.pool.get('product.product').browse(cr, uid, product) |
113 | - concepto=pro.concept_id.id |
114 | - data[data.keys()[1]]['concept_id'] = concepto |
115 | - return data |
116 | - |
117 | -purchase_order_line() |
118 | - |
119 | - |
120 | -class purchase_order(osv.osv): |
121 | - _inherit = 'purchase.order' |
122 | - ''' |
123 | - Metodo para agregar el concepto de retencion en la factura, a partir de una orden de compra, desde pedido |
124 | - ''' |
125 | - def inv_line_create(self, cr, uid, a, ol): |
126 | - data = super(purchase_order, self).inv_line_create(cr, uid, a, ol) |
127 | - data[2]['concept_id'] = ol.concept_id.id |
128 | - return data |
129 | - |
130 | -purchase_order() |
131 | - |
132 | - |
133 | - |
134 | - |
135 | - |
136 | - |
137 | - |
138 | - |
139 | - |
140 | - |
141 | - |
142 | - |
143 | - |
144 | |
145 | === removed file 'l10n_ve_islr_withholding/sale.py' |
146 | --- l10n_ve_islr_withholding/sale.py 2011-09-19 17:37:38 +0000 |
147 | +++ l10n_ve_islr_withholding/sale.py 1970-01-01 00:00:00 +0000 |
148 | @@ -1,66 +0,0 @@ |
149 | -#!/usr/bin/python |
150 | -# -*- encoding: utf-8 -*- |
151 | -########################################################################### |
152 | -# Module Writen to OpenERP, Open Source Management Solution |
153 | -# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
154 | -# All Rights Reserved |
155 | -###############Credits###################################################### |
156 | -# Coded by: Humberto Arocha <humberto@openerp.com.ve> |
157 | -# Maria Gabriela Quilarque <gabrielaquilarque97@gmail.com> |
158 | -# Javier Duran <javier@vauxoo.com> |
159 | -# Planified by: Nhomar Hernandez |
160 | -# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve |
161 | -# Audited by: Humberto Arocha humberto@openerp.com.ve |
162 | -############################################################################# |
163 | -# This program is free software: you can redistribute it and/or modify |
164 | -# it under the terms of the GNU General Public License as published by |
165 | -# the Free Software Foundation, either version 3 of the License, or |
166 | -# (at your option) any later version. |
167 | -# |
168 | -# This program is distributed in the hope that it will be useful, |
169 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
170 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
171 | -# GNU General Public License for more details. |
172 | -# |
173 | -# You should have received a copy of the GNU General Public License |
174 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
175 | -############################################################################## |
176 | -from osv import osv |
177 | -from osv import fields |
178 | -from tools.translate import _ |
179 | -from tools import config |
180 | -import time |
181 | -import datetime |
182 | - |
183 | -class sale_order_line(osv.osv): |
184 | - _inherit = "sale.order.line" |
185 | - |
186 | - _columns = { |
187 | - 'concept_id': fields.many2one('islr.wh.concept','Withhold Concept',help="Withhold concept associated with this rate",required=False), |
188 | - } |
189 | - |
190 | - def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,uom=False, qty_uos=0, uos=False, name='', partner_id=False,lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False): |
191 | - data = super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty,uom, qty_uos, uos, name, partner_id,lang, update_tax, date_order, packaging, fiscal_position, flag) |
192 | - if not product: |
193 | - return {'value': {'th_weight': 0, 'product_packaging': False,'product_uos_qty': qty}, 'domain': {'product_uom': [],'product_uos': []}} |
194 | - pro = self.pool.get('product.product').browse(cr, uid, product) |
195 | - concepto=pro.concept_id.id |
196 | - data[data.keys()[2]]['concept_id'] = concepto |
197 | - return data |
198 | - |
199 | - #~metodo que agrega al original el concepto en las lineas de retencion de venta, es llamado por action_invoice_create() en sale.order |
200 | - def invoice_line_create(self, cr, uid, ids, context={}): |
201 | - create_ids = super(sale_order_line, self).invoice_line_create(cr, uid, ids, context) |
202 | - invoice_line_brws = self.pool.get('account.invoice.line').browse(cr, uid, create_ids) |
203 | - order_line_sale_brws = self.pool.get('sale.order.line').browse(cr, uid, ids) |
204 | - for line_invoice in invoice_line_brws: #lineas de la factura |
205 | - for line_sale in order_line_sale_brws: #lineas de la orden de venta |
206 | - if line_sale.product_id==line_invoice.product_id: #si es la misma linea |
207 | - self.pool.get('account.invoice.line').write(cr, uid, line_invoice.id, {'concept_id':line_sale.concept_id.id}) |
208 | - return create_ids |
209 | -sale_order_line() |
210 | - |
211 | - |
212 | - |
213 | - |
214 | - |
215 | |
216 | === removed file 'l10n_ve_islr_withholding/stock.py' |
217 | --- l10n_ve_islr_withholding/stock.py 2011-09-19 17:37:38 +0000 |
218 | +++ l10n_ve_islr_withholding/stock.py 1970-01-01 00:00:00 +0000 |
219 | @@ -1,66 +0,0 @@ |
220 | -#!/usr/bin/python |
221 | -# -*- encoding: utf-8 -*- |
222 | -########################################################################### |
223 | -# Module Writen to OpenERP, Open Source Management Solution |
224 | -# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
225 | -# All Rights Reserved |
226 | -###############Credits###################################################### |
227 | -# Coded by: Humberto Arocha <humberto@openerp.com.ve> |
228 | -# Maria Gabriela Quilarque <gabriela@vauxoo.com> |
229 | -# Javier Duran <javier@vauxoo.com> |
230 | -# Planified by: Nhomar Hernandez |
231 | -# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve |
232 | -# Audited by: Humberto Arocha humberto@openerp.com.ve |
233 | -############################################################################# |
234 | -# This program is free software: you can redistribute it and/or modify |
235 | -# it under the terms of the GNU General Public License as published by |
236 | -# the Free Software Foundation, either version 3 of the License, or |
237 | -# (at your option) any later version. |
238 | -# |
239 | -# This program is distributed in the hope that it will be useful, |
240 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
241 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
242 | -# GNU General Public License for more details. |
243 | -# |
244 | -# You should have received a copy of the GNU General Public License |
245 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
246 | -############################################################################## |
247 | -from osv import osv |
248 | -from osv import fields |
249 | -from tools.translate import _ |
250 | -from tools import config |
251 | -import time |
252 | - |
253 | -class stock_picking(osv.osv): |
254 | - _inherit = 'stock.picking' |
255 | - ''' |
256 | - Funcion que agrega a la invoice_lines el concepto de retencion a partir de una orden de compra u orden de venta, |
257 | - con metodo de facturacion a partir de albaran |
258 | - ''' |
259 | - def action_invoice_create(self, cursor, user, ids, journal_id=False,group=False, type='out_invoice', context=None): |
260 | - if context is None: |
261 | - context = {} |
262 | - data = super(stock_picking, self).action_invoice_create(cursor, user, ids, journal_id, group, type, context) |
263 | - picking_id=data.keys()[0] |
264 | - invoice_id=data[picking_id] |
265 | - invoice_brw = self.pool.get('account.invoice').browse(cursor, user, invoice_id) |
266 | - picking_brw=self.browse(cursor, user, picking_id) |
267 | - if type == 'in_invoice' or type == 'in_refund': #ORDENES DE COMPRA |
268 | - for line_invoice in invoice_brw.invoice_line: #lineas de la factura |
269 | - for line_orden in picking_brw.purchase_id.order_line: #lineas de la orden de compra |
270 | - if line_invoice.product_id==line_orden.product_id: #si es la misma linea |
271 | - self.pool.get('account.invoice.line').write(cursor, user, line_invoice.id, {'concept_id':line_orden.concept_id.id}) |
272 | - return data |
273 | - #~ ORDENES DE VENTA |
274 | - if type =='out_invoice' or type == 'out_refund': |
275 | - for line_invoice in invoice_brw.invoice_line: #lineas de la factura |
276 | - for line_orden in picking_brw.sale_id.order_line: #lineas de la orden de venta |
277 | - if line_invoice.product_id==line_orden.product_id: #si es la misma linea |
278 | - self.pool.get('account.invoice.line').write(cursor, user, line_invoice.id, {'concept_id':line_orden.concept_id.id}) |
279 | - return data |
280 | - |
281 | -stock_picking() |
282 | - |
283 | - |
284 | - |
285 | - |
286 | |
287 | === modified file 'l10n_ve_islr_withholding/view/product_view.xml' |
288 | --- l10n_ve_islr_withholding/view/product_view.xml 2011-09-26 22:15:56 +0000 |
289 | +++ l10n_ve_islr_withholding/view/product_view.xml 2011-10-04 18:46:24 +0000 |
290 | @@ -12,7 +12,7 @@ |
291 | <page string="Concept of Withholding Income"> |
292 | <separator string="Concept of Withholding Income" colspan="6"/> |
293 | <newline/> |
294 | - <field name="concept_id" required='1'/> |
295 | + <field name="concept_id" /> |
296 | </page> |
297 | </notebook> |
298 | </field> |
299 | @@ -27,7 +27,7 @@ |
300 | <page string="Concept of Withholding Income"> |
301 | <separator string="Concept of Withholding Income" colspan="6"/> |
302 | <newline/> |
303 | - <field name="concept_id" required='1'/> |
304 | + <field name="concept_id" /> |
305 | </page> |
306 | </notebook> |
307 | </field> |
308 | |
309 | === removed file 'l10n_ve_islr_withholding/view/purchase_view.xml' |
310 | --- l10n_ve_islr_withholding/view/purchase_view.xml 2011-09-26 22:15:56 +0000 |
311 | +++ l10n_ve_islr_withholding/view/purchase_view.xml 1970-01-01 00:00:00 +0000 |
312 | @@ -1,37 +0,0 @@ |
313 | -<?xml version="1.0"?> |
314 | -<openerp> |
315 | - <data> |
316 | - |
317 | - <!-- |
318 | - ===================================================== |
319 | - PURCHASE ORDER, PURCHASE ORDER LINE |
320 | - ===================================================== |
321 | - --> |
322 | - |
323 | - <record model="ir.ui.view" id="view_purchase_order_line_form_concept_islr"> |
324 | - <field name="name">purchase_order_line_form_concept_islr</field> |
325 | - <field name="model">purchase.order.line</field> |
326 | - <field name="type">form</field> |
327 | - <field name="inherit_id" ref="purchase.purchase_order_line_form"/> |
328 | - <field name="arch" type="xml"> |
329 | - <field name="product_id" position="after"> |
330 | - <field name="concept_id" required="1"/> |
331 | - </field> |
332 | - </field> |
333 | - </record> |
334 | - |
335 | - |
336 | - <record model="ir.ui.view" id="view_purchase_order_form_concept_islr"> |
337 | - <field name="name">purchase_order_form_concept_islr</field> |
338 | - <field name="model">purchase.order</field> |
339 | - <field name="type">form</field> |
340 | - <field name="inherit_id" ref="purchase.purchase_order_form"/> |
341 | - <field name="arch" type="xml"> |
342 | - <xpath expr="/form/notebook/page/field[@name='order_line']/tree/field[@name='product_qty']" position="before"> |
343 | - <field name="concept_id" required="1"/> |
344 | - </xpath> |
345 | - </field> |
346 | - </record> |
347 | - |
348 | - </data> |
349 | -</openerp> |
350 | |
351 | === removed file 'l10n_ve_islr_withholding/view/sale_order_view.xml' |
352 | --- l10n_ve_islr_withholding/view/sale_order_view.xml 2011-09-26 22:15:56 +0000 |
353 | +++ l10n_ve_islr_withholding/view/sale_order_view.xml 1970-01-01 00:00:00 +0000 |
354 | @@ -1,44 +0,0 @@ |
355 | -<?xml version="1.0"?> |
356 | -<openerp> |
357 | - <data> |
358 | - |
359 | - |
360 | - |
361 | - <record model="ir.ui.view" id="view_sale_order_line_tree_islr"> |
362 | - <field name="name">sale_order_line_tree_islr</field> |
363 | - <field name="model">sale.order.line</field> |
364 | - <field name="type">tree</field> |
365 | - <field name="inherit_id" ref="sale.view_order_line_tree"/> |
366 | - <field name="arch" type="xml"> |
367 | - <field name="product_id" position="after"> |
368 | - <field name="concept_id"/> |
369 | - </field> |
370 | - </field> |
371 | - </record> |
372 | - |
373 | - <record model="ir.ui.view" id="view_sale_order_line_form_islr"> |
374 | - <field name="name">sale_order_line_form_islr</field> |
375 | - <field name="model">sale.order.line</field> |
376 | - <field name="type">form</field> |
377 | - <field name="inherit_id" ref="sale.view_order_line_form2"/> |
378 | - <field name="arch" type="xml"> |
379 | - <field name="product_id" position="after"> |
380 | - <field name="concept_id"/> |
381 | - </field> |
382 | - </field> |
383 | - </record> |
384 | - |
385 | - <record model="ir.ui.view" id="view_sale_order_form_concept"> |
386 | - <field name="name">sale_order_form_concept</field> |
387 | - <field name="model">sale.order</field> |
388 | - <field name="type">form</field> |
389 | - <field name="inherit_id" ref="sale.view_order_form"/> |
390 | - <field name="arch" type="xml"> |
391 | - <xpath expr="/form/notebook/page/field[@name='order_line']/form/notebook/page/field[@name='product_id']" position="after"> |
392 | - <field name="concept_id" required="1"/> |
393 | - </xpath> |
394 | - </field> |
395 | - </record> |
396 | - |
397 | - </data> |
398 | -</openerp> |