2
0

[FIX] account_asset_management: Fix tests

This commit is contained in:
Ernesto Tejeda 2020-04-06 13:19:40 -04:00 committed by Rodrigo
parent 20078b4472
commit 5117722b06
2 changed files with 6 additions and 3 deletions

View File

@ -4,7 +4,7 @@
{
"name": "Assets Management",
"version": "13.0.1.0.1",
"version": "13.0.1.0.2",
"license": "AGPL-3",
"depends": ["account"],
"excludes": ["account_asset"],

View File

@ -445,8 +445,11 @@ class TestAssetManagement(SavepointCase):
self.assertTrue(len(invoice.invoice_line_ids) > 0)
line = invoice.invoice_line_ids[0]
self.assertTrue(line.price_unit > 0.0)
line.quantity = 2
line.asset_profile_id = asset_profile
move_form = Form(invoice)
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()
# I get all asset after invoice validation
current_asset = self.env["account.asset"].search([])