Browse Source

Módulo para la carga de orden de servicio, tipo obra.

SEBAS 1 year ago
parent
commit
486c57abb9
2 changed files with 7 additions and 7 deletions
  1. 7 7
      models/orden_servicio.py
  2. BIN
      models/orden_servicio.pyc

+ 7 - 7
models/orden_servicio.py

@@ -162,10 +162,10 @@ class OrdenServicio(models.Model):
         for record in self:
             record.total_fabrica = sum(record.recepcion_ids.mapped('subtotal'))
 
-    @api.depends('total_producto', 'total_insumo', 'total_logistica', 'total_devolucion', 'total_fabrica')
+    @api.depends('total_producto', 'total_insumo', 'total_logistica')
     def _compute_total_obra(self):
         for record in self:
-            record.total_obra = record.total_producto + record.total_insumo + record.total_logistica + record.total_devolucion + record.total_fabrica
+            record.total_obra = record.total_producto + record.total_insumo + record.total_logistica 
 
     total_producto = fields.Float(compute='_compute_total_producto', string='Total Producto', store=True)
     total_insumo = fields.Float(compute='_compute_total_insumo', string='Total Insumo', store=True)
@@ -262,7 +262,7 @@ class ProductoServicio(models.Model):
 
             # @ TODO impuestos??
             # Obtener el precio del producto a partir de la tarifa del cliente
-            self.price_unit = self.product_id.list_price
+            self.price_unit = self.product_id.standard_price
 
 class ServicioInsumo(models.Model):
     _name = 'servicio.insumo'
@@ -303,7 +303,7 @@ class ServicioInsumo(models.Model):
     def onchange_product_id(self):
         if self.product_id:
             self.description = self.product_id.name
-            self.price_unit = self.product_id.list_price
+            self.price_unit = self.product_id.standard_price
 
 class ServicioLogistica(models.Model):
     _name = 'servicio.logistica'
@@ -345,7 +345,7 @@ class ServicioLogistica(models.Model):
     def onchange_product_id(self):
         if self.product_id:
             self.description = self.product_id.name
-            self.price_unit = self.product_id.list_price
+            self.price_unit = self.product_id.standard_price
 
 
 class DevolucionInsumo(models.Model):
@@ -386,7 +386,7 @@ class DevolucionInsumo(models.Model):
     def onchange_product_id(self):
         if self.product_id:
             self.description = self.product_id.name
-            self.price_unit = self.product_id.list_price
+            self.price_unit = self.product_id.standard_price
 
 
 class RecepcionFabrica(models.Model):
@@ -436,7 +436,7 @@ class RecepcionFabrica(models.Model):
     def onchange_product_id(self):
         if self.product_id:
             self.description = self.product_id.name
-            self.price_unit = self.product_id.list_price
+            self.price_unit = self.product_id.standard_price
 
 class AccountInvoice(models.Model):
     _inherit = 'account.invoice'

BIN
models/orden_servicio.pyc