[IMP] point_of_sale: chagned name of method and put the data file in comment
bzr revid: sbh@tinyerp.com-20100611124655-n8ksbqwyk13gsr81
This commit is contained in:
parent
f0b124d52d
commit
ca9b03d321
|
@ -67,14 +67,14 @@ Main features :
|
|||
# 'pos_wizard.xml',
|
||||
'pos_view.xml',
|
||||
'pos_sequence.xml',
|
||||
'posrule_data.xml',
|
||||
#'posrule_data.xml',
|
||||
'pos_data.xml',
|
||||
'pos_workflow.xml',
|
||||
'statement_view.xml',
|
||||
'statement_report.xml',
|
||||
'statement_data.xml',
|
||||
#'statement_data.xml',
|
||||
],
|
||||
'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml'],
|
||||
'demo_xml': ['pos_demo.xml','singer_statement_demo.xml','multi_company_stock_data.xml',],
|
||||
'test':['test/pos_test.yml',],
|
||||
'installable': True,
|
||||
}
|
||||
|
|
|
@ -192,11 +192,10 @@ class pos_order(osv.osv):
|
|||
(1-(line.discount or 0.0)/100.0), line.qty),
|
||||
res[order.id]['amount_tax'])
|
||||
else:
|
||||
res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2),
|
||||
tax_obj.compute_all(cr, uid, line.product_id.taxes_id,
|
||||
res[order.id]['amount_tax'] = tax_obj.compute_all(cr, uid, line.product_id.taxes_id,
|
||||
line.price_unit * \
|
||||
(1-(line.discount or 0.0)/100.0), line.qty),
|
||||
res[order.id]['amount_tax'])
|
||||
(1-(line.discount or 0.0)/100.0), line.qty)['total_included']
|
||||
|
||||
return res
|
||||
|
||||
|
||||
|
@ -1058,9 +1057,7 @@ class pos_order_line(osv.osv):
|
|||
for line in self.browse(cr, uid, ids):
|
||||
tax_amount = 0.0
|
||||
taxes = [t for t in line.product_id.taxes_id]
|
||||
computed_taxes = account_tax_objcompute_all(cr, uid, taxes, line.price_unit, line.qty)
|
||||
for tax in computed_taxes:
|
||||
tax_amount += tax['amount']
|
||||
tax_amount = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit, line.qty)['total_included']
|
||||
price = self.price_by_product(cr, uid, ids, line.order_id.pricelist_id.id, line.product_id.id, line.qty, line.order_id.partner_id.id)
|
||||
if line.discount!=0.0:
|
||||
res[line.id] = line.price_unit * line.qty * (1 - (line.discount or 0.0) / 100.0)
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
I create Sales Account.
|
||||
-
|
||||
!record {model: account.account, id: account_account_sales0}:
|
||||
code: S
|
||||
code: Sale
|
||||
company_id: base.main_company
|
||||
currency_mode: current
|
||||
name: Sales
|
||||
|
@ -473,4 +473,9 @@
|
|||
self.action_confirm(cr, uid, [ref("pos_confirm_0")], {"lang": "en_US", "active_model":
|
||||
"pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"),
|
||||
})
|
||||
|
||||
-
|
||||
I check order state is done.
|
||||
-
|
||||
!python {model: pos.order}: |
|
||||
order=self.browse(cr,uid,ref("pos_order_pos0"))
|
||||
assert(order.state=='done'), "Order is not done"
|
||||
|
|
Loading…
Reference in New Issue