[FIX] hr_expense: fix 'hr.expense' has no attribute 'attach_document'​

In case hr_expense_extract is not installed and we click
'Attach Receipt' on hr_expense form view, we get a traceback.

task - 2870500

closes odoo/odoo#92761

X-original-commit: 8593decb2fe6820cfc6f043cb3458f43dd635c87
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
sofiagvaladze
2022-06-02 15:51:04 +02:00
parent 4f2894efbb
commit be3d76a95a
+3
View File
@@ -121,6 +121,9 @@ class HrExpense(models.Model):
sample = fields.Boolean()
label_convert_rate = fields.Char(compute='_compute_label_convert_rate')
def attach_document(self, **kwargs):
pass
@api.depends('product_has_cost')
def _compute_currency_id(self):
for expense in self.filtered("product_has_cost"):