Skip to content

Commit 6f9e402

Browse files
duongtqthienvh332
duongtq
authored andcommitted
[IMP] edi_sale_ubl_oca: add more decorator on create method
1 parent ba2ee03 commit 6f9e402

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

edi_sale_ubl_oca/models/sale_order.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import logging
66

7-
from odoo import models
7+
from odoo import api, models
88

99
_logger = logging.getLogger(__file__)
1010

@@ -72,13 +72,14 @@ def _edi_compare_orig_values(self, orig_vals):
7272
return False
7373
return True
7474

75-
def create(self, vals):
75+
@api.model_create_multi
76+
def create(self, vals_list):
7677
# Inject a key to check if we are in a SO create session
7778
# to not mess up w/ lines when not needed.
7879
# The key is removed right aftewards.
7980
return (
8081
super(SaleOrder, self.with_context(evt_from_create=self._name))
81-
.create(vals)
82+
.create(vals_list)
8283
.with_context(evt_from_create=None)
8384
)
8485

0 commit comments

Comments
 (0)