Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generar modificació contractual - Falla al default_get #100

Open
mguellsegarra opened this issue Aug 26, 2021 · 1 comment
Open

Generar modificació contractual - Falla al default_get #100

mguellsegarra opened this issue Aug 26, 2021 · 1 comment

Comments

@mguellsegarra
Copy link
Collaborator

mguellsegarra commented Aug 26, 2021

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
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant