gisce / react-ooui

Transform ooui objects into react components
MIT License
4 stars 0 forks source link

Generar modificació contractual - Falla al default_get #100

Open mguellsegarra opened 3 years ago

mguellsegarra commented 3 years ago

Al intentar fer una modificació contractual des de la modal de Generar Casos Gestió ATR, pel contracte 00001, obtinc un error al fer el default_get, que no veig perquè pot passar:

[
   "execute",
   "ovlab",
   "token",
   "eyJhbGciOiJIU.....",
   "giscedata.switching.mod.con.wizard",
   "default_get",
   [
      "activacio_cicle",
      "autoconsum",
      "bank",
      "change_adm",
      "change_atr",
      "change_retail_tariff",
      "check_introduir_lectures",
      "cnae",
      "comments",
      "con_name",
      "con_sur1",
      "con_sur2",
      "con_type",
      "contact",
      "contract",
      "cups",
      "data_accio",
      "delivery_type",
      "digital_sign",
      "direccio_notificacio",
      "direccio_pagament",
      "doc_add",
      "docs_ids",
      "dt_add",
      "dt_cie_codigo",
      "dt_cie_electronico",
      "dt_cie_papel_data_caducitat",
      "dt_cie_papel_data_emissio",
      "dt_cie_papel_potenciainstbt",
      "dt_cie_papel_tensio_suministre",
      "dt_cie_papel_tipus_suministre",
      "dt_cie_sello_elec",
      "dt_codi_instalador",
      "dt_tipus_codi_instalador",
      "email",
      "generate_new_contract",
      "info",
      "measure_ae_p1",
      "measure_ae_p2",
      "measure_ae_p3",
      "measure_ae_p4",
      "measure_ae_p5",
      "measure_ae_p6",
      "measure_date",
      "measure_ep_p1",
      "measure_ep_p2",
      "measure_ep_p3",
      "measure_ep_p4",
      "measure_ep_p5",
      "measure_ep_p6",
      "measure_pm_p1",
      "measure_pm_p2",
      "measure_pm_p3",
      "measure_pm_p4",
      "measure_pm_p5",
      "measure_pm_p6",
      "measure_r1_p1",
      "measure_r1_p2",
      "measure_r1_p3",
      "measure_r1_p4",
      "measure_r1_p5",
      "measure_r1_p6",
      "mod_autoconsum",
      "mode_facturacio",
      "new_contract",
      "num_periods",
      "owner",
      "owner_change_type",
      "owner_pre",
      "pagador",
      "payment_mode_id",
      "phone_num",
      "phone_pre",
      "power_invoicing",
      "power_p1",
      "power_p2",
      "power_p3",
      "power_p4",
      "power_p5",
      "power_p6",
      "proces",
      "retail_tariff",
      "send_ae_measures",
      "send_ep_measures",
      "send_pm_measures",
      "send_r1_measures",
      "skip_validations",
      "solicitud_tensio",
      "state",
      "tariff",
      "tipo_pago",
      "vat",
      "vat_kind"
   ],
   {
      "proces":"M1",
      "allow_multipol":false,
      "active_id":19,
      "active_ids":[
         19
      ],
      "polissa_id":19,
      "default_cups_id":18
   }
]

Em retorna l'error:

{"exception":"Wrong ID for the browse record, got False, expected an integer.","traceback":"Traceback (most recent call last):\n  File \"/home/erp/src/erp/server/bin/netsvc.py\", line 361, in dispatch\n    result = LocalService(service_name)(method, *params)\n  File \"/home/erp/src/erp/server/bin/netsvc.py\", line 100, in __call__\n    res = getattr(self, method)(*params)\n  File \"/home/erp/src/erp/server/bin/service/web_services.py\", line 614, in execute\n    res = service.execute(db, uid, object, method, *args)\n  File \"/home/erp/src/erp/server/bin/osv/osv.py\", line 61, in wrapper\n    return f(self, dbname, *args, **kwargs)\n  File \"/home/erp/src/erp/server/bin/osv/osv.py\", line 132, in execute\n    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)\n  File \"/home/erp/src/erp/server/bin/osv/osv.py\", line 123, in execute_cr\n    return getattr(object, method)(cr, uid, *args, **kw)\n  File \"/home/erp/src/erp/server/bin/addons/giscedata_switching/wizard/giscedata_switching_mod_con_wizard.py\", line 942, in default_get\n    cursor, uid, fields, context=context\n  File \"/home/erp/src/erp/server/bin/osv/orm.py\", line 1876, in default_get\n    value[f] = self._defaults[f](self, cr, uid, context)\n  File \"/home/erp/src/erp/server/bin/addons/giscedata_switching/wizard/giscedata_switching_mod_con_wizard.py\", line 1099, in _get_default_retail_tariff\n    contract = pol_obj.browse(cursor, uid, pol_id, context=context)\n  File \"/home/erp/src/erp/server/bin/addons/giscedata_polissa/giscedata_polissa.py\", line 530, in browse\n    res = super(GiscedataPolissa, self).browse(cursor, uid, ids, context)\n  File \"/home/erp/src/erp/server/bin/osv/orm.py\", line 583, in browse\n    return browse_record(cr, uid, select, self, cache, context=context, list_class=self._list_class, fields_process=fields_process)\n  File \"/home/erp/src/erp/server/bin/osv/orm.py\", line 198, in __init__\n    raise BrowseRecordError(_('Wrong ID for the browse record, got %r, expected an integer.') % (id,))\nBrowseRecordError: Wrong ID for the browse record, got False, expected an integer.\n"}
mguellsegarra commented 3 years ago

Ho mirem quan tornis de vacances si et sembla ;) @ecarreras