Merge lp:~vauxoo/openerp-venezuela-localization/7.0-YAML-rev2-dev-hbto into lp:openerp-venezuela-localization

Proposed by hbto [Vauxoo] http://www.vauxoo.com
Status: Superseded
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/7.0-YAML-rev2-dev-hbto
Merge into: lp:openerp-venezuela-localization
Diff against target: 652 lines (+196/-85)
28 files modified
l10n_ve_fiscal_book/__openerp__.py (+1/-1)
l10n_ve_fiscal_requirements/__openerp__.py (+11/-10)
l10n_ve_fiscal_requirements/model/account.py (+0/-5)
l10n_ve_fiscal_requirements/model/invoice.py (+20/-17)
l10n_ve_fiscal_requirements/model/partner.py (+0/-1)
l10n_ve_fiscal_requirements/test/account_customer_invoice.yml (+29/-0)
l10n_ve_fiscal_requirements/test/account_supplier_invoice.yml (+35/-0)
l10n_ve_fiscal_requirements/test/fr_damaged.yml (+0/-2)
l10n_ve_generic/__openerp__.py (+1/-1)
l10n_ve_imex/__openerp__.py (+1/-1)
l10n_ve_sale_purchase/__openerp__.py (+1/-1)
l10n_ve_split_invoice/__openerp__.py (+1/-1)
l10n_ve_vat_write_off/__openerp__.py (+1/-1)
l10n_ve_withholding/__openerp__.py (+2/-2)
l10n_ve_withholding_islr/__openerp__.py (+1/-1)
l10n_ve_withholding_iva/__openerp__.py (+13/-13)
l10n_ve_withholding_iva/model/wh_iva.py (+1/-0)
l10n_ve_withholding_iva/test/iva_purchase_nret1.yml (+1/-1)
l10n_ve_withholding_iva/test/iva_purchase_nret2.yml (+1/-1)
l10n_ve_withholding_iva/test/iva_purchase_nret3.yml (+1/-1)
l10n_ve_withholding_iva/test/iva_purchase_wh.yml (+19/-8)
l10n_ve_withholding_iva/test/iva_sale_wh.yml (+2/-0)
l10n_ve_withholding_iva/test/iva_test_wh_2.yml (+33/-6)
l10n_ve_withholding_iva/test/iva_test_wh_3.yml (+12/-6)
l10n_ve_withholding_iva/test/iva_test_wh_4.yml (+6/-2)
l10n_ve_withholding_muni/__openerp__.py (+1/-1)
l10n_ve_withholding_src/__openerp__.py (+1/-1)
ovl/__openerp__.py (+1/-1)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/7.0-YAML-rev2-dev-hbto
Reviewer Review Type Date Requested Status
Nhomar - Vauxoo Pending
Review via email: mp+195462@code.launchpad.net

This proposal has been superseded by a proposal from 2013-11-17.

To post a comment you must log in.
914. By hbto [Vauxoo] http://www.vauxoo.com

[FIX] Fixing get_journal method on invoice

915. By hbto [Vauxoo] http://www.vauxoo.com

[MERGE] From lp:~vauxoo/openerp-venezuela-localization/7.0-fixing-demo

916. By hbto [Vauxoo] http://www.vauxoo.com

[FIX] Cleansing

917. By hbto [Vauxoo] http://www.vauxoo.com

[FIX] Checking copy method does not pass unneeded args to the new record

918. By hbto [Vauxoo] http://www.vauxoo.com

[IMP] First test of Customer & Supplier invoice

919. By hbto [Vauxoo] http://www.vauxoo.com

[FIX] Putting on hold the following modules, by now they are not installable:
l10n_ve_fiscal_book
l10n_ve_generic
l10n_ve_imex
l10n_ve_sale_purchase
l10n_ve_split_invoice
l10n_ve_vat_write_off
l10n_ve_withholding
l10n_ve_withholding_islr
l10n_ve_withholding_iva
l10n_ve_withholding_muni
l10n_ve_withholding_src
ovl

920. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][l10n_ve_withholding] Cleansing

921. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][l10n_ve_withholding] Enabling Module & Disabling Test for Module

922. By hbto [Vauxoo] http://www.vauxoo.com

[IMP][l10n_ve_withholding] Enabled & Added, checking invoice and taxes are OK

923. By hbto [Vauxoo] http://www.vauxoo.com

[MERGE][l10n_ve_withholding_muni] Cleansing & Enabling Module

924. By hbto [Vauxoo] http://www.vauxoo.com

[MERGE][l10n_ve_withholding_islr] Cleansing & Enabling Module

925. By hbto [Vauxoo] http://www.vauxoo.com

[MERGE][l10n_ve_withholding_src] Cleansing & Enabling Module

926. By hbto [Vauxoo] http://www.vauxoo.com

[MERGE][l10n_ve_withholding_iva] Cleansing & Enabling Module, and Restricting Test

927. By hbto [Vauxoo] http://www.vauxoo.com

[MERGE][l10n_ve_withholding_iva] From lp:~vauxoo/openerp-venezuela-localization/7.0-fixing-demo

928. By hbto [Vauxoo] http://www.vauxoo.com

[FIX] Fixing demo data

929. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][l10n_ve_imex] Enabling Module

930. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][l10n_ve_split_invoice] Enabling & Scrambling split_invoice

931. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][l10n_ve_generic] Enabling Module

932. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][l10n_ve_fiscal_book] Enabling Module

933. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][l10n_ve_vat_write_off] Enabling Module

934. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][ovl] Enabling Module

935. By hbto [Vauxoo] http://www.vauxoo.com

[MERGE][l10n_ve_sale_purchase] Enabling & Restructuring Module

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'l10n_ve_fiscal_book/__openerp__.py'
--- l10n_ve_fiscal_book/__openerp__.py 2013-05-27 16:36:56 +0000
+++ l10n_ve_fiscal_book/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -65,5 +65,5 @@
65 "security/ir.model.access.csv"65 "security/ir.model.access.csv"
66 ],66 ],
67 "active": False,67 "active": False,
68 "installable": True,68 "installable": False,
69}69}
7070
=== modified file 'l10n_ve_fiscal_requirements/__openerp__.py'
--- l10n_ve_fiscal_requirements/__openerp__.py 2013-11-16 17:50:57 +0000
+++ l10n_ve_fiscal_requirements/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -91,20 +91,21 @@
91 'demo/demo_partners.xml',91 'demo/demo_partners.xml',
92 'demo/journal_demo.xml',92 'demo/journal_demo.xml',
93 'demo/demo_invoice.xml',93 'demo/demo_invoice.xml',
94 'demo/demo_taxes.yml',94# 'demo/demo_taxes.yml',
95 ],95 ],
96 'test': [96 'test': [
97 'test/control_number.yml',97 'test/account_customer_invoice.yml',
98 'test/fr_sale_test.yml',98 'test/account_supplier_invoice.yml',
99 'test/fr_purchase_test.yml',99# 'test/control_number.yml',
100 'test/fr_address.yml',100# 'test/fr_sale_test.yml',
101 'test/fr_vat_test.yml',101# 'test/fr_purchase_test.yml',
102 'test/fr_damaged.yml',102# 'test/fr_address.yml',
103 'test/fr_debit_note.yml',103# 'test/fr_vat_test.yml',
104 'test/fr_refund_note.yml',104# 'test/fr_damaged.yml',
105# 'test/fr_debit_note.yml',
106# 'test/fr_refund_note.yml',
105 ],107 ],
106 'installable': True,108 'installable': True,
107 'active': False,109 'active': False,
108}110}
109111
110# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
111112
=== modified file 'l10n_ve_fiscal_requirements/model/account.py'
--- l10n_ve_fiscal_requirements/model/account.py 2013-02-13 19:39:18 +0000
+++ l10n_ve_fiscal_requirements/model/account.py 2013-11-17 23:21:43 +0000
@@ -24,9 +24,6 @@
24################################################################################24################################################################################
2525
26from openerp.osv import fields, osv26from openerp.osv import fields, osv
27__TYPES__ = [('sale_debit', 'Sale Debit'),('purchase_debit', 'Purchase Debit')]
28
29__HELP__= " Select 'Sale Debit' for customer debit note journals. Select 'Purchase Debit' for supplier debit note journals."
3027
31class account_journal(osv.osv):28class account_journal(osv.osv):
32 _inherit = 'account.journal'29 _inherit = 'account.journal'
@@ -45,5 +42,3 @@
45 " Select 'Sale Debit' for customer debit note journals."\42 " Select 'Sale Debit' for customer debit note journals."\
46 " Select 'Purchase Debit' for supplier debit note journals.")43 " Select 'Purchase Debit' for supplier debit note journals.")
47 }44 }
48
49account_journal()
5045
=== modified file 'l10n_ve_fiscal_requirements/model/invoice.py'
--- l10n_ve_fiscal_requirements/model/invoice.py 2013-06-01 18:58:59 +0000
+++ l10n_ve_fiscal_requirements/model/invoice.py 2013-11-17 23:21:43 +0000
@@ -33,21 +33,18 @@
33 it does not exist, return false33 it does not exist, return false
34 """34 """
35 35
36 if context is None:36 context = context or {}
37 context = {}37 res = super(account_invoice, self)._get_journal(cr, uid, context=context)
38 journal_type_inv = context.get('journal_type', 'sale')38 if res: return res
39 39 type_inv = context.get('type', 'sale')
40 if journal_type_inv in ('sale_debit', 'purchase_debit'):40 if type_inv in ('sale_debit', 'purchase_debit'):
41 user = self.pool.get('res.users').browse(cr, uid, uid, context=context)41 user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
42 company_id = context.get('company_id', user.company_id.id)42 company_id = context.get('company_id', user.company_id.id)
43 journal_obj = self.pool.get('account.journal')43 journal_obj = self.pool.get('account.journal')
44 res = journal_obj.search(cr, uid, [('type', '=',journal_type_inv),44 domain = [('company_id', '=', company_id),('type', '=',type_inv)]
45 ('company_id', '=', company_id)],45 res = journal_obj.search(cr, uid, domain, limit=1)
46 limit=1)46 return res and res[0] or False
47 return res and res[0] or False47
48 else:
49 return super(account_invoice, self)._get_journal(cr, uid, context=context)
50
51 def _unique_invoice_per_partner(self, cr, uid, ids, context=None):48 def _unique_invoice_per_partner(self, cr, uid, ids, context=None):
52 """ Return false when it is found 49 """ Return false when it is found
53 that the bill is not out_invoice or out_refund,50 that the bill is not out_invoice or out_refund,
@@ -118,6 +115,17 @@
118 'child_ids':[],115 'child_ids':[],
119 'nro_ctrl':None,116 'nro_ctrl':None,
120 'supplier_invoice_number':None, 117 'supplier_invoice_number':None,
118 'sin_cred': False,
119 # No cleaned in this copy because it is related to the previous
120 # document, if previous document says so this too
121 # 'parent_id':False,
122 'date_document': False,
123 'invoice_printer' : '',
124 'fiscal_printer' : '',
125 # No cleaned in this copy because it is related to the previous
126 # document, if previous document says so this too
127 #'loc_req':False,
128 'z_report': '',
121 })129 })
122 return super(account_invoice, self).copy(cr, uid, id, default, context)130 return super(account_invoice, self).copy(cr, uid, id, default, context)
123131
@@ -129,9 +137,6 @@
129 return super(account_invoice, self).write(cr, uid, ids, vals,137 return super(account_invoice, self).write(cr, uid, ids, vals,
130 context=context)138 context=context)
131139
132account_invoice()
133
134
135class account_invoice_tax(osv.osv):140class account_invoice_tax(osv.osv):
136 _inherit = 'account.invoice.tax'141 _inherit = 'account.invoice.tax'
137 _columns = {142 _columns = {
@@ -139,6 +144,4 @@
139 help="Tax relation to original tax, to be able to take off all data from invoices."),144 help="Tax relation to original tax, to be able to take off all data from invoices."),
140 }145 }
141146
142account_invoice_tax()
143
144# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:147# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
145148
=== modified file 'l10n_ve_fiscal_requirements/model/partner.py'
--- l10n_ve_fiscal_requirements/model/partner.py 2013-11-16 04:03:30 +0000
+++ l10n_ve_fiscal_requirements/model/partner.py 2013-11-17 23:21:43 +0000
@@ -308,5 +308,4 @@
308 # force full VIES online check308 # force full VIES online check
309 self.update_rif(cr, uid, ids, context=context)309 self.update_rif(cr, uid, ids, context=context)
310 return True310 return True
311res_partner()
312# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:311# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
313312
=== added file 'l10n_ve_fiscal_requirements/test/account_customer_invoice.yml'
--- l10n_ve_fiscal_requirements/test/account_customer_invoice.yml 1970-01-01 00:00:00 +0000
+++ l10n_ve_fiscal_requirements/test/account_customer_invoice.yml 2013-11-17 23:21:43 +0000
@@ -0,0 +1,29 @@
1-
2 In order to test account invoice I create a new customer invoice
3-
4 I set the context that will be used for the encoding of all the invoices of this file
5-
6 !context
7 'type': 'out_invoice'
8-
9 I create a customer invoice
10-
11 !record {model: account.invoice, id: account_invoice_customer0, view: account.invoice_form}:
12 payment_term: account.account_payment_term_advance
13 journal_id: account.sales_journal
14 partner_id: base.res_partner_3
15 reference_type: none
16 name: 'Test Customer Invoice - l10n_ve_fiscal_requirements'
17 invoice_line:
18 - product_id: product.product_product_5
19 quantity: 10.0
20-
21 I check that Initially customer invoice state is "Draft"
22-
23 !assert {model: account.invoice, id: account_invoice_customer0}:
24 - state == 'draft'
25-
26 I check that the customer invoice is a "Customer Invoice"
27-
28 !assert {model: account.invoice, id: account_invoice_customer0, string: This is not a customer invoice}:
29 - type == 'out_invoice'
030
=== added file 'l10n_ve_fiscal_requirements/test/account_supplier_invoice.yml'
--- l10n_ve_fiscal_requirements/test/account_supplier_invoice.yml 1970-01-01 00:00:00 +0000
+++ l10n_ve_fiscal_requirements/test/account_supplier_invoice.yml 2013-11-17 23:21:43 +0000
@@ -0,0 +1,35 @@
1-
2 In order to test account invoice I create a new supplier invoice
3-
4 I set the context that will be used for the encoding of all the invoices of this file
5-
6 !context
7 'type': 'in_invoice'
8-
9 I create a supplier invoice
10-
11 !record {model: account.invoice, id: account_invoice_supplier0, view: account.invoice_supplier_form }:
12 account_id: account.a_pay
13 company_id: base.main_company
14 currency_id: base.EUR
15 invoice_line:
16 - account_id: account.a_expense
17 name: '[PCSC234] PC Assemble SC234'
18 price_unit: 300.0
19 product_id: product.product_product_3
20 quantity: 10.0
21 uos_id: product.product_uom_unit
22 journal_id: account.expenses_journal
23 partner_id: base.res_partner_12
24 reference_type: none
25 type: 'in_invoice'
26-
27 I check that Initially supplier invoice state is "Draft"
28-
29 !assert {model: account.invoice, id: account_invoice_supplier0}:
30 - state == 'draft'
31-
32 I check that the supplier invoice is a "Supplier Invoice"
33-
34 !assert {model: account.invoice, id: account_invoice_supplier0, string: This is not a supplier invoice}:
35 - type == 'in_invoice'
036
=== modified file 'l10n_ve_fiscal_requirements/test/fr_damaged.yml'
--- l10n_ve_fiscal_requirements/test/fr_damaged.yml 2013-11-14 20:14:21 +0000
+++ l10n_ve_fiscal_requirements/test/fr_damaged.yml 2013-11-17 23:21:43 +0000
@@ -109,7 +109,6 @@
109 !python {model: account.journal}: |109 !python {model: account.journal}: |
110 aj_ids = self.search(cr, uid, [('type', '=','sale')])110 aj_ids = self.search(cr, uid, [('type', '=','sale')])
111 assert aj_ids, 'There are no Journals'111 assert aj_ids, 'There are no Journals'
112
113 self.write(cr, uid, aj_ids, {'update_posted': True})112 self.write(cr, uid, aj_ids, {'update_posted': True})
114-113-
115 6.13 Verify that the journal was properly updated114 6.13 Verify that the journal was properly updated
@@ -171,4 +170,3 @@
171 pass170 pass
172 finally:171 finally:
173 cr.sql_log = l172 cr.sql_log = l
174
175173
=== modified file 'l10n_ve_generic/__openerp__.py'
--- l10n_ve_generic/__openerp__.py 2012-09-24 12:47:27 +0000
+++ l10n_ve_generic/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -39,7 +39,7 @@
39 "update_xml" : ['account_tax_code.xml',"account_chart.xml",39 "update_xml" : ['account_tax_code.xml',"account_chart.xml",
40 'account_tax.xml','l10n_chart_ve_wizard.xml'],40 'account_tax.xml','l10n_chart_ve_wizard.xml'],
41 "auto_install": False,41 "auto_install": False,
42 "installable": True,42 "installable": False,
43 'images': ['images/config_chart_l10n_ve.jpeg','images/l10n_ve_chart.jpeg'],43 'images': ['images/config_chart_l10n_ve.jpeg','images/l10n_ve_chart.jpeg'],
44}44}
45# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:45# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4646
=== modified file 'l10n_ve_imex/__openerp__.py'
--- l10n_ve_imex/__openerp__.py 2013-04-29 16:31:11 +0000
+++ l10n_ve_imex/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -55,5 +55,5 @@
55 'workflow/customs_form.xml',55 'workflow/customs_form.xml',
56 ],56 ],
57 "active": False,57 "active": False,
58 "installable": True,58 "installable": False,
59}59}
6060
=== modified file 'l10n_ve_sale_purchase/__openerp__.py'
--- l10n_ve_sale_purchase/__openerp__.py 2013-09-18 23:55:08 +0000
+++ l10n_ve_sale_purchase/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -41,7 +41,7 @@
41 ],41 ],
42 'demo' : [],42 'demo' : [],
43 'active' : False,43 'active' : False,
44 'installable': True,44 'installable': False,
45 'test': [45 'test': [
46# 'test/purchase_order.yml',46# 'test/purchase_order.yml',
47# 'test/purchase_picking.yml',47# 'test/purchase_picking.yml',
4848
=== modified file 'l10n_ve_split_invoice/__openerp__.py'
--- l10n_ve_split_invoice/__openerp__.py 2013-11-14 20:44:23 +0000
+++ l10n_ve_split_invoice/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -58,5 +58,5 @@
58 'test/spl_test.yml',58 'test/spl_test.yml',
59 ],59 ],
60 "active": False,60 "active": False,
61 "installable": True,61 "installable": False,
62}62}
6363
=== modified file 'l10n_ve_vat_write_off/__openerp__.py'
--- l10n_ve_vat_write_off/__openerp__.py 2013-05-02 17:01:41 +0000
+++ l10n_ve_vat_write_off/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -13,6 +13,6 @@
13 "view/l10n_ve_vat_write_off.xml",13 "view/l10n_ve_vat_write_off.xml",
14 ],14 ],
15 "active": False,15 "active": False,
16 "installable": True,16 "installable": False,
17}17}
1818
1919
=== modified file 'l10n_ve_withholding/__openerp__.py'
--- l10n_ve_withholding/__openerp__.py 2013-09-18 23:55:08 +0000
+++ l10n_ve_withholding/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -49,9 +49,9 @@
49 ],49 ],
50 'demo_xml': [],50 'demo_xml': [],
51 'test': [51 'test': [
52# 'test/wh_pay_invoice.yml'52 'test/wh_pay_invoice.yml'
53 ],53 ],
54 'installable': True,54 'installable': False,
55 'active': False,55 'active': False,
56}56}
5757
5858
=== modified file 'l10n_ve_withholding_islr/__openerp__.py'
--- l10n_ve_withholding_islr/__openerp__.py 2013-11-14 20:14:21 +0000
+++ l10n_ve_withholding_islr/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -74,5 +74,5 @@
74# 'test/test_duplicate.yml',74# 'test/test_duplicate.yml',
75 ],75 ],
76 "active": False,76 "active": False,
77 "installable": True77 "installable": False,
78}78}
7979
=== modified file 'l10n_ve_withholding_iva/__openerp__.py'
--- l10n_ve_withholding_iva/__openerp__.py 2013-11-17 02:03:44 +0000
+++ l10n_ve_withholding_iva/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -72,20 +72,20 @@
72 ],72 ],
7373
74 'test': [74 'test': [
75# 'test/iva_purchase.yml',75 'test/iva_purchase.yml',
76# 'test/iva_purchase_wh.yml',76 'test/iva_purchase_wh.yml',
77# 'test/iva_purchase_nret1.yml',77 'test/iva_purchase_nret1.yml',
78# 'test/iva_purchase_nret2.yml',78 'test/iva_purchase_nret2.yml',
79# 'test/iva_purchase_nret3.yml',79 'test/iva_purchase_nret3.yml',
80# 'test/iva_sale.yml',80 'test/iva_sale.yml',
81# 'test/iva_sale_wh.yml',81 'test/iva_sale_wh.yml',
82# 'test/iva_test_invoice.yml',82 'test/iva_test_invoice.yml',
83# 'test/iva_test_wh.yml',83 'test/iva_test_wh.yml',
84# 'test/iva_test_wh_2.yml',84 'test/iva_test_wh_2.yml',
85# 'test/iva_test_wh_3.yml',85 'test/iva_test_wh_3.yml',
86# 'test/iva_test_wh_4.yml',86 'test/iva_test_wh_4.yml',
87 ],87 ],
88 'installable': True,88 'installable': False,
89 'active': False,89 'active': False,
90}90}
9191
9292
=== modified file 'l10n_ve_withholding_iva/model/wh_iva.py'
--- l10n_ve_withholding_iva/model/wh_iva.py 2013-07-23 14:23:34 +0000
+++ l10n_ve_withholding_iva/model/wh_iva.py 2013-11-17 23:21:43 +0000
@@ -725,6 +725,7 @@
725 fortnight_str = {'True': ' - Second Fortnight)',725 fortnight_str = {'True': ' - Second Fortnight)',
726 'False': ' - First Fortnight)'}726 'False': ' - First Fortnight)'}
727 for awi_brw in self.browse(cr, uid, ids, context=context):727 for awi_brw in self.browse(cr, uid, ids, context=context):
728 if not awi_brw.wh_lines: return False
728 if awi_brw.type in ['out_invoice']: return True729 if awi_brw.type in ['out_invoice']: return True
729 for awil_brw in awi_brw.wh_lines:730 for awil_brw in awi_brw.wh_lines:
730 awil_period_id, awil_fortnight = per_obj.find_fortnight(731 awil_period_id, awil_fortnight = per_obj.find_fortnight(
731732
=== modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret1.yml'
--- l10n_ve_withholding_iva/test/iva_purchase_nret1.yml 2013-01-15 15:16:32 +0000
+++ l10n_ve_withholding_iva/test/iva_purchase_nret1.yml 2013-11-17 23:21:43 +0000
@@ -32,7 +32,7 @@
32 date_invoice: !eval time.strftime('%Y-%m-%d')32 date_invoice: !eval time.strftime('%Y-%m-%d')
33 partner_id: base.res_partner_2333 partner_id: base.res_partner_23
34 reference_type: none34 reference_type: none
35 journal_id: account.sales_journal35 journal_id: account.expenses_journal
36 wh_iva: True36 wh_iva: True
37 invoice_line:37 invoice_line:
38 - product_id: product.product_product_338 - product_id: product.product_product_3
3939
=== modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret2.yml'
--- l10n_ve_withholding_iva/test/iva_purchase_nret2.yml 2013-01-15 15:16:32 +0000
+++ l10n_ve_withholding_iva/test/iva_purchase_nret2.yml 2013-11-17 23:21:43 +0000
@@ -42,7 +42,7 @@
42 date_invoice: !eval time.strftime('%Y-%m-%d')42 date_invoice: !eval time.strftime('%Y-%m-%d')
43 partner_id: base.res_partner_2343 partner_id: base.res_partner_23
44 reference_type: none44 reference_type: none
45 journal_id: account.sales_journal45 journal_id: account.expenses_journal
46 wh_iva: True46 wh_iva: True
47 invoice_line:47 invoice_line:
48 - product_id: product.product_product_348 - product_id: product.product_product_3
4949
=== modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret3.yml'
--- l10n_ve_withholding_iva/test/iva_purchase_nret3.yml 2013-01-15 15:16:32 +0000
+++ l10n_ve_withholding_iva/test/iva_purchase_nret3.yml 2013-11-17 23:21:43 +0000
@@ -52,7 +52,7 @@
52 date_invoice: !eval time.strftime('%Y-%m-%d')52 date_invoice: !eval time.strftime('%Y-%m-%d')
53 partner_id: base.res_partner_2353 partner_id: base.res_partner_23
54 reference_type: none54 reference_type: none
55 journal_id: account.sales_journal55 journal_id: account.expenses_journal
56 wh_iva: True56 wh_iva: True
57 invoice_line:57 invoice_line:
58 - product_id: product.product_product_358 - product_id: product.product_product_3
5959
=== modified file 'l10n_ve_withholding_iva/test/iva_purchase_wh.yml'
--- l10n_ve_withholding_iva/test/iva_purchase_wh.yml 2013-01-15 15:16:32 +0000
+++ l10n_ve_withholding_iva/test/iva_purchase_wh.yml 2013-11-17 23:21:43 +0000
@@ -26,13 +26,14 @@
26-26-
27 2.4 I create a purchase invoice27 2.4 I create a purchase invoice
28-28-
29 !record {model: account.invoice, id: test_purchase_iva02}:29 !record {model: account.invoice, id: test_purchase_iva02, view: account.invoice_supplier_form, context:{'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase'}}:
30 type: out_invoice30 type: in_invoice
31 state: draft
31 company_id: base.main_company32 company_id: base.main_company
32 date_invoice: !eval time.strftime('%Y-%m-%d')33 date_invoice: !eval time.strftime('%Y-%m-%d')
33 partner_id: base.res_partner_2334 partner_id: base.res_partner_23
34 reference_type: none35 reference_type: none
35 journal_id: account.sales_journal36 journal_id:
36 wh_iva: True37 wh_iva: True
37 invoice_line:38 invoice_line:
38 - product_id: product.product_product_339 - product_id: product.product_product_3
@@ -50,10 +51,19 @@
50 invoice_line_tax_id:51 invoice_line_tax_id:
51 - l10n_ve_fiscal_requirements.iva_purchase152 - l10n_ve_fiscal_requirements.iva_purchase1
52-53-
53 2.5 I check that Initially customer invoice is in the "Draft" state54 2.5 I check that Initially supplier invoice is in the "Draft" state
54-55-
55 !assert {model: account.invoice, id: test_purchase_iva02}:56 !python {model: account.invoice}: |
56 - state == 'draft'57 ap_obj=self.pool.get('account.period')
58 import time
59 period = ap_obj.find(cr, uid, time.strftime('%Y/%m/%d'), context={'company_id':ref("base.main_company")})
60 assert period, 'There aren\'t periods for this date'
61 ap_obj.write(cr, uid, period, {'special':False})
62 self.write(cr,uid,ref('test_purchase_iva02'),{'journal_id':ref('account.expenses_journal'),'type':'in_invoice'})
63 ai_brw = self.browse(cr,uid,ref('test_purchase_iva02'))
64 assert ai_brw.type == 'in_invoice', "Not the intended type. It should be 'in_invoice' not '%s'"%ai_brw.type
65 assert ai_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%ai_brw.state
66 assert ai_brw.journal_id.id == ref('account.expenses_journal'), "Not the intended Journal. It should be 'Expenses Journal - (test)' not '%s'"%ai_brw.journal_id.name
57-67-
58 2.6 I change the state of invoice to "Proforma2" by clicking PRO-FORMA button68 2.6 I change the state of invoice to "Proforma2" by clicking PRO-FORMA button
59-69-
@@ -76,6 +86,7 @@
76 2.10 Set control number for the invoice86 2.10 Set control number for the invoice
77-87-
78 !python {model: account.invoice}: |88 !python {model: account.invoice}: |
79 self.write(cr, uid, [ref("test_purchase_iva02")], {'nro_ctrl':'iva002', 'journal_id':ref("account.expenses_journal")})89 self.write(cr, uid, [ref("test_purchase_iva02")], {'nro_ctrl':'iva002'})
80 ai_brw = self.browse(cr, uid, ref("test_purchase_iva02"))90 ai_brw = self.browse(cr, uid, ref("test_purchase_iva02"))
81 assert ai_brw.nro_ctrl=='iva002' and ai_brw.journal_id.id == ref("account.expenses_journal"), 'Invoice wasn\'t updated properly'91 assert ai_brw.nro_ctrl=='iva002', "Not the intended Control Number. It should be 'iva002' not '%s'"%ai_brw.nro_ctrl
92 assert ai_brw.journal_id.id == ref('account.expenses_journal'), "Not the intended Journal. It should be 'Expenses Journal - (test)' not '%s'"%ai_brw.journal_id.name
8293
=== modified file 'l10n_ve_withholding_iva/test/iva_sale_wh.yml'
--- l10n_ve_withholding_iva/test/iva_sale_wh.yml 2013-01-17 19:19:09 +0000
+++ l10n_ve_withholding_iva/test/iva_sale_wh.yml 2013-11-17 23:21:43 +0000
@@ -109,11 +109,13 @@
109 ap_obj=self.pool.get('account.period')109 ap_obj=self.pool.get('account.period')
110 period = ap_obj.find(cr, uid, time.strftime('%Y/%m/%d'), context={'company_id':ref("base.main_company")})110 period = ap_obj.find(cr, uid, time.strftime('%Y/%m/%d'), context={'company_id':ref("base.main_company")})
111 assert period, 'There aren\'t periods for this date'111 assert period, 'There aren\'t periods for this date'
112 ap_obj.write(cr, uid, period, {'special':False})
112 ap_brw = ap_obj.browse(cr, uid, period[0])113 ap_brw = ap_obj.browse(cr, uid, period[0])
113 if ap_brw.state == 'done':114 if ap_brw.state == 'done':
114 ap.action_draft(cr, uid, period)115 ap.action_draft(cr, uid, period)
115 ap_brw = ap.browse(cr, uid, period[0])116 ap_brw = ap.browse(cr, uid, period[0])
116 assert ap_brw.state == 'draft', 'Period is not open as it should be'117 assert ap_brw.state == 'draft', 'Period is not open as it should be'
118 assert ap_brw.special == False, 'Period is special. It should be'
117119
118 self.write(cr, uid, ref("wh_iva_sale01"), {'period_id':period[0]})120 self.write(cr, uid, ref("wh_iva_sale01"), {'period_id':period[0]})
119-121-
120122
=== modified file 'l10n_ve_withholding_iva/test/iva_test_wh_2.yml'
--- l10n_ve_withholding_iva/test/iva_test_wh_2.yml 2013-01-18 19:55:38 +0000
+++ l10n_ve_withholding_iva/test/iva_test_wh_2.yml 2013-11-17 23:21:43 +0000
@@ -10,28 +10,55 @@
10-10-
11 10.2 I generate a withholding vat customer11 10.2 I generate a withholding vat customer
12-12-
13 !record {model: account.wh.iva, id: wh_iva_test02}:13 !record {model: account.wh.iva, id: wh_iva_test02, view: view_wh_iva_form_customer, context: {'type':'out_invoice'}}:
14 journal_id: wh_sales_journal14 journal_id: wh_sales_journal
15 partner_id: base.res_partner_2315 partner_id: base.res_partner_23
16 number: 22244433300016 number: 222444333000
17 account_id: account.a_recv17 account_id: account.a_recv
18 name: 'IVA wh vat customer Vauxoo test 2'18 name: 'IVA wh vat customer Vauxoo test 2'
19 type: out_invoice19 type: out_invoice
20 state: draft
20-21-
21 10.3 I check withholding vat customer22 10.3 I check withholding vat customer
22-23-
23 !assert {model: account.wh.iva, id: wh_iva_test02, string: Wh was not saved}:24 !python {model: account.wh.iva}: |
24 - state == 'draft'25 values = {}
26 rp_obj = self.pool.get('res.partner')
27 rp_brw = rp_obj.browse(cr,uid,ref("base.res_partner_23"))
28 res = self.onchange_partner_id(cr, uid, [ref('wh_iva_test02')], 'out_invoice', rp_brw.id)
29 values['wh_lines'] = [(0,0,{'invoice_id':ref('test_iva01'), 'name':'N/A', 'wh_iva_rate':rp_brw.wh_iva_rate})]
30 values['account_id'] = res['value']['account_id']
31 values['type'] = 'out_invoice'
32 self.write(cr,uid,ref('wh_iva_test02'),values)
33 awi_brw = self.browse(cr,uid,ref('wh_iva_test02'))
34 assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type
35 assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state
36 assert awi_brw.wh_lines, "There are no lines to withhold"
37 self.compute_amount_wh(cr,uid,[ref('wh_iva_test02')])
25-38-
26 10.4 I confirm the withholding vat customer39 10.4 I confirm the withholding vat customer
27-40-
28 !workflow {model: account.wh.iva, action: wh_iva_confirmed, ref: wh_iva_test02}41 !python {model: account.wh.iva}: |
42 import netsvc
43 from openerp.osv import osv
44 wf_service = netsvc.LocalService("workflow")
45 try:
46 self.check_wh_lines_fortnights(cr, uid, [ref('wh_iva_test02')])
47 self.check_invoice_nro_ctrl(cr, uid, [ref('wh_iva_test02')])
48 self.check_vat_wh(cr, uid, [ref('wh_iva_test02')])
49 self.check_wh_taxes(cr, uid, [ref('wh_iva_test02')])
50 self.check_wh_taxes(cr, uid, [ref('wh_iva_test02')])
51 assert False, "An exception should have been raised, unwithholdable taxes are not allowed to reach here!"
52 except osv.except_osv:
53 # exception was raised as expected
54 pass
29-55-
30 10.5 I check withholding vat is not confirmed56 10.5 I check withholding vat is not confirmed
31 # TODO: Check this test case, it fails. It means that something in the wh_iva_confirmed action is wrong.57 # TODO: Check this test case, it fails. It means that something in the wh_iva_confirmed action is wrong.
32-58-
33 !assert {model: account.wh.iva, id: wh_iva_test02, string: Could not confirm the wh}:59 !python {model: account.wh.iva}: |
34 - state != 'confirmed'60 awi_brw = self.browse(cr,uid,ref('wh_iva_test02'))
61 assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state
35-62-
36 10.6 I try to mark it as done63 10.6 I try to mark it as done
37-64-
3865
=== modified file 'l10n_ve_withholding_iva/test/iva_test_wh_3.yml'
--- l10n_ve_withholding_iva/test/iva_test_wh_3.yml 2013-01-18 19:55:38 +0000
+++ l10n_ve_withholding_iva/test/iva_test_wh_3.yml 2013-11-17 23:21:43 +0000
@@ -16,11 +16,15 @@
16 account_id: account.a_recv16 account_id: account.a_recv
17 name: 'IVA wh vat customer Vauxoo test 3'17 name: 'IVA wh vat customer Vauxoo test 3'
18 type: out_invoice18 type: out_invoice
19 state: draft
19-20-
20 11.3 I check withholding vat customer21 11.3 I check withholding vat customer
21-22-
22 !assert {model: account.wh.iva, id: wh_iva_test03, string: Wh was not saved}:23 !python {model: account.wh.iva}: |
23 - state == 'draft'24 self.write(cr,uid,ref('wh_iva_test03'),{'type':'out_invoice'})
25 awi_brw = self.browse(cr,uid,ref('wh_iva_test03'))
26 assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type
27 assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state
24-28-
25 11.4 Before validating let's add the period29 11.4 Before validating let's add the period
26-30-
@@ -43,8 +47,9 @@
43 11.7 I check withholding vat is not confirmed47 11.7 I check withholding vat is not confirmed
44 # TODO: Check this test case, it fails. It means that something in the wh_iva_confirmed action is wrong.48 # TODO: Check this test case, it fails. It means that something in the wh_iva_confirmed action is wrong.
45-49-
46 !assert {model: account.wh.iva, id: wh_iva_test03, string: Could not confirm the wh}:50 !python {model: account.wh.iva}: |
47 - state != 'confirmed'51 awi_brw = self.browse(cr,uid,ref('wh_iva_test03'))
52 assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state
48-53-
49 11.8 I try to mark it as done54 11.8 I try to mark it as done
50-55-
@@ -52,5 +57,6 @@
52-57-
53 11.9 I check withholding vat is not done58 11.9 I check withholding vat is not done
54-59-
55 !assert {model: account.wh.iva, id: wh_iva_test01, string: Wh cannot be in done state}:60 !python {model: account.wh.iva}: |
56 - state != 'done'61 awi_brw = self.browse(cr,uid,ref('wh_iva_test03'))
62 assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state
5763
=== modified file 'l10n_ve_withholding_iva/test/iva_test_wh_4.yml'
--- l10n_ve_withholding_iva/test/iva_test_wh_4.yml 2013-01-18 19:55:38 +0000
+++ l10n_ve_withholding_iva/test/iva_test_wh_4.yml 2013-11-17 23:21:43 +0000
@@ -16,11 +16,15 @@
16 account_id: account.a_recv16 account_id: account.a_recv
17 name: 'IVA wh vat customer Vauxoo test 3'17 name: 'IVA wh vat customer Vauxoo test 3'
18 type: out_invoice18 type: out_invoice
19 state: draft
19-20-
20 12.3 I check withholding vat customer21 12.3 I check withholding vat customer
21-22-
22 !assert {model: account.wh.iva, id: wh_iva_test04, string: Wh was not saved}:23 !python {model: account.wh.iva}: |
23 - state == 'draft'24 self.write(cr,uid,ref('wh_iva_test04'),{'type':'out_invoice'})
25 awi_brw = self.browse(cr,uid,ref('wh_iva_test04'))
26 assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type
27 assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state
24-28-
25 12.4 Before validating let's add the period29 12.4 Before validating let's add the period
26-30-
2731
=== modified file 'l10n_ve_withholding_muni/__openerp__.py'
--- l10n_ve_withholding_muni/__openerp__.py 2013-01-30 20:27:24 +0000
+++ l10n_ve_withholding_muni/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -47,7 +47,7 @@
47 ],47 ],
48 'demo_xml': [],48 'demo_xml': [],
49 'test': [],49 'test': [],
50 'installable': True,50 'installable': False,
51 'active': False,51 'active': False,
52}52}
5353
5454
=== modified file 'l10n_ve_withholding_src/__openerp__.py'
--- l10n_ve_withholding_src/__openerp__.py 2013-04-18 21:03:12 +0000
+++ l10n_ve_withholding_src/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -67,5 +67,5 @@
67 67
68 ],68 ],
69 "active": False,69 "active": False,
70 "installable": True70 "installable": False,
71}71}
7272
=== modified file 'ovl/__openerp__.py'
--- ovl/__openerp__.py 2013-11-14 06:07:44 +0000
+++ ovl/__openerp__.py 2013-11-17 23:21:43 +0000
@@ -87,5 +87,5 @@
87 "images" : [],87 "images" : [],
88 "auto_install": False,88 "auto_install": False,
89 "application": True,89 "application": True,
90 "installable": True,90 "installable": False,
91}91}