|
@@ -34,17 +34,17 @@ function report_works (reporting){
|
|
|
},
|
|
|
// Analisis Detallado
|
|
|
ckickAnalysisDetail: function(e, row, $element,field){
|
|
|
- if (field == 'number'){
|
|
|
+ if (field == 'customer'){
|
|
|
this.do_action({
|
|
|
name:"Registro del Cliente",
|
|
|
type: 'ir.actions.act_window',
|
|
|
res_model: "res.partner",
|
|
|
views: [[false,'form']],
|
|
|
target: 'new',
|
|
|
- domain: [['id','=', row.id]],
|
|
|
+ domain: [['id','=', row.customer_id]],
|
|
|
context: {},
|
|
|
flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
|
|
|
- res_id: row.id,
|
|
|
+ res_id: row.customer_id,
|
|
|
});
|
|
|
}
|
|
|
e.stopImmediatePropagation();
|
|
@@ -211,6 +211,7 @@ function report_works (reporting){
|
|
|
var state;
|
|
|
var data = [];
|
|
|
var car;
|
|
|
+ var agente;
|
|
|
_.each(CarCar, function(item){
|
|
|
task = self.getCarWorkShop(item.id);
|
|
|
car = self.getCarService(item.name[0])
|
|
@@ -234,13 +235,18 @@ function report_works (reporting){
|
|
|
state = 'No Facturado';
|
|
|
} else {
|
|
|
state = 'Facturado';
|
|
|
+ }
|
|
|
+ if (item.agent_id.length == undefined) {
|
|
|
+ agente = 'Particular';
|
|
|
+ }else{
|
|
|
+ agente = item.agent_id[1];
|
|
|
}
|
|
|
data.push({
|
|
|
id : item.id,
|
|
|
customer_id : item.partner_id[0],
|
|
|
customer : item.partner_id[1],
|
|
|
car : item.name[1],
|
|
|
- agent : self.valorNull(item.agent_id[1]),
|
|
|
+ agent : agente,
|
|
|
date_in : moment(item.date_in).format("DD/MM/YYYY"),
|
|
|
date : item.date_in,
|
|
|
secure_amount : accounting.formatNumber(secure_amount,0,".",","),
|