deisy 5 سال پیش
والد
کامیت
31cb01bb48
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      models/account_invoice.py
  2. 1 1
      models/purchase_order.py

+ 1 - 1
models/account_invoice.py

@@ -15,6 +15,6 @@ class account_invoice(models.Model):
     @api.one
     @api.onchange('contado')
     def cambiar_estado_contado(self):
+        self.credito = not self.contado
         if self.contado == True:
-            self.credito = not self.contado
             self.payment_term = False

+ 1 - 1
models/purchase_order.py

@@ -21,8 +21,8 @@ class purchase_order(models.Model):
     @api.one
     @api.onchange('contado')
     def cambiar_estado_contado(self):
+        self.credito = not self.contado
         if self.contado == True:
-            self.credito = not self.contado
             self.payment_term = False
 
     def _convert_str_to_datetime(self, date):