Merge lp:~vauxoo/openerp-venezuela-localization/7.0-YAML-rev2-dev-hbto into lp:openerp-venezuela-localization
- 7.0-YAML-rev2-dev-hbto
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~vauxoo/openerp-venezuela-localization/7.0-YAML-rev2-dev-hbto |
Merge into: | lp:openerp-venezuela-localization |
Diff against target: |
700 lines (+196/-99) 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/model/invoice.py (+2/-16) 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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nhomar - Vauxoo | Pending | ||
Review via email: mp+195531@code.launchpad.net |
This proposal supersedes a proposal from 2013-11-16.
This proposal has been superseded by a proposal from 2013-11-18.
Commit message
Description of the change
- 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
1 | === modified file 'l10n_ve_fiscal_book/__openerp__.py' | |||
2 | --- l10n_ve_fiscal_book/__openerp__.py 2013-05-27 16:36:56 +0000 | |||
3 | +++ l10n_ve_fiscal_book/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
4 | @@ -65,5 +65,5 @@ | |||
5 | 65 | "security/ir.model.access.csv" | 65 | "security/ir.model.access.csv" |
6 | 66 | ], | 66 | ], |
7 | 67 | "active": False, | 67 | "active": False, |
9 | 68 | "installable": True, | 68 | "installable": False, |
10 | 69 | } | 69 | } |
11 | 70 | 70 | ||
12 | === modified file 'l10n_ve_fiscal_requirements/__openerp__.py' | |||
13 | --- l10n_ve_fiscal_requirements/__openerp__.py 2013-11-16 17:50:57 +0000 | |||
14 | +++ l10n_ve_fiscal_requirements/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
15 | @@ -91,20 +91,21 @@ | |||
16 | 91 | 'demo/demo_partners.xml', | 91 | 'demo/demo_partners.xml', |
17 | 92 | 'demo/journal_demo.xml', | 92 | 'demo/journal_demo.xml', |
18 | 93 | 'demo/demo_invoice.xml', | 93 | 'demo/demo_invoice.xml', |
20 | 94 | 'demo/demo_taxes.yml', | 94 | # 'demo/demo_taxes.yml', |
21 | 95 | ], | 95 | ], |
22 | 96 | 'test': [ | 96 | 'test': [ |
31 | 97 | 'test/control_number.yml', | 97 | 'test/account_customer_invoice.yml', |
32 | 98 | 'test/fr_sale_test.yml', | 98 | 'test/account_supplier_invoice.yml', |
33 | 99 | 'test/fr_purchase_test.yml', | 99 | # 'test/control_number.yml', |
34 | 100 | 'test/fr_address.yml', | 100 | # 'test/fr_sale_test.yml', |
35 | 101 | 'test/fr_vat_test.yml', | 101 | # 'test/fr_purchase_test.yml', |
36 | 102 | 'test/fr_damaged.yml', | 102 | # 'test/fr_address.yml', |
37 | 103 | 'test/fr_debit_note.yml', | 103 | # 'test/fr_vat_test.yml', |
38 | 104 | 'test/fr_refund_note.yml', | 104 | # 'test/fr_damaged.yml', |
39 | 105 | # 'test/fr_debit_note.yml', | ||
40 | 106 | # 'test/fr_refund_note.yml', | ||
41 | 105 | ], | 107 | ], |
42 | 106 | 'installable': True, | 108 | 'installable': True, |
43 | 107 | 'active': False, | 109 | 'active': False, |
44 | 108 | } | 110 | } |
45 | 109 | 111 | ||
46 | 110 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
47 | 111 | 112 | ||
48 | === modified file 'l10n_ve_fiscal_requirements/model/account.py' | |||
49 | --- l10n_ve_fiscal_requirements/model/account.py 2013-02-13 19:39:18 +0000 | |||
50 | +++ l10n_ve_fiscal_requirements/model/account.py 2013-11-18 00:07:54 +0000 | |||
51 | @@ -24,9 +24,6 @@ | |||
52 | 24 | ################################################################################ | 24 | ################################################################################ |
53 | 25 | 25 | ||
54 | 26 | from openerp.osv import fields, osv | 26 | from openerp.osv import fields, osv |
55 | 27 | __TYPES__ = [('sale_debit', 'Sale Debit'),('purchase_debit', 'Purchase Debit')] | ||
56 | 28 | |||
57 | 29 | __HELP__= " Select 'Sale Debit' for customer debit note journals. Select 'Purchase Debit' for supplier debit note journals." | ||
58 | 30 | 27 | ||
59 | 31 | class account_journal(osv.osv): | 28 | class account_journal(osv.osv): |
60 | 32 | _inherit = 'account.journal' | 29 | _inherit = 'account.journal' |
61 | @@ -45,5 +42,3 @@ | |||
62 | 45 | " Select 'Sale Debit' for customer debit note journals."\ | 42 | " Select 'Sale Debit' for customer debit note journals."\ |
63 | 46 | " Select 'Purchase Debit' for supplier debit note journals.") | 43 | " Select 'Purchase Debit' for supplier debit note journals.") |
64 | 47 | } | 44 | } |
65 | 48 | |||
66 | 49 | account_journal() | ||
67 | 50 | 45 | ||
68 | === modified file 'l10n_ve_fiscal_requirements/model/invoice.py' | |||
69 | --- l10n_ve_fiscal_requirements/model/invoice.py 2013-06-01 18:58:59 +0000 | |||
70 | +++ l10n_ve_fiscal_requirements/model/invoice.py 2013-11-18 00:07:54 +0000 | |||
71 | @@ -33,21 +33,18 @@ | |||
72 | 33 | it does not exist, return false | 33 | it does not exist, return false |
73 | 34 | """ | 34 | """ |
74 | 35 | 35 | ||
80 | 36 | if context is None: | 36 | context = context or {} |
81 | 37 | context = {} | 37 | res = super(account_invoice, self)._get_journal(cr, uid, context=context) |
82 | 38 | journal_type_inv = context.get('journal_type', 'sale') | 38 | if res: return res |
83 | 39 | 39 | type_inv = context.get('type', 'sale') | |
84 | 40 | if journal_type_inv in ('sale_debit', 'purchase_debit'): | 40 | if type_inv in ('sale_debit', 'purchase_debit'): |
85 | 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) |
86 | 42 | company_id = context.get('company_id', user.company_id.id) | 42 | company_id = context.get('company_id', user.company_id.id) |
87 | 43 | journal_obj = self.pool.get('account.journal') | 43 | journal_obj = self.pool.get('account.journal') |
95 | 44 | res = journal_obj.search(cr, uid, [('type', '=',journal_type_inv), | 44 | domain = [('company_id', '=', company_id),('type', '=',type_inv)] |
96 | 45 | ('company_id', '=', company_id)], | 45 | res = journal_obj.search(cr, uid, domain, limit=1) |
97 | 46 | limit=1) | 46 | return res and res[0] or False |
98 | 47 | return res and res[0] or False | 47 | |
92 | 48 | else: | ||
93 | 49 | return super(account_invoice, self)._get_journal(cr, uid, context=context) | ||
94 | 50 | |||
99 | 51 | def _unique_invoice_per_partner(self, cr, uid, ids, context=None): | 48 | def _unique_invoice_per_partner(self, cr, uid, ids, context=None): |
100 | 52 | """ Return false when it is found | 49 | """ Return false when it is found |
101 | 53 | that the bill is not out_invoice or out_refund, | 50 | that the bill is not out_invoice or out_refund, |
102 | @@ -118,6 +115,17 @@ | |||
103 | 118 | 'child_ids':[], | 115 | 'child_ids':[], |
104 | 119 | 'nro_ctrl':None, | 116 | 'nro_ctrl':None, |
105 | 120 | 'supplier_invoice_number':None, | 117 | 'supplier_invoice_number':None, |
106 | 118 | 'sin_cred': False, | ||
107 | 119 | # No cleaned in this copy because it is related to the previous | ||
108 | 120 | # document, if previous document says so this too | ||
109 | 121 | # 'parent_id':False, | ||
110 | 122 | 'date_document': False, | ||
111 | 123 | 'invoice_printer' : '', | ||
112 | 124 | 'fiscal_printer' : '', | ||
113 | 125 | # No cleaned in this copy because it is related to the previous | ||
114 | 126 | # document, if previous document says so this too | ||
115 | 127 | #'loc_req':False, | ||
116 | 128 | 'z_report': '', | ||
117 | 121 | }) | 129 | }) |
118 | 122 | return super(account_invoice, self).copy(cr, uid, id, default, context) | 130 | return super(account_invoice, self).copy(cr, uid, id, default, context) |
119 | 123 | 131 | ||
120 | @@ -129,9 +137,6 @@ | |||
121 | 129 | return super(account_invoice, self).write(cr, uid, ids, vals, | 137 | return super(account_invoice, self).write(cr, uid, ids, vals, |
122 | 130 | context=context) | 138 | context=context) |
123 | 131 | 139 | ||
124 | 132 | account_invoice() | ||
125 | 133 | |||
126 | 134 | |||
127 | 135 | class account_invoice_tax(osv.osv): | 140 | class account_invoice_tax(osv.osv): |
128 | 136 | _inherit = 'account.invoice.tax' | 141 | _inherit = 'account.invoice.tax' |
129 | 137 | _columns = { | 142 | _columns = { |
130 | @@ -139,6 +144,4 @@ | |||
131 | 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."), |
132 | 140 | } | 145 | } |
133 | 141 | 146 | ||
134 | 142 | account_invoice_tax() | ||
135 | 143 | |||
136 | 144 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 147 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
137 | 145 | 148 | ||
138 | === modified file 'l10n_ve_fiscal_requirements/model/partner.py' | |||
139 | --- l10n_ve_fiscal_requirements/model/partner.py 2013-11-16 04:03:30 +0000 | |||
140 | +++ l10n_ve_fiscal_requirements/model/partner.py 2013-11-18 00:07:54 +0000 | |||
141 | @@ -308,5 +308,4 @@ | |||
142 | 308 | # force full VIES online check | 308 | # force full VIES online check |
143 | 309 | self.update_rif(cr, uid, ids, context=context) | 309 | self.update_rif(cr, uid, ids, context=context) |
144 | 310 | return True | 310 | return True |
145 | 311 | res_partner() | ||
146 | 312 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 311 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
147 | 313 | 312 | ||
148 | === added file 'l10n_ve_fiscal_requirements/test/account_customer_invoice.yml' | |||
149 | --- l10n_ve_fiscal_requirements/test/account_customer_invoice.yml 1970-01-01 00:00:00 +0000 | |||
150 | +++ l10n_ve_fiscal_requirements/test/account_customer_invoice.yml 2013-11-18 00:07:54 +0000 | |||
151 | @@ -0,0 +1,29 @@ | |||
152 | 1 | - | ||
153 | 2 | In order to test account invoice I create a new customer invoice | ||
154 | 3 | - | ||
155 | 4 | I set the context that will be used for the encoding of all the invoices of this file | ||
156 | 5 | - | ||
157 | 6 | !context | ||
158 | 7 | 'type': 'out_invoice' | ||
159 | 8 | - | ||
160 | 9 | I create a customer invoice | ||
161 | 10 | - | ||
162 | 11 | !record {model: account.invoice, id: account_invoice_customer0, view: account.invoice_form}: | ||
163 | 12 | payment_term: account.account_payment_term_advance | ||
164 | 13 | journal_id: account.sales_journal | ||
165 | 14 | partner_id: base.res_partner_3 | ||
166 | 15 | reference_type: none | ||
167 | 16 | name: 'Test Customer Invoice - l10n_ve_fiscal_requirements' | ||
168 | 17 | invoice_line: | ||
169 | 18 | - product_id: product.product_product_5 | ||
170 | 19 | quantity: 10.0 | ||
171 | 20 | - | ||
172 | 21 | I check that Initially customer invoice state is "Draft" | ||
173 | 22 | - | ||
174 | 23 | !assert {model: account.invoice, id: account_invoice_customer0}: | ||
175 | 24 | - state == 'draft' | ||
176 | 25 | - | ||
177 | 26 | I check that the customer invoice is a "Customer Invoice" | ||
178 | 27 | - | ||
179 | 28 | !assert {model: account.invoice, id: account_invoice_customer0, string: This is not a customer invoice}: | ||
180 | 29 | - type == 'out_invoice' | ||
181 | 0 | 30 | ||
182 | === added file 'l10n_ve_fiscal_requirements/test/account_supplier_invoice.yml' | |||
183 | --- l10n_ve_fiscal_requirements/test/account_supplier_invoice.yml 1970-01-01 00:00:00 +0000 | |||
184 | +++ l10n_ve_fiscal_requirements/test/account_supplier_invoice.yml 2013-11-18 00:07:54 +0000 | |||
185 | @@ -0,0 +1,35 @@ | |||
186 | 1 | - | ||
187 | 2 | In order to test account invoice I create a new supplier invoice | ||
188 | 3 | - | ||
189 | 4 | I set the context that will be used for the encoding of all the invoices of this file | ||
190 | 5 | - | ||
191 | 6 | !context | ||
192 | 7 | 'type': 'in_invoice' | ||
193 | 8 | - | ||
194 | 9 | I create a supplier invoice | ||
195 | 10 | - | ||
196 | 11 | !record {model: account.invoice, id: account_invoice_supplier0, view: account.invoice_supplier_form }: | ||
197 | 12 | account_id: account.a_pay | ||
198 | 13 | company_id: base.main_company | ||
199 | 14 | currency_id: base.EUR | ||
200 | 15 | invoice_line: | ||
201 | 16 | - account_id: account.a_expense | ||
202 | 17 | name: '[PCSC234] PC Assemble SC234' | ||
203 | 18 | price_unit: 300.0 | ||
204 | 19 | product_id: product.product_product_3 | ||
205 | 20 | quantity: 10.0 | ||
206 | 21 | uos_id: product.product_uom_unit | ||
207 | 22 | journal_id: account.expenses_journal | ||
208 | 23 | partner_id: base.res_partner_12 | ||
209 | 24 | reference_type: none | ||
210 | 25 | type: 'in_invoice' | ||
211 | 26 | - | ||
212 | 27 | I check that Initially supplier invoice state is "Draft" | ||
213 | 28 | - | ||
214 | 29 | !assert {model: account.invoice, id: account_invoice_supplier0}: | ||
215 | 30 | - state == 'draft' | ||
216 | 31 | - | ||
217 | 32 | I check that the supplier invoice is a "Supplier Invoice" | ||
218 | 33 | - | ||
219 | 34 | !assert {model: account.invoice, id: account_invoice_supplier0, string: This is not a supplier invoice}: | ||
220 | 35 | - type == 'in_invoice' | ||
221 | 0 | 36 | ||
222 | === modified file 'l10n_ve_fiscal_requirements/test/fr_damaged.yml' | |||
223 | --- l10n_ve_fiscal_requirements/test/fr_damaged.yml 2013-11-14 20:14:21 +0000 | |||
224 | +++ l10n_ve_fiscal_requirements/test/fr_damaged.yml 2013-11-18 00:07:54 +0000 | |||
225 | @@ -109,7 +109,6 @@ | |||
226 | 109 | !python {model: account.journal}: | | 109 | !python {model: account.journal}: | |
227 | 110 | aj_ids = self.search(cr, uid, [('type', '=','sale')]) | 110 | aj_ids = self.search(cr, uid, [('type', '=','sale')]) |
228 | 111 | assert aj_ids, 'There are no Journals' | 111 | assert aj_ids, 'There are no Journals' |
229 | 112 | |||
230 | 113 | self.write(cr, uid, aj_ids, {'update_posted': True}) | 112 | self.write(cr, uid, aj_ids, {'update_posted': True}) |
231 | 114 | - | 113 | - |
232 | 115 | 6.13 Verify that the journal was properly updated | 114 | 6.13 Verify that the journal was properly updated |
233 | @@ -171,4 +170,3 @@ | |||
234 | 171 | pass | 170 | pass |
235 | 172 | finally: | 171 | finally: |
236 | 173 | cr.sql_log = l | 172 | cr.sql_log = l |
237 | 174 | |||
238 | 175 | 173 | ||
239 | === modified file 'l10n_ve_generic/__openerp__.py' | |||
240 | --- l10n_ve_generic/__openerp__.py 2012-09-24 12:47:27 +0000 | |||
241 | +++ l10n_ve_generic/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
242 | @@ -39,7 +39,7 @@ | |||
243 | 39 | "update_xml" : ['account_tax_code.xml',"account_chart.xml", | 39 | "update_xml" : ['account_tax_code.xml',"account_chart.xml", |
244 | 40 | 'account_tax.xml','l10n_chart_ve_wizard.xml'], | 40 | 'account_tax.xml','l10n_chart_ve_wizard.xml'], |
245 | 41 | "auto_install": False, | 41 | "auto_install": False, |
247 | 42 | "installable": True, | 42 | "installable": False, |
248 | 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'], |
249 | 44 | } | 44 | } |
250 | 45 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 45 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
251 | 46 | 46 | ||
252 | === modified file 'l10n_ve_imex/__openerp__.py' | |||
253 | --- l10n_ve_imex/__openerp__.py 2013-04-29 16:31:11 +0000 | |||
254 | +++ l10n_ve_imex/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
255 | @@ -55,5 +55,5 @@ | |||
256 | 55 | 'workflow/customs_form.xml', | 55 | 'workflow/customs_form.xml', |
257 | 56 | ], | 56 | ], |
258 | 57 | "active": False, | 57 | "active": False, |
260 | 58 | "installable": True, | 58 | "installable": False, |
261 | 59 | } | 59 | } |
262 | 60 | 60 | ||
263 | === modified file 'l10n_ve_sale_purchase/__openerp__.py' | |||
264 | --- l10n_ve_sale_purchase/__openerp__.py 2013-09-18 23:55:08 +0000 | |||
265 | +++ l10n_ve_sale_purchase/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
266 | @@ -41,7 +41,7 @@ | |||
267 | 41 | ], | 41 | ], |
268 | 42 | 'demo' : [], | 42 | 'demo' : [], |
269 | 43 | 'active' : False, | 43 | 'active' : False, |
271 | 44 | 'installable': True, | 44 | 'installable': False, |
272 | 45 | 'test': [ | 45 | 'test': [ |
273 | 46 | # 'test/purchase_order.yml', | 46 | # 'test/purchase_order.yml', |
274 | 47 | # 'test/purchase_picking.yml', | 47 | # 'test/purchase_picking.yml', |
275 | 48 | 48 | ||
276 | === modified file 'l10n_ve_split_invoice/__openerp__.py' | |||
277 | --- l10n_ve_split_invoice/__openerp__.py 2013-11-14 20:44:23 +0000 | |||
278 | +++ l10n_ve_split_invoice/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
279 | @@ -58,5 +58,5 @@ | |||
280 | 58 | 'test/spl_test.yml', | 58 | 'test/spl_test.yml', |
281 | 59 | ], | 59 | ], |
282 | 60 | "active": False, | 60 | "active": False, |
284 | 61 | "installable": True, | 61 | "installable": False, |
285 | 62 | } | 62 | } |
286 | 63 | 63 | ||
287 | === modified file 'l10n_ve_vat_write_off/__openerp__.py' | |||
288 | --- l10n_ve_vat_write_off/__openerp__.py 2013-05-02 17:01:41 +0000 | |||
289 | +++ l10n_ve_vat_write_off/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
290 | @@ -13,6 +13,6 @@ | |||
291 | 13 | "view/l10n_ve_vat_write_off.xml", | 13 | "view/l10n_ve_vat_write_off.xml", |
292 | 14 | ], | 14 | ], |
293 | 15 | "active": False, | 15 | "active": False, |
295 | 16 | "installable": True, | 16 | "installable": False, |
296 | 17 | } | 17 | } |
297 | 18 | 18 | ||
298 | 19 | 19 | ||
299 | === modified file 'l10n_ve_withholding/model/invoice.py' | |||
300 | --- l10n_ve_withholding/model/invoice.py 2013-04-12 20:19:03 +0000 | |||
301 | +++ l10n_ve_withholding/model/invoice.py 2013-11-18 00:07:54 +0000 | |||
302 | @@ -28,11 +28,9 @@ | |||
303 | 28 | from openerp.addons import decimal_precision as dp | 28 | from openerp.addons import decimal_precision as dp |
304 | 29 | from openerp.tools.translate import _ | 29 | from openerp.tools.translate import _ |
305 | 30 | 30 | ||
306 | 31 | |||
307 | 32 | class account_invoice(osv.osv): | 31 | class account_invoice(osv.osv): |
308 | 33 | _inherit = 'account.invoice' | 32 | _inherit = 'account.invoice' |
309 | 34 | 33 | ||
310 | 35 | |||
311 | 36 | def _get_move_lines(self, cr, uid, ids, to_wh, period_id, | 34 | def _get_move_lines(self, cr, uid, ids, to_wh, period_id, |
312 | 37 | pay_journal_id, writeoff_acc_id, | 35 | pay_journal_id, writeoff_acc_id, |
313 | 38 | writeoff_period_id, writeoff_journal_id, date, | 36 | writeoff_period_id, writeoff_journal_id, date, |
314 | @@ -42,7 +40,7 @@ | |||
315 | 42 | """ | 40 | """ |
316 | 43 | if context is None: context = {} | 41 | if context is None: context = {} |
317 | 44 | return [] | 42 | return [] |
319 | 45 | 43 | ||
320 | 46 | def ret_and_reconcile(self, cr, uid, ids, pay_amount, pay_account_id, | 44 | def ret_and_reconcile(self, cr, uid, ids, pay_amount, pay_account_id, |
321 | 47 | period_id, pay_journal_id, writeoff_acc_id, | 45 | period_id, pay_journal_id, writeoff_acc_id, |
322 | 48 | writeoff_period_id, writeoff_journal_id, date, | 46 | writeoff_period_id, writeoff_journal_id, date, |
323 | @@ -105,7 +103,6 @@ | |||
324 | 105 | self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context) | 103 | self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context) |
325 | 106 | return {'move_id': move_id} | 104 | return {'move_id': move_id} |
326 | 107 | 105 | ||
327 | 108 | |||
328 | 109 | def ret_payment_get(self, cr, uid, ids, *args): | 106 | def ret_payment_get(self, cr, uid, ids, *args): |
329 | 110 | """ Return payments associated with this bill | 107 | """ Return payments associated with this bill |
330 | 111 | """ | 108 | """ |
331 | @@ -127,10 +124,7 @@ | |||
332 | 127 | lines = filter(lambda x: x not in src, lines) | 124 | lines = filter(lambda x: x not in src, lines) |
333 | 128 | 125 | ||
334 | 129 | return lines | 126 | return lines |
339 | 130 | 127 | ||
336 | 131 | |||
337 | 132 | |||
338 | 133 | |||
340 | 134 | def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj): | 128 | def check_tax_lines(self, cr, uid, inv, compute_taxes, ait_obj): |
341 | 135 | """ Check if no tax lines are created. If | 129 | """ Check if no tax lines are created. If |
342 | 136 | existing tax lines, there are checks on the invoice | 130 | existing tax lines, there are checks on the invoice |
343 | @@ -157,11 +151,6 @@ | |||
344 | 157 | if not key in tax_key: | 151 | if not key in tax_key: |
345 | 158 | raise osv.except_osv(_('Warning !'), _('Taxes missing !')) | 152 | raise osv.except_osv(_('Warning !'), _('Taxes missing !')) |
346 | 159 | 153 | ||
347 | 160 | account_invoice() | ||
348 | 161 | |||
349 | 162 | |||
350 | 163 | |||
351 | 164 | |||
352 | 165 | class account_invoice_tax(osv.osv): | 154 | class account_invoice_tax(osv.osv): |
353 | 166 | _inherit = 'account.invoice.tax' | 155 | _inherit = 'account.invoice.tax' |
354 | 167 | _columns = { | 156 | _columns = { |
355 | @@ -223,6 +212,3 @@ | |||
356 | 223 | t['base_amount'] = cur_obj.round(cr, uid, cur, t['base_amount']) | 212 | t['base_amount'] = cur_obj.round(cr, uid, cur, t['base_amount']) |
357 | 224 | t['tax_amount'] = cur_obj.round(cr, uid, cur, t['tax_amount']) | 213 | t['tax_amount'] = cur_obj.round(cr, uid, cur, t['tax_amount']) |
358 | 225 | return tax_grouped | 214 | return tax_grouped |
359 | 226 | |||
360 | 227 | |||
361 | 228 | account_invoice_tax() | ||
362 | 229 | 215 | ||
363 | === modified file 'l10n_ve_withholding_islr/__openerp__.py' | |||
364 | --- l10n_ve_withholding_islr/__openerp__.py 2013-11-14 20:14:21 +0000 | |||
365 | +++ l10n_ve_withholding_islr/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
366 | @@ -74,5 +74,5 @@ | |||
367 | 74 | # 'test/test_duplicate.yml', | 74 | # 'test/test_duplicate.yml', |
368 | 75 | ], | 75 | ], |
369 | 76 | "active": False, | 76 | "active": False, |
371 | 77 | "installable": True | 77 | "installable": False, |
372 | 78 | } | 78 | } |
373 | 79 | 79 | ||
374 | === modified file 'l10n_ve_withholding_iva/__openerp__.py' | |||
375 | --- l10n_ve_withholding_iva/__openerp__.py 2013-11-17 02:03:44 +0000 | |||
376 | +++ l10n_ve_withholding_iva/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
377 | @@ -72,20 +72,20 @@ | |||
378 | 72 | ], | 72 | ], |
379 | 73 | 73 | ||
380 | 74 | 'test': [ | 74 | 'test': [ |
393 | 75 | # 'test/iva_purchase.yml', | 75 | 'test/iva_purchase.yml', |
394 | 76 | # 'test/iva_purchase_wh.yml', | 76 | 'test/iva_purchase_wh.yml', |
395 | 77 | # 'test/iva_purchase_nret1.yml', | 77 | 'test/iva_purchase_nret1.yml', |
396 | 78 | # 'test/iva_purchase_nret2.yml', | 78 | 'test/iva_purchase_nret2.yml', |
397 | 79 | # 'test/iva_purchase_nret3.yml', | 79 | 'test/iva_purchase_nret3.yml', |
398 | 80 | # 'test/iva_sale.yml', | 80 | 'test/iva_sale.yml', |
399 | 81 | # 'test/iva_sale_wh.yml', | 81 | 'test/iva_sale_wh.yml', |
400 | 82 | # 'test/iva_test_invoice.yml', | 82 | 'test/iva_test_invoice.yml', |
401 | 83 | # 'test/iva_test_wh.yml', | 83 | 'test/iva_test_wh.yml', |
402 | 84 | # 'test/iva_test_wh_2.yml', | 84 | 'test/iva_test_wh_2.yml', |
403 | 85 | # 'test/iva_test_wh_3.yml', | 85 | 'test/iva_test_wh_3.yml', |
404 | 86 | # 'test/iva_test_wh_4.yml', | 86 | 'test/iva_test_wh_4.yml', |
405 | 87 | ], | 87 | ], |
407 | 88 | 'installable': True, | 88 | 'installable': False, |
408 | 89 | 'active': False, | 89 | 'active': False, |
409 | 90 | } | 90 | } |
410 | 91 | 91 | ||
411 | 92 | 92 | ||
412 | === modified file 'l10n_ve_withholding_iva/model/wh_iva.py' | |||
413 | --- l10n_ve_withholding_iva/model/wh_iva.py 2013-07-23 14:23:34 +0000 | |||
414 | +++ l10n_ve_withholding_iva/model/wh_iva.py 2013-11-18 00:07:54 +0000 | |||
415 | @@ -725,6 +725,7 @@ | |||
416 | 725 | fortnight_str = {'True': ' - Second Fortnight)', | 725 | fortnight_str = {'True': ' - Second Fortnight)', |
417 | 726 | 'False': ' - First Fortnight)'} | 726 | 'False': ' - First Fortnight)'} |
418 | 727 | for awi_brw in self.browse(cr, uid, ids, context=context): | 727 | for awi_brw in self.browse(cr, uid, ids, context=context): |
419 | 728 | if not awi_brw.wh_lines: return False | ||
420 | 728 | if awi_brw.type in ['out_invoice']: return True | 729 | if awi_brw.type in ['out_invoice']: return True |
421 | 729 | for awil_brw in awi_brw.wh_lines: | 730 | for awil_brw in awi_brw.wh_lines: |
422 | 730 | awil_period_id, awil_fortnight = per_obj.find_fortnight( | 731 | awil_period_id, awil_fortnight = per_obj.find_fortnight( |
423 | 731 | 732 | ||
424 | === modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret1.yml' | |||
425 | --- l10n_ve_withholding_iva/test/iva_purchase_nret1.yml 2013-01-15 15:16:32 +0000 | |||
426 | +++ l10n_ve_withholding_iva/test/iva_purchase_nret1.yml 2013-11-18 00:07:54 +0000 | |||
427 | @@ -32,7 +32,7 @@ | |||
428 | 32 | date_invoice: !eval time.strftime('%Y-%m-%d') | 32 | date_invoice: !eval time.strftime('%Y-%m-%d') |
429 | 33 | partner_id: base.res_partner_23 | 33 | partner_id: base.res_partner_23 |
430 | 34 | reference_type: none | 34 | reference_type: none |
432 | 35 | journal_id: account.sales_journal | 35 | journal_id: account.expenses_journal |
433 | 36 | wh_iva: True | 36 | wh_iva: True |
434 | 37 | invoice_line: | 37 | invoice_line: |
435 | 38 | - product_id: product.product_product_3 | 38 | - product_id: product.product_product_3 |
436 | 39 | 39 | ||
437 | === modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret2.yml' | |||
438 | --- l10n_ve_withholding_iva/test/iva_purchase_nret2.yml 2013-01-15 15:16:32 +0000 | |||
439 | +++ l10n_ve_withholding_iva/test/iva_purchase_nret2.yml 2013-11-18 00:07:54 +0000 | |||
440 | @@ -42,7 +42,7 @@ | |||
441 | 42 | date_invoice: !eval time.strftime('%Y-%m-%d') | 42 | date_invoice: !eval time.strftime('%Y-%m-%d') |
442 | 43 | partner_id: base.res_partner_23 | 43 | partner_id: base.res_partner_23 |
443 | 44 | reference_type: none | 44 | reference_type: none |
445 | 45 | journal_id: account.sales_journal | 45 | journal_id: account.expenses_journal |
446 | 46 | wh_iva: True | 46 | wh_iva: True |
447 | 47 | invoice_line: | 47 | invoice_line: |
448 | 48 | - product_id: product.product_product_3 | 48 | - product_id: product.product_product_3 |
449 | 49 | 49 | ||
450 | === modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret3.yml' | |||
451 | --- l10n_ve_withholding_iva/test/iva_purchase_nret3.yml 2013-01-15 15:16:32 +0000 | |||
452 | +++ l10n_ve_withholding_iva/test/iva_purchase_nret3.yml 2013-11-18 00:07:54 +0000 | |||
453 | @@ -52,7 +52,7 @@ | |||
454 | 52 | date_invoice: !eval time.strftime('%Y-%m-%d') | 52 | date_invoice: !eval time.strftime('%Y-%m-%d') |
455 | 53 | partner_id: base.res_partner_23 | 53 | partner_id: base.res_partner_23 |
456 | 54 | reference_type: none | 54 | reference_type: none |
458 | 55 | journal_id: account.sales_journal | 55 | journal_id: account.expenses_journal |
459 | 56 | wh_iva: True | 56 | wh_iva: True |
460 | 57 | invoice_line: | 57 | invoice_line: |
461 | 58 | - product_id: product.product_product_3 | 58 | - product_id: product.product_product_3 |
462 | 59 | 59 | ||
463 | === modified file 'l10n_ve_withholding_iva/test/iva_purchase_wh.yml' | |||
464 | --- l10n_ve_withholding_iva/test/iva_purchase_wh.yml 2013-01-15 15:16:32 +0000 | |||
465 | +++ l10n_ve_withholding_iva/test/iva_purchase_wh.yml 2013-11-18 00:07:54 +0000 | |||
466 | @@ -26,13 +26,14 @@ | |||
467 | 26 | - | 26 | - |
468 | 27 | 2.4 I create a purchase invoice | 27 | 2.4 I create a purchase invoice |
469 | 28 | - | 28 | - |
472 | 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'}}: |
473 | 30 | type: out_invoice | 30 | type: in_invoice |
474 | 31 | state: draft | ||
475 | 31 | company_id: base.main_company | 32 | company_id: base.main_company |
476 | 32 | date_invoice: !eval time.strftime('%Y-%m-%d') | 33 | date_invoice: !eval time.strftime('%Y-%m-%d') |
477 | 33 | partner_id: base.res_partner_23 | 34 | partner_id: base.res_partner_23 |
478 | 34 | reference_type: none | 35 | reference_type: none |
480 | 35 | journal_id: account.sales_journal | 36 | journal_id: |
481 | 36 | wh_iva: True | 37 | wh_iva: True |
482 | 37 | invoice_line: | 38 | invoice_line: |
483 | 38 | - product_id: product.product_product_3 | 39 | - product_id: product.product_product_3 |
484 | @@ -50,10 +51,19 @@ | |||
485 | 50 | invoice_line_tax_id: | 51 | invoice_line_tax_id: |
486 | 51 | - l10n_ve_fiscal_requirements.iva_purchase1 | 52 | - l10n_ve_fiscal_requirements.iva_purchase1 |
487 | 52 | - | 53 | - |
489 | 53 | 2.5 I check that Initially customer invoice is in the "Draft" state | 54 | 2.5 I check that Initially supplier invoice is in the "Draft" state |
490 | 54 | - | 55 | - |
493 | 55 | !assert {model: account.invoice, id: test_purchase_iva02}: | 56 | !python {model: account.invoice}: | |
494 | 56 | - state == 'draft' | 57 | ap_obj=self.pool.get('account.period') |
495 | 58 | import time | ||
496 | 59 | period = ap_obj.find(cr, uid, time.strftime('%Y/%m/%d'), context={'company_id':ref("base.main_company")}) | ||
497 | 60 | assert period, 'There aren\'t periods for this date' | ||
498 | 61 | ap_obj.write(cr, uid, period, {'special':False}) | ||
499 | 62 | self.write(cr,uid,ref('test_purchase_iva02'),{'journal_id':ref('account.expenses_journal'),'type':'in_invoice'}) | ||
500 | 63 | ai_brw = self.browse(cr,uid,ref('test_purchase_iva02')) | ||
501 | 64 | assert ai_brw.type == 'in_invoice', "Not the intended type. It should be 'in_invoice' not '%s'"%ai_brw.type | ||
502 | 65 | assert ai_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%ai_brw.state | ||
503 | 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 | ||
504 | 57 | - | 67 | - |
505 | 58 | 2.6 I change the state of invoice to "Proforma2" by clicking PRO-FORMA button | 68 | 2.6 I change the state of invoice to "Proforma2" by clicking PRO-FORMA button |
506 | 59 | - | 69 | - |
507 | @@ -76,6 +86,7 @@ | |||
508 | 76 | 2.10 Set control number for the invoice | 86 | 2.10 Set control number for the invoice |
509 | 77 | - | 87 | - |
510 | 78 | !python {model: account.invoice}: | | 88 | !python {model: account.invoice}: | |
512 | 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'}) |
513 | 80 | ai_brw = self.browse(cr, uid, ref("test_purchase_iva02")) | 90 | ai_brw = self.browse(cr, uid, ref("test_purchase_iva02")) |
515 | 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 |
516 | 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 | ||
517 | 82 | 93 | ||
518 | === modified file 'l10n_ve_withholding_iva/test/iva_sale_wh.yml' | |||
519 | --- l10n_ve_withholding_iva/test/iva_sale_wh.yml 2013-01-17 19:19:09 +0000 | |||
520 | +++ l10n_ve_withholding_iva/test/iva_sale_wh.yml 2013-11-18 00:07:54 +0000 | |||
521 | @@ -109,11 +109,13 @@ | |||
522 | 109 | ap_obj=self.pool.get('account.period') | 109 | ap_obj=self.pool.get('account.period') |
523 | 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")}) |
524 | 111 | assert period, 'There aren\'t periods for this date' | 111 | assert period, 'There aren\'t periods for this date' |
525 | 112 | ap_obj.write(cr, uid, period, {'special':False}) | ||
526 | 112 | ap_brw = ap_obj.browse(cr, uid, period[0]) | 113 | ap_brw = ap_obj.browse(cr, uid, period[0]) |
527 | 113 | if ap_brw.state == 'done': | 114 | if ap_brw.state == 'done': |
528 | 114 | ap.action_draft(cr, uid, period) | 115 | ap.action_draft(cr, uid, period) |
529 | 115 | ap_brw = ap.browse(cr, uid, period[0]) | 116 | ap_brw = ap.browse(cr, uid, period[0]) |
530 | 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' |
531 | 118 | assert ap_brw.special == False, 'Period is special. It should be' | ||
532 | 117 | 119 | ||
533 | 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]}) |
534 | 119 | - | 121 | - |
535 | 120 | 122 | ||
536 | === modified file 'l10n_ve_withholding_iva/test/iva_test_wh_2.yml' | |||
537 | --- l10n_ve_withholding_iva/test/iva_test_wh_2.yml 2013-01-18 19:55:38 +0000 | |||
538 | +++ l10n_ve_withholding_iva/test/iva_test_wh_2.yml 2013-11-18 00:07:54 +0000 | |||
539 | @@ -10,28 +10,55 @@ | |||
540 | 10 | - | 10 | - |
541 | 11 | 10.2 I generate a withholding vat customer | 11 | 10.2 I generate a withholding vat customer |
542 | 12 | - | 12 | - |
544 | 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'}}: |
545 | 14 | journal_id: wh_sales_journal | 14 | journal_id: wh_sales_journal |
546 | 15 | partner_id: base.res_partner_23 | 15 | partner_id: base.res_partner_23 |
547 | 16 | number: 222444333000 | 16 | number: 222444333000 |
548 | 17 | account_id: account.a_recv | 17 | account_id: account.a_recv |
549 | 18 | name: 'IVA wh vat customer Vauxoo test 2' | 18 | name: 'IVA wh vat customer Vauxoo test 2' |
550 | 19 | type: out_invoice | 19 | type: out_invoice |
551 | 20 | state: draft | ||
552 | 20 | - | 21 | - |
553 | 21 | 10.3 I check withholding vat customer | 22 | 10.3 I check withholding vat customer |
554 | 22 | - | 23 | - |
557 | 23 | !assert {model: account.wh.iva, id: wh_iva_test02, string: Wh was not saved}: | 24 | !python {model: account.wh.iva}: | |
558 | 24 | - state == 'draft' | 25 | values = {} |
559 | 26 | rp_obj = self.pool.get('res.partner') | ||
560 | 27 | rp_brw = rp_obj.browse(cr,uid,ref("base.res_partner_23")) | ||
561 | 28 | res = self.onchange_partner_id(cr, uid, [ref('wh_iva_test02')], 'out_invoice', rp_brw.id) | ||
562 | 29 | values['wh_lines'] = [(0,0,{'invoice_id':ref('test_iva01'), 'name':'N/A', 'wh_iva_rate':rp_brw.wh_iva_rate})] | ||
563 | 30 | values['account_id'] = res['value']['account_id'] | ||
564 | 31 | values['type'] = 'out_invoice' | ||
565 | 32 | self.write(cr,uid,ref('wh_iva_test02'),values) | ||
566 | 33 | awi_brw = self.browse(cr,uid,ref('wh_iva_test02')) | ||
567 | 34 | assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type | ||
568 | 35 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
569 | 36 | assert awi_brw.wh_lines, "There are no lines to withhold" | ||
570 | 37 | self.compute_amount_wh(cr,uid,[ref('wh_iva_test02')]) | ||
571 | 25 | - | 38 | - |
572 | 26 | 10.4 I confirm the withholding vat customer | 39 | 10.4 I confirm the withholding vat customer |
573 | 27 | - | 40 | - |
575 | 28 | !workflow {model: account.wh.iva, action: wh_iva_confirmed, ref: wh_iva_test02} | 41 | !python {model: account.wh.iva}: | |
576 | 42 | import netsvc | ||
577 | 43 | from openerp.osv import osv | ||
578 | 44 | wf_service = netsvc.LocalService("workflow") | ||
579 | 45 | try: | ||
580 | 46 | self.check_wh_lines_fortnights(cr, uid, [ref('wh_iva_test02')]) | ||
581 | 47 | self.check_invoice_nro_ctrl(cr, uid, [ref('wh_iva_test02')]) | ||
582 | 48 | self.check_vat_wh(cr, uid, [ref('wh_iva_test02')]) | ||
583 | 49 | self.check_wh_taxes(cr, uid, [ref('wh_iva_test02')]) | ||
584 | 50 | self.check_wh_taxes(cr, uid, [ref('wh_iva_test02')]) | ||
585 | 51 | assert False, "An exception should have been raised, unwithholdable taxes are not allowed to reach here!" | ||
586 | 52 | except osv.except_osv: | ||
587 | 53 | # exception was raised as expected | ||
588 | 54 | pass | ||
589 | 29 | - | 55 | - |
590 | 30 | 10.5 I check withholding vat is not confirmed | 56 | 10.5 I check withholding vat is not confirmed |
591 | 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. |
592 | 32 | - | 58 | - |
595 | 33 | !assert {model: account.wh.iva, id: wh_iva_test02, string: Could not confirm the wh}: | 59 | !python {model: account.wh.iva}: | |
596 | 34 | - state != 'confirmed' | 60 | awi_brw = self.browse(cr,uid,ref('wh_iva_test02')) |
597 | 61 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
598 | 35 | - | 62 | - |
599 | 36 | 10.6 I try to mark it as done | 63 | 10.6 I try to mark it as done |
600 | 37 | - | 64 | - |
601 | 38 | 65 | ||
602 | === modified file 'l10n_ve_withholding_iva/test/iva_test_wh_3.yml' | |||
603 | --- l10n_ve_withholding_iva/test/iva_test_wh_3.yml 2013-01-18 19:55:38 +0000 | |||
604 | +++ l10n_ve_withholding_iva/test/iva_test_wh_3.yml 2013-11-18 00:07:54 +0000 | |||
605 | @@ -16,11 +16,15 @@ | |||
606 | 16 | account_id: account.a_recv | 16 | account_id: account.a_recv |
607 | 17 | name: 'IVA wh vat customer Vauxoo test 3' | 17 | name: 'IVA wh vat customer Vauxoo test 3' |
608 | 18 | type: out_invoice | 18 | type: out_invoice |
609 | 19 | state: draft | ||
610 | 19 | - | 20 | - |
611 | 20 | 11.3 I check withholding vat customer | 21 | 11.3 I check withholding vat customer |
612 | 21 | - | 22 | - |
615 | 22 | !assert {model: account.wh.iva, id: wh_iva_test03, string: Wh was not saved}: | 23 | !python {model: account.wh.iva}: | |
616 | 23 | - state == 'draft' | 24 | self.write(cr,uid,ref('wh_iva_test03'),{'type':'out_invoice'}) |
617 | 25 | awi_brw = self.browse(cr,uid,ref('wh_iva_test03')) | ||
618 | 26 | assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type | ||
619 | 27 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
620 | 24 | - | 28 | - |
621 | 25 | 11.4 Before validating let's add the period | 29 | 11.4 Before validating let's add the period |
622 | 26 | - | 30 | - |
623 | @@ -43,8 +47,9 @@ | |||
624 | 43 | 11.7 I check withholding vat is not confirmed | 47 | 11.7 I check withholding vat is not confirmed |
625 | 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. |
626 | 45 | - | 49 | - |
629 | 46 | !assert {model: account.wh.iva, id: wh_iva_test03, string: Could not confirm the wh}: | 50 | !python {model: account.wh.iva}: | |
630 | 47 | - state != 'confirmed' | 51 | awi_brw = self.browse(cr,uid,ref('wh_iva_test03')) |
631 | 52 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
632 | 48 | - | 53 | - |
633 | 49 | 11.8 I try to mark it as done | 54 | 11.8 I try to mark it as done |
634 | 50 | - | 55 | - |
635 | @@ -52,5 +57,6 @@ | |||
636 | 52 | - | 57 | - |
637 | 53 | 11.9 I check withholding vat is not done | 58 | 11.9 I check withholding vat is not done |
638 | 54 | - | 59 | - |
641 | 55 | !assert {model: account.wh.iva, id: wh_iva_test01, string: Wh cannot be in done state}: | 60 | !python {model: account.wh.iva}: | |
642 | 56 | - state != 'done' | 61 | awi_brw = self.browse(cr,uid,ref('wh_iva_test03')) |
643 | 62 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
644 | 57 | 63 | ||
645 | === modified file 'l10n_ve_withholding_iva/test/iva_test_wh_4.yml' | |||
646 | --- l10n_ve_withholding_iva/test/iva_test_wh_4.yml 2013-01-18 19:55:38 +0000 | |||
647 | +++ l10n_ve_withholding_iva/test/iva_test_wh_4.yml 2013-11-18 00:07:54 +0000 | |||
648 | @@ -16,11 +16,15 @@ | |||
649 | 16 | account_id: account.a_recv | 16 | account_id: account.a_recv |
650 | 17 | name: 'IVA wh vat customer Vauxoo test 3' | 17 | name: 'IVA wh vat customer Vauxoo test 3' |
651 | 18 | type: out_invoice | 18 | type: out_invoice |
652 | 19 | state: draft | ||
653 | 19 | - | 20 | - |
654 | 20 | 12.3 I check withholding vat customer | 21 | 12.3 I check withholding vat customer |
655 | 21 | - | 22 | - |
658 | 22 | !assert {model: account.wh.iva, id: wh_iva_test04, string: Wh was not saved}: | 23 | !python {model: account.wh.iva}: | |
659 | 23 | - state == 'draft' | 24 | self.write(cr,uid,ref('wh_iva_test04'),{'type':'out_invoice'}) |
660 | 25 | awi_brw = self.browse(cr,uid,ref('wh_iva_test04')) | ||
661 | 26 | assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type | ||
662 | 27 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
663 | 24 | - | 28 | - |
664 | 25 | 12.4 Before validating let's add the period | 29 | 12.4 Before validating let's add the period |
665 | 26 | - | 30 | - |
666 | 27 | 31 | ||
667 | === modified file 'l10n_ve_withholding_muni/__openerp__.py' | |||
668 | --- l10n_ve_withholding_muni/__openerp__.py 2013-01-30 20:27:24 +0000 | |||
669 | +++ l10n_ve_withholding_muni/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
670 | @@ -47,7 +47,7 @@ | |||
671 | 47 | ], | 47 | ], |
672 | 48 | 'demo_xml': [], | 48 | 'demo_xml': [], |
673 | 49 | 'test': [], | 49 | 'test': [], |
675 | 50 | 'installable': True, | 50 | 'installable': False, |
676 | 51 | 'active': False, | 51 | 'active': False, |
677 | 52 | } | 52 | } |
678 | 53 | 53 | ||
679 | 54 | 54 | ||
680 | === modified file 'l10n_ve_withholding_src/__openerp__.py' | |||
681 | --- l10n_ve_withholding_src/__openerp__.py 2013-04-18 21:03:12 +0000 | |||
682 | +++ l10n_ve_withholding_src/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
683 | @@ -67,5 +67,5 @@ | |||
684 | 67 | 67 | ||
685 | 68 | ], | 68 | ], |
686 | 69 | "active": False, | 69 | "active": False, |
688 | 70 | "installable": True | 70 | "installable": False, |
689 | 71 | } | 71 | } |
690 | 72 | 72 | ||
691 | === modified file 'ovl/__openerp__.py' | |||
692 | --- ovl/__openerp__.py 2013-11-14 06:07:44 +0000 | |||
693 | +++ ovl/__openerp__.py 2013-11-18 00:07:54 +0000 | |||
694 | @@ -87,5 +87,5 @@ | |||
695 | 87 | "images" : [], | 87 | "images" : [], |
696 | 88 | "auto_install": False, | 88 | "auto_install": False, |
697 | 89 | "application": True, | 89 | "application": True, |
699 | 90 | "installable": True, | 90 | "installable": False, |
700 | 91 | } | 91 | } |