Преглед на файлове

[FIX] force customer creation

robert преди 6 години
родител
ревизия
a67c2a2e31
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      controllers/res_partner.py

+ 1 - 1
controllers/res_partner.py

@@ -27,7 +27,7 @@ def get_customers(image_type='small'):
     Create and get customer
 '''
 def create_customer(values):
-    customer = request.env[_MODEL].create({
+    customer = request.env[_MODEL].sudo().create({
         'name': values.get('name'),
         'ruc': values.get('ruc'),
         'mobile': values.get('mobile'),