|
@@ -34,6 +34,15 @@ class WorkOrder(models.Model):
|
|
|
comodel_name='res.partner',
|
|
|
string='Partner'
|
|
|
)
|
|
|
+ file_import = fields.Binary(string='Archivo Adjunto')
|
|
|
+ filename=fields.Char(string='Nombre de Archivo')
|
|
|
+
|
|
|
+ file_import_a = fields.Binary(string='Archivo Adjunto')
|
|
|
+ filename_a=fields.Char(string='Nombre de Archivo')
|
|
|
+
|
|
|
+ file_import_b = fields.Binary(string='Archivo Adjunto')
|
|
|
+ filename_b=fields.Char(string='Nombre de Archivo')
|
|
|
+
|
|
|
line_ids = fields.One2many(
|
|
|
comodel_name='repair.workorder.line',
|
|
|
inverse_name='workorder_id',
|
|
@@ -54,6 +63,9 @@ class WorkOrder(models.Model):
|
|
|
planned_end_date = fields.Datetime(
|
|
|
string='Planned end date'
|
|
|
)
|
|
|
+ next_action_date = fields.Date(
|
|
|
+ string='Fecha Próx. Acción'
|
|
|
+ )
|
|
|
diagnostic = fields.Text(
|
|
|
string='Diagnostic'
|
|
|
)
|
|
@@ -78,7 +90,7 @@ class WorkOrder(models.Model):
|
|
|
invoice_ids = fields.One2many('account.invoice', 'work_invoice_id')
|
|
|
invoice_count = fields.Integer(
|
|
|
string='Facturas',
|
|
|
- compute='_get_invoice_count',
|
|
|
+ compute='_get_invoice_count',
|
|
|
)
|
|
|
|
|
|
@api.multi
|
|
@@ -102,7 +114,7 @@ class WorkOrder(models.Model):
|
|
|
|
|
|
@api.one
|
|
|
def button_in_progress(self):
|
|
|
- self.state = 'in_progress'
|
|
|
+ self.state = 'in_progress'
|
|
|
|
|
|
@api.one
|
|
|
def button_in_progress_back(self):
|
|
@@ -141,7 +153,7 @@ class WorkOrder(models.Model):
|
|
|
'account_id': customer.property_account_receivable.id,
|
|
|
'partner_id': customer.id,
|
|
|
'origin': self.name,
|
|
|
- 'work_invoice_id': self.id
|
|
|
+ 'work_invoice_id': self.id
|
|
|
}
|
|
|
inv_id = inv_obj.create(inv_data)
|
|
|
for records in self.consumed_ids:
|
|
@@ -263,4 +275,4 @@ class WorkOrderConsumed(models.Model):
|
|
|
class AccountInvoice(models.Model):
|
|
|
_inherit = 'account.invoice'
|
|
|
|
|
|
- work_invoice_id = fields.Many2one('repair.workorder')
|
|
|
+ work_invoice_id = fields.Many2one('repair.workorder')
|