~archetipo/openobject-italia/caritas_pcomod

« back to all changes in this revision

Viewing changes to account_invoice_tax_by_column/test/tax_computation.yml

  • Committer: eLBati
  • Date: 2012-03-14 07:05:28 UTC
  • Revision ID: lorenzo.battistini@agilebg.com-20120314070528-s2sgejte2iegtsns
[FIX] removing from test a non implemented scenario

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
        - amount_tax == 82.26
187
187
 
188
188
-
 
189
  TODO
189
190
  In order to test tax computation I create a new customer invoice
190
191
-
191
 
  !record {model: account.invoice, id: account_invoice_customer4}:
192
 
    account_id: account.a_recv
193
 
    address_contact_id: base.res_partner_address_zen
194
 
    address_invoice_id: base.res_partner_address_zen
195
 
    company_id: base.main_company
196
 
    currency_id: base.EUR
197
 
    date_invoice: !eval time.strftime('%Y-%m-%d')
198
 
    vertical_comp: 1
199
 
    invoice_line:
200
 
      - account_id: account.a_sale
201
 
        name: '148.28'
202
 
        price_unit: 148.28
203
 
        quantity: 1.0
204
 
        invoice_line_tax_id:
205
 
            - account_tax_20_inc
206
 
      - account_id: account.a_sale
207
 
        name: '148.28'
208
 
        price_unit: 148.28
209
 
        quantity: 1.0
210
 
        invoice_line_tax_id:
211
 
            - account_tax_20_inc
212
 
    journal_id: account.sales_journal
213
 
    partner_id: base.res_partner_3
 
192
  #!record {model: account.invoice, id: account_invoice_customer4}:
 
193
    #account_id: account.a_recv
 
194
    #address_contact_id: base.res_partner_address_zen
 
195
    #address_invoice_id: base.res_partner_address_zen
 
196
    #company_id: base.main_company
 
197
    #currency_id: base.EUR
 
198
    #date_invoice: !eval time.strftime('%Y-%m-%d')
 
199
    #vertical_comp: 1
 
200
    #invoice_line:
 
201
      #- account_id: account.a_sale
 
202
        #name: '148.28'
 
203
        #price_unit: 148.28
 
204
        #quantity: 1.0
 
205
        #invoice_line_tax_id:
 
206
            #- account_tax_20_inc
 
207
      #- account_id: account.a_sale
 
208
        #name: '148.28'
 
209
        #price_unit: 148.28
 
210
        #quantity: 1.0
 
211
        #invoice_line_tax_id:
 
212
            #- account_tax_20_inc
 
213
    #journal_id: account.sales_journal
 
214
    #partner_id: base.res_partner_3
214
215
    
215
 
-  
216
 
    Compute the total tax.
217
 
-  
218
 
    !python {model: account.invoice}: |
219
 
        self.button_compute(cr, uid, [ref("account_invoice_customer4")])  
220
 
-  
221
 
    Then I verify the amount.
222
 
    148.28 + 148.28 = 296.56
223
 
    296.56 ÷ 1.2 = 247.133333333 = 247.13
224
 
    296.56 - 247.13 = 49.43
225
 
-  
226
 
    !assert {model: account.invoice, id: account_invoice_customer4}:
227
 
        - amount_tax == 49.43
 
216
#-  
 
217
    #Compute the total tax.
 
218
#-  
 
219
    #!python {model: account.invoice}: |
 
220
        #self.button_compute(cr, uid, [ref("account_invoice_customer4")])  
 
221
#-  
 
222
    #Then I verify the amount.
 
223
    #148.28 + 148.28 = 296.56
 
224
    #296.56 ÷ 1.2 = 247.133333333 = 247.13
 
225
    #296.56 - 247.13 = 49.43
 
226
#-  
 
227
    #!assert {model: account.invoice, id: account_invoice_customer4}:
 
228
        #- amount_tax == 49.43