[FIX] account_asset_management: Fix tests
This commit is contained in:
parent
20078b4472
commit
5117722b06
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Assets Management",
|
"name": "Assets Management",
|
||||||
"version": "13.0.1.0.1",
|
"version": "13.0.1.0.2",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"depends": ["account"],
|
"depends": ["account"],
|
||||||
"excludes": ["account_asset"],
|
"excludes": ["account_asset"],
|
||||||
|
@ -445,8 +445,11 @@ class TestAssetManagement(SavepointCase):
|
|||||||
self.assertTrue(len(invoice.invoice_line_ids) > 0)
|
self.assertTrue(len(invoice.invoice_line_ids) > 0)
|
||||||
line = invoice.invoice_line_ids[0]
|
line = invoice.invoice_line_ids[0]
|
||||||
self.assertTrue(line.price_unit > 0.0)
|
self.assertTrue(line.price_unit > 0.0)
|
||||||
line.quantity = 2
|
move_form = Form(invoice)
|
||||||
line.asset_profile_id = asset_profile
|
with move_form.invoice_line_ids.edit(0) as line_form:
|
||||||
|
line_form.quantity = 2
|
||||||
|
line_form.asset_profile_id = asset_profile
|
||||||
|
invoice = move_form.save()
|
||||||
invoice.post()
|
invoice.post()
|
||||||
# I get all asset after invoice validation
|
# I get all asset after invoice validation
|
||||||
current_asset = self.env["account.asset"].search([])
|
current_asset = self.env["account.asset"].search([])
|
||||||
|
Loading…
Reference in New Issue
Block a user