From 62636c80dcc2078eed18810e7958f41fd5b13fdc Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 19 Feb 2025 09:42:39 +0700 Subject: fix error --- indoteknik_custom/models/account_move_line.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/account_move_line.py b/indoteknik_custom/models/account_move_line.py index a4386157..6b394da3 100644 --- a/indoteknik_custom/models/account_move_line.py +++ b/indoteknik_custom/models/account_move_line.py @@ -21,4 +21,13 @@ class AccountMoveLine(models.Model): if account.account_id.code and account.account_id.code[0] in ['6', '7']: account.is_required = True else: - account.is_required = False \ No newline at end of file + account.is_required = False + + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + if 'move_id' in vals: + move = self.env['account.move'].browse(vals['move_id']) + if move.move_type == 'entry': + vals['name'] = move.ref + return super().create(vals_list) \ No newline at end of file -- cgit v1.2.3