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: |
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 |
Related bugs: |
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.
Commit message
Description of the change
- 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
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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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-17 23:21:43 +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/__openerp__.py' | |||
300 | --- l10n_ve_withholding/__openerp__.py 2013-09-18 23:55:08 +0000 | |||
301 | +++ l10n_ve_withholding/__openerp__.py 2013-11-17 23:21:43 +0000 | |||
302 | @@ -49,9 +49,9 @@ | |||
303 | 49 | ], | 49 | ], |
304 | 50 | 'demo_xml': [], | 50 | 'demo_xml': [], |
305 | 51 | 'test': [ | 51 | 'test': [ |
307 | 52 | # 'test/wh_pay_invoice.yml' | 52 | 'test/wh_pay_invoice.yml' |
308 | 53 | ], | 53 | ], |
310 | 54 | 'installable': True, | 54 | 'installable': False, |
311 | 55 | 'active': False, | 55 | 'active': False, |
312 | 56 | } | 56 | } |
313 | 57 | 57 | ||
314 | 58 | 58 | ||
315 | === modified file 'l10n_ve_withholding_islr/__openerp__.py' | |||
316 | --- l10n_ve_withholding_islr/__openerp__.py 2013-11-14 20:14:21 +0000 | |||
317 | +++ l10n_ve_withholding_islr/__openerp__.py 2013-11-17 23:21:43 +0000 | |||
318 | @@ -74,5 +74,5 @@ | |||
319 | 74 | # 'test/test_duplicate.yml', | 74 | # 'test/test_duplicate.yml', |
320 | 75 | ], | 75 | ], |
321 | 76 | "active": False, | 76 | "active": False, |
323 | 77 | "installable": True | 77 | "installable": False, |
324 | 78 | } | 78 | } |
325 | 79 | 79 | ||
326 | === modified file 'l10n_ve_withholding_iva/__openerp__.py' | |||
327 | --- l10n_ve_withholding_iva/__openerp__.py 2013-11-17 02:03:44 +0000 | |||
328 | +++ l10n_ve_withholding_iva/__openerp__.py 2013-11-17 23:21:43 +0000 | |||
329 | @@ -72,20 +72,20 @@ | |||
330 | 72 | ], | 72 | ], |
331 | 73 | 73 | ||
332 | 74 | 'test': [ | 74 | 'test': [ |
345 | 75 | # 'test/iva_purchase.yml', | 75 | 'test/iva_purchase.yml', |
346 | 76 | # 'test/iva_purchase_wh.yml', | 76 | 'test/iva_purchase_wh.yml', |
347 | 77 | # 'test/iva_purchase_nret1.yml', | 77 | 'test/iva_purchase_nret1.yml', |
348 | 78 | # 'test/iva_purchase_nret2.yml', | 78 | 'test/iva_purchase_nret2.yml', |
349 | 79 | # 'test/iva_purchase_nret3.yml', | 79 | 'test/iva_purchase_nret3.yml', |
350 | 80 | # 'test/iva_sale.yml', | 80 | 'test/iva_sale.yml', |
351 | 81 | # 'test/iva_sale_wh.yml', | 81 | 'test/iva_sale_wh.yml', |
352 | 82 | # 'test/iva_test_invoice.yml', | 82 | 'test/iva_test_invoice.yml', |
353 | 83 | # 'test/iva_test_wh.yml', | 83 | 'test/iva_test_wh.yml', |
354 | 84 | # 'test/iva_test_wh_2.yml', | 84 | 'test/iva_test_wh_2.yml', |
355 | 85 | # 'test/iva_test_wh_3.yml', | 85 | 'test/iva_test_wh_3.yml', |
356 | 86 | # 'test/iva_test_wh_4.yml', | 86 | 'test/iva_test_wh_4.yml', |
357 | 87 | ], | 87 | ], |
359 | 88 | 'installable': True, | 88 | 'installable': False, |
360 | 89 | 'active': False, | 89 | 'active': False, |
361 | 90 | } | 90 | } |
362 | 91 | 91 | ||
363 | 92 | 92 | ||
364 | === modified file 'l10n_ve_withholding_iva/model/wh_iva.py' | |||
365 | --- l10n_ve_withholding_iva/model/wh_iva.py 2013-07-23 14:23:34 +0000 | |||
366 | +++ l10n_ve_withholding_iva/model/wh_iva.py 2013-11-17 23:21:43 +0000 | |||
367 | @@ -725,6 +725,7 @@ | |||
368 | 725 | fortnight_str = {'True': ' - Second Fortnight)', | 725 | fortnight_str = {'True': ' - Second Fortnight)', |
369 | 726 | 'False': ' - First Fortnight)'} | 726 | 'False': ' - First Fortnight)'} |
370 | 727 | for awi_brw in self.browse(cr, uid, ids, context=context): | 727 | for awi_brw in self.browse(cr, uid, ids, context=context): |
371 | 728 | if not awi_brw.wh_lines: return False | ||
372 | 728 | if awi_brw.type in ['out_invoice']: return True | 729 | if awi_brw.type in ['out_invoice']: return True |
373 | 729 | for awil_brw in awi_brw.wh_lines: | 730 | for awil_brw in awi_brw.wh_lines: |
374 | 730 | awil_period_id, awil_fortnight = per_obj.find_fortnight( | 731 | awil_period_id, awil_fortnight = per_obj.find_fortnight( |
375 | 731 | 732 | ||
376 | === modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret1.yml' | |||
377 | --- l10n_ve_withholding_iva/test/iva_purchase_nret1.yml 2013-01-15 15:16:32 +0000 | |||
378 | +++ l10n_ve_withholding_iva/test/iva_purchase_nret1.yml 2013-11-17 23:21:43 +0000 | |||
379 | @@ -32,7 +32,7 @@ | |||
380 | 32 | date_invoice: !eval time.strftime('%Y-%m-%d') | 32 | date_invoice: !eval time.strftime('%Y-%m-%d') |
381 | 33 | partner_id: base.res_partner_23 | 33 | partner_id: base.res_partner_23 |
382 | 34 | reference_type: none | 34 | reference_type: none |
384 | 35 | journal_id: account.sales_journal | 35 | journal_id: account.expenses_journal |
385 | 36 | wh_iva: True | 36 | wh_iva: True |
386 | 37 | invoice_line: | 37 | invoice_line: |
387 | 38 | - product_id: product.product_product_3 | 38 | - product_id: product.product_product_3 |
388 | 39 | 39 | ||
389 | === modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret2.yml' | |||
390 | --- l10n_ve_withholding_iva/test/iva_purchase_nret2.yml 2013-01-15 15:16:32 +0000 | |||
391 | +++ l10n_ve_withholding_iva/test/iva_purchase_nret2.yml 2013-11-17 23:21:43 +0000 | |||
392 | @@ -42,7 +42,7 @@ | |||
393 | 42 | date_invoice: !eval time.strftime('%Y-%m-%d') | 42 | date_invoice: !eval time.strftime('%Y-%m-%d') |
394 | 43 | partner_id: base.res_partner_23 | 43 | partner_id: base.res_partner_23 |
395 | 44 | reference_type: none | 44 | reference_type: none |
397 | 45 | journal_id: account.sales_journal | 45 | journal_id: account.expenses_journal |
398 | 46 | wh_iva: True | 46 | wh_iva: True |
399 | 47 | invoice_line: | 47 | invoice_line: |
400 | 48 | - product_id: product.product_product_3 | 48 | - product_id: product.product_product_3 |
401 | 49 | 49 | ||
402 | === modified file 'l10n_ve_withholding_iva/test/iva_purchase_nret3.yml' | |||
403 | --- l10n_ve_withholding_iva/test/iva_purchase_nret3.yml 2013-01-15 15:16:32 +0000 | |||
404 | +++ l10n_ve_withholding_iva/test/iva_purchase_nret3.yml 2013-11-17 23:21:43 +0000 | |||
405 | @@ -52,7 +52,7 @@ | |||
406 | 52 | date_invoice: !eval time.strftime('%Y-%m-%d') | 52 | date_invoice: !eval time.strftime('%Y-%m-%d') |
407 | 53 | partner_id: base.res_partner_23 | 53 | partner_id: base.res_partner_23 |
408 | 54 | reference_type: none | 54 | reference_type: none |
410 | 55 | journal_id: account.sales_journal | 55 | journal_id: account.expenses_journal |
411 | 56 | wh_iva: True | 56 | wh_iva: True |
412 | 57 | invoice_line: | 57 | invoice_line: |
413 | 58 | - product_id: product.product_product_3 | 58 | - product_id: product.product_product_3 |
414 | 59 | 59 | ||
415 | === modified file 'l10n_ve_withholding_iva/test/iva_purchase_wh.yml' | |||
416 | --- l10n_ve_withholding_iva/test/iva_purchase_wh.yml 2013-01-15 15:16:32 +0000 | |||
417 | +++ l10n_ve_withholding_iva/test/iva_purchase_wh.yml 2013-11-17 23:21:43 +0000 | |||
418 | @@ -26,13 +26,14 @@ | |||
419 | 26 | - | 26 | - |
420 | 27 | 2.4 I create a purchase invoice | 27 | 2.4 I create a purchase invoice |
421 | 28 | - | 28 | - |
424 | 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'}}: |
425 | 30 | type: out_invoice | 30 | type: in_invoice |
426 | 31 | state: draft | ||
427 | 31 | company_id: base.main_company | 32 | company_id: base.main_company |
428 | 32 | date_invoice: !eval time.strftime('%Y-%m-%d') | 33 | date_invoice: !eval time.strftime('%Y-%m-%d') |
429 | 33 | partner_id: base.res_partner_23 | 34 | partner_id: base.res_partner_23 |
430 | 34 | reference_type: none | 35 | reference_type: none |
432 | 35 | journal_id: account.sales_journal | 36 | journal_id: |
433 | 36 | wh_iva: True | 37 | wh_iva: True |
434 | 37 | invoice_line: | 38 | invoice_line: |
435 | 38 | - product_id: product.product_product_3 | 39 | - product_id: product.product_product_3 |
436 | @@ -50,10 +51,19 @@ | |||
437 | 50 | invoice_line_tax_id: | 51 | invoice_line_tax_id: |
438 | 51 | - l10n_ve_fiscal_requirements.iva_purchase1 | 52 | - l10n_ve_fiscal_requirements.iva_purchase1 |
439 | 52 | - | 53 | - |
441 | 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 |
442 | 54 | - | 55 | - |
445 | 55 | !assert {model: account.invoice, id: test_purchase_iva02}: | 56 | !python {model: account.invoice}: | |
446 | 56 | - state == 'draft' | 57 | ap_obj=self.pool.get('account.period') |
447 | 58 | import time | ||
448 | 59 | period = ap_obj.find(cr, uid, time.strftime('%Y/%m/%d'), context={'company_id':ref("base.main_company")}) | ||
449 | 60 | assert period, 'There aren\'t periods for this date' | ||
450 | 61 | ap_obj.write(cr, uid, period, {'special':False}) | ||
451 | 62 | self.write(cr,uid,ref('test_purchase_iva02'),{'journal_id':ref('account.expenses_journal'),'type':'in_invoice'}) | ||
452 | 63 | ai_brw = self.browse(cr,uid,ref('test_purchase_iva02')) | ||
453 | 64 | assert ai_brw.type == 'in_invoice', "Not the intended type. It should be 'in_invoice' not '%s'"%ai_brw.type | ||
454 | 65 | assert ai_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%ai_brw.state | ||
455 | 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 | ||
456 | 57 | - | 67 | - |
457 | 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 |
458 | 59 | - | 69 | - |
459 | @@ -76,6 +86,7 @@ | |||
460 | 76 | 2.10 Set control number for the invoice | 86 | 2.10 Set control number for the invoice |
461 | 77 | - | 87 | - |
462 | 78 | !python {model: account.invoice}: | | 88 | !python {model: account.invoice}: | |
464 | 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'}) |
465 | 80 | ai_brw = self.browse(cr, uid, ref("test_purchase_iva02")) | 90 | ai_brw = self.browse(cr, uid, ref("test_purchase_iva02")) |
467 | 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 |
468 | 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 | ||
469 | 82 | 93 | ||
470 | === modified file 'l10n_ve_withholding_iva/test/iva_sale_wh.yml' | |||
471 | --- l10n_ve_withholding_iva/test/iva_sale_wh.yml 2013-01-17 19:19:09 +0000 | |||
472 | +++ l10n_ve_withholding_iva/test/iva_sale_wh.yml 2013-11-17 23:21:43 +0000 | |||
473 | @@ -109,11 +109,13 @@ | |||
474 | 109 | ap_obj=self.pool.get('account.period') | 109 | ap_obj=self.pool.get('account.period') |
475 | 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")}) |
476 | 111 | assert period, 'There aren\'t periods for this date' | 111 | assert period, 'There aren\'t periods for this date' |
477 | 112 | ap_obj.write(cr, uid, period, {'special':False}) | ||
478 | 112 | ap_brw = ap_obj.browse(cr, uid, period[0]) | 113 | ap_brw = ap_obj.browse(cr, uid, period[0]) |
479 | 113 | if ap_brw.state == 'done': | 114 | if ap_brw.state == 'done': |
480 | 114 | ap.action_draft(cr, uid, period) | 115 | ap.action_draft(cr, uid, period) |
481 | 115 | ap_brw = ap.browse(cr, uid, period[0]) | 116 | ap_brw = ap.browse(cr, uid, period[0]) |
482 | 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' |
483 | 118 | assert ap_brw.special == False, 'Period is special. It should be' | ||
484 | 117 | 119 | ||
485 | 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]}) |
486 | 119 | - | 121 | - |
487 | 120 | 122 | ||
488 | === modified file 'l10n_ve_withholding_iva/test/iva_test_wh_2.yml' | |||
489 | --- l10n_ve_withholding_iva/test/iva_test_wh_2.yml 2013-01-18 19:55:38 +0000 | |||
490 | +++ l10n_ve_withholding_iva/test/iva_test_wh_2.yml 2013-11-17 23:21:43 +0000 | |||
491 | @@ -10,28 +10,55 @@ | |||
492 | 10 | - | 10 | - |
493 | 11 | 10.2 I generate a withholding vat customer | 11 | 10.2 I generate a withholding vat customer |
494 | 12 | - | 12 | - |
496 | 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'}}: |
497 | 14 | journal_id: wh_sales_journal | 14 | journal_id: wh_sales_journal |
498 | 15 | partner_id: base.res_partner_23 | 15 | partner_id: base.res_partner_23 |
499 | 16 | number: 222444333000 | 16 | number: 222444333000 |
500 | 17 | account_id: account.a_recv | 17 | account_id: account.a_recv |
501 | 18 | name: 'IVA wh vat customer Vauxoo test 2' | 18 | name: 'IVA wh vat customer Vauxoo test 2' |
502 | 19 | type: out_invoice | 19 | type: out_invoice |
503 | 20 | state: draft | ||
504 | 20 | - | 21 | - |
505 | 21 | 10.3 I check withholding vat customer | 22 | 10.3 I check withholding vat customer |
506 | 22 | - | 23 | - |
509 | 23 | !assert {model: account.wh.iva, id: wh_iva_test02, string: Wh was not saved}: | 24 | !python {model: account.wh.iva}: | |
510 | 24 | - state == 'draft' | 25 | values = {} |
511 | 26 | rp_obj = self.pool.get('res.partner') | ||
512 | 27 | rp_brw = rp_obj.browse(cr,uid,ref("base.res_partner_23")) | ||
513 | 28 | res = self.onchange_partner_id(cr, uid, [ref('wh_iva_test02')], 'out_invoice', rp_brw.id) | ||
514 | 29 | values['wh_lines'] = [(0,0,{'invoice_id':ref('test_iva01'), 'name':'N/A', 'wh_iva_rate':rp_brw.wh_iva_rate})] | ||
515 | 30 | values['account_id'] = res['value']['account_id'] | ||
516 | 31 | values['type'] = 'out_invoice' | ||
517 | 32 | self.write(cr,uid,ref('wh_iva_test02'),values) | ||
518 | 33 | awi_brw = self.browse(cr,uid,ref('wh_iva_test02')) | ||
519 | 34 | assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type | ||
520 | 35 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
521 | 36 | assert awi_brw.wh_lines, "There are no lines to withhold" | ||
522 | 37 | self.compute_amount_wh(cr,uid,[ref('wh_iva_test02')]) | ||
523 | 25 | - | 38 | - |
524 | 26 | 10.4 I confirm the withholding vat customer | 39 | 10.4 I confirm the withholding vat customer |
525 | 27 | - | 40 | - |
527 | 28 | !workflow {model: account.wh.iva, action: wh_iva_confirmed, ref: wh_iva_test02} | 41 | !python {model: account.wh.iva}: | |
528 | 42 | import netsvc | ||
529 | 43 | from openerp.osv import osv | ||
530 | 44 | wf_service = netsvc.LocalService("workflow") | ||
531 | 45 | try: | ||
532 | 46 | self.check_wh_lines_fortnights(cr, uid, [ref('wh_iva_test02')]) | ||
533 | 47 | self.check_invoice_nro_ctrl(cr, uid, [ref('wh_iva_test02')]) | ||
534 | 48 | self.check_vat_wh(cr, uid, [ref('wh_iva_test02')]) | ||
535 | 49 | self.check_wh_taxes(cr, uid, [ref('wh_iva_test02')]) | ||
536 | 50 | self.check_wh_taxes(cr, uid, [ref('wh_iva_test02')]) | ||
537 | 51 | assert False, "An exception should have been raised, unwithholdable taxes are not allowed to reach here!" | ||
538 | 52 | except osv.except_osv: | ||
539 | 53 | # exception was raised as expected | ||
540 | 54 | pass | ||
541 | 29 | - | 55 | - |
542 | 30 | 10.5 I check withholding vat is not confirmed | 56 | 10.5 I check withholding vat is not confirmed |
543 | 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. |
544 | 32 | - | 58 | - |
547 | 33 | !assert {model: account.wh.iva, id: wh_iva_test02, string: Could not confirm the wh}: | 59 | !python {model: account.wh.iva}: | |
548 | 34 | - state != 'confirmed' | 60 | awi_brw = self.browse(cr,uid,ref('wh_iva_test02')) |
549 | 61 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
550 | 35 | - | 62 | - |
551 | 36 | 10.6 I try to mark it as done | 63 | 10.6 I try to mark it as done |
552 | 37 | - | 64 | - |
553 | 38 | 65 | ||
554 | === modified file 'l10n_ve_withholding_iva/test/iva_test_wh_3.yml' | |||
555 | --- l10n_ve_withholding_iva/test/iva_test_wh_3.yml 2013-01-18 19:55:38 +0000 | |||
556 | +++ l10n_ve_withholding_iva/test/iva_test_wh_3.yml 2013-11-17 23:21:43 +0000 | |||
557 | @@ -16,11 +16,15 @@ | |||
558 | 16 | account_id: account.a_recv | 16 | account_id: account.a_recv |
559 | 17 | name: 'IVA wh vat customer Vauxoo test 3' | 17 | name: 'IVA wh vat customer Vauxoo test 3' |
560 | 18 | type: out_invoice | 18 | type: out_invoice |
561 | 19 | state: draft | ||
562 | 19 | - | 20 | - |
563 | 20 | 11.3 I check withholding vat customer | 21 | 11.3 I check withholding vat customer |
564 | 21 | - | 22 | - |
567 | 22 | !assert {model: account.wh.iva, id: wh_iva_test03, string: Wh was not saved}: | 23 | !python {model: account.wh.iva}: | |
568 | 23 | - state == 'draft' | 24 | self.write(cr,uid,ref('wh_iva_test03'),{'type':'out_invoice'}) |
569 | 25 | awi_brw = self.browse(cr,uid,ref('wh_iva_test03')) | ||
570 | 26 | assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type | ||
571 | 27 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
572 | 24 | - | 28 | - |
573 | 25 | 11.4 Before validating let's add the period | 29 | 11.4 Before validating let's add the period |
574 | 26 | - | 30 | - |
575 | @@ -43,8 +47,9 @@ | |||
576 | 43 | 11.7 I check withholding vat is not confirmed | 47 | 11.7 I check withholding vat is not confirmed |
577 | 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. |
578 | 45 | - | 49 | - |
581 | 46 | !assert {model: account.wh.iva, id: wh_iva_test03, string: Could not confirm the wh}: | 50 | !python {model: account.wh.iva}: | |
582 | 47 | - state != 'confirmed' | 51 | awi_brw = self.browse(cr,uid,ref('wh_iva_test03')) |
583 | 52 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
584 | 48 | - | 53 | - |
585 | 49 | 11.8 I try to mark it as done | 54 | 11.8 I try to mark it as done |
586 | 50 | - | 55 | - |
587 | @@ -52,5 +57,6 @@ | |||
588 | 52 | - | 57 | - |
589 | 53 | 11.9 I check withholding vat is not done | 58 | 11.9 I check withholding vat is not done |
590 | 54 | - | 59 | - |
593 | 55 | !assert {model: account.wh.iva, id: wh_iva_test01, string: Wh cannot be in done state}: | 60 | !python {model: account.wh.iva}: | |
594 | 56 | - state != 'done' | 61 | awi_brw = self.browse(cr,uid,ref('wh_iva_test03')) |
595 | 62 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
596 | 57 | 63 | ||
597 | === modified file 'l10n_ve_withholding_iva/test/iva_test_wh_4.yml' | |||
598 | --- l10n_ve_withholding_iva/test/iva_test_wh_4.yml 2013-01-18 19:55:38 +0000 | |||
599 | +++ l10n_ve_withholding_iva/test/iva_test_wh_4.yml 2013-11-17 23:21:43 +0000 | |||
600 | @@ -16,11 +16,15 @@ | |||
601 | 16 | account_id: account.a_recv | 16 | account_id: account.a_recv |
602 | 17 | name: 'IVA wh vat customer Vauxoo test 3' | 17 | name: 'IVA wh vat customer Vauxoo test 3' |
603 | 18 | type: out_invoice | 18 | type: out_invoice |
604 | 19 | state: draft | ||
605 | 19 | - | 20 | - |
606 | 20 | 12.3 I check withholding vat customer | 21 | 12.3 I check withholding vat customer |
607 | 21 | - | 22 | - |
610 | 22 | !assert {model: account.wh.iva, id: wh_iva_test04, string: Wh was not saved}: | 23 | !python {model: account.wh.iva}: | |
611 | 23 | - state == 'draft' | 24 | self.write(cr,uid,ref('wh_iva_test04'),{'type':'out_invoice'}) |
612 | 25 | awi_brw = self.browse(cr,uid,ref('wh_iva_test04')) | ||
613 | 26 | assert awi_brw.type == 'out_invoice', "Not the intended type. It should be 'out_invoice' not '%s'"%awi_brw.type | ||
614 | 27 | assert awi_brw.state == 'draft', "Not the intended state. It should be 'draft' not '%s'"%awi_brw.state | ||
615 | 24 | - | 28 | - |
616 | 25 | 12.4 Before validating let's add the period | 29 | 12.4 Before validating let's add the period |
617 | 26 | - | 30 | - |
618 | 27 | 31 | ||
619 | === modified file 'l10n_ve_withholding_muni/__openerp__.py' | |||
620 | --- l10n_ve_withholding_muni/__openerp__.py 2013-01-30 20:27:24 +0000 | |||
621 | +++ l10n_ve_withholding_muni/__openerp__.py 2013-11-17 23:21:43 +0000 | |||
622 | @@ -47,7 +47,7 @@ | |||
623 | 47 | ], | 47 | ], |
624 | 48 | 'demo_xml': [], | 48 | 'demo_xml': [], |
625 | 49 | 'test': [], | 49 | 'test': [], |
627 | 50 | 'installable': True, | 50 | 'installable': False, |
628 | 51 | 'active': False, | 51 | 'active': False, |
629 | 52 | } | 52 | } |
630 | 53 | 53 | ||
631 | 54 | 54 | ||
632 | === modified file 'l10n_ve_withholding_src/__openerp__.py' | |||
633 | --- l10n_ve_withholding_src/__openerp__.py 2013-04-18 21:03:12 +0000 | |||
634 | +++ l10n_ve_withholding_src/__openerp__.py 2013-11-17 23:21:43 +0000 | |||
635 | @@ -67,5 +67,5 @@ | |||
636 | 67 | 67 | ||
637 | 68 | ], | 68 | ], |
638 | 69 | "active": False, | 69 | "active": False, |
640 | 70 | "installable": True | 70 | "installable": False, |
641 | 71 | } | 71 | } |
642 | 72 | 72 | ||
643 | === modified file 'ovl/__openerp__.py' | |||
644 | --- ovl/__openerp__.py 2013-11-14 06:07:44 +0000 | |||
645 | +++ ovl/__openerp__.py 2013-11-17 23:21:43 +0000 | |||
646 | @@ -87,5 +87,5 @@ | |||
647 | 87 | "images" : [], | 87 | "images" : [], |
648 | 88 | "auto_install": False, | 88 | "auto_install": False, |
649 | 89 | "application": True, | 89 | "application": True, |
651 | 90 | "installable": True, | 90 | "installable": False, |
652 | 91 | } | 91 | } |