Merge lp:~vauxoo/openerp-venezuela-localization/jose-wh-iva into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk

Status: Rejected
Rejected by: Gabriela Quilarque
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/jose-wh-iva
Merge into: lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
Diff against target: 56 lines (+32/-0)
2 files modified
l10n_ve_withholding_islr/islr_xml_wh.py (+18/-0)
l10n_ve_withholding_iva/generate_txt.py (+14/-0)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/jose-wh-iva
Reviewer Review Type Date Requested Status
Gabriela Quilarque Pending
Review via email: mp+80833@code.launchpad.net

Description of the change

 Added Fiscal year and period by default in the form of generate TXT

To post a comment you must log in.
Revision history for this message
Gabriela Quilarque (gabrielaquilarque97) wrote :

Wait by more improvements in next merge.

Unmerged revisions

459. By openerp <openerp@jose-desktop>

[IMP] Added Fiscal year and period by default in the form of generate TXT

458. By openerp <openerp@jose-desktop>

[IMP] Added Fiscal year and period by default in the form

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ve_withholding_islr/islr_xml_wh.py'
2--- l10n_ve_withholding_islr/islr_xml_wh.py 2011-10-25 20:33:16 +0000
3+++ l10n_ve_withholding_islr/islr_xml_wh.py 2011-10-31 18:29:24 +0000
4@@ -79,8 +79,26 @@
5 self.pool.get('res.users').browse(cr, uid, uid,
6 context=context).company_id.id,
7 'user_id': lambda s, cr, u, c: u,
8+ 'fiscalyear_id': lambda self,cr,uid,conext:\
9+ self.pool.get('account.fiscalyear').browse(cr,uid,uid,context={}).id,
10+
11+ 'period_id': lambda self,cr,uid,context: self.period_return(cr,uid,context)
12+
13+
14+
15+
16 }
17
18+ def period_return(self,cr,uid,contex=None):
19+ period_obj = self.pool.get('account.period')
20+ fecha = time.strftime('%m/%Y')
21+ period_id = period_obj.search(cr,uid,[('code','=',fecha)])
22+ if period_id:
23+ return period_id[0]
24+ else:
25+ return False
26+
27+
28 def action_anular1(self, cr, uid, ids, context={}):
29 return self.write(cr, uid, ids, {'state':'draft'})
30
31
32=== modified file 'l10n_ve_withholding_iva/generate_txt.py'
33--- l10n_ve_withholding_iva/generate_txt.py 2011-10-25 20:33:16 +0000
34+++ l10n_ve_withholding_iva/generate_txt.py 2011-10-31 18:29:24 +0000
35@@ -83,7 +83,21 @@
36 self.pool.get('res.users').browse(cr, uid, uid,
37 context=context).company_id.id,
38 'type': lambda *a:'True',
39+ 'fiscalyear_id': lambda self,cr,uid,conext:\
40+ self.pool.get('account.fiscalyear').browse(cr,uid,uid,context={}).id,
41+
42+ 'period_id': lambda self,cr,uid,context: self.period_return(cr,uid,context)
43+
44 }
45+
46+ def period_return(self,cr,uid,contex=None):
47+ period_obj = self.pool.get('account.period')
48+ fecha = time.strftime('%m/%Y')
49+ period_id = period_obj.search(cr,uid,[('code','=',fecha)])
50+ if period_id:
51+ return period_id[0]
52+ else:
53+ return False
54
55 def action_anular(self, cr, uid, ids, context={}):
56 return self.write(cr, uid, ids, {'state':'draft'})