[FIX] account_asset_management : empty message is posted if there are no asset
This commit is contained in:
parent
d57d0a48a1
commit
3945771c61
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Assets Management",
|
"name": "Assets Management",
|
||||||
"version": "13.0.1.3.0",
|
"version": "13.0.1.3.1",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"depends": ["account"],
|
"depends": ["account"],
|
||||||
"excludes": ["account_asset"],
|
"excludes": ["account_asset"],
|
||||||
|
@ -87,8 +87,9 @@ class AccountMove(models.Model):
|
|||||||
"asset_profile_id"
|
"asset_profile_id"
|
||||||
).asset_id.name_get()
|
).asset_id.name_get()
|
||||||
]
|
]
|
||||||
message = _("This invoice created the asset(s): %s") % ", ".join(refs)
|
if refs:
|
||||||
move.message_post(body=message)
|
message = _("This invoice created the asset(s): %s") % ", ".join(refs)
|
||||||
|
move.message_post(body=message)
|
||||||
|
|
||||||
def button_draft(self):
|
def button_draft(self):
|
||||||
invoices = self.filtered(lambda r: not r.is_sale_document())
|
invoices = self.filtered(lambda r: not r.is_sale_document())
|
||||||
|
Loading…
Reference in New Issue
Block a user