我总共有 3 部字典,我想在最后一本字典中全部合并

问题描述

Odoo Server Error
Traceback (most recent call last):
  File "/home/sss1/workspace/odoo_14.0_ent/odoo/addons/web/controllers/main.py",line 2094,in report_download
    response = self.report_routes(reportname,converter=converter,context=context,**data)
  File "/home/sss1/workspace/odoo_14.0_ent/odoo/http.py",line 530,in response_wrap
    response = f(*args,**kw)
  File "/home/sss1/workspace/odoo_14.0_ent/odoo/addons/web/controllers/main.py",line 2022,in report_routes
    pdf = report.with_context(context)._render_qweb_pdf(docids,data=data)[0]
  File "/home/sss1/workspace/odoo_14.0_ent/odoo/addons/base/models/ir_actions_report.py",line 767,in _render_qweb_pdf
    html = self_sudo.with_context(context)._render_qweb_html(res_ids,line 806,in _render_qweb_html
    data = self._get_rendering_context(docids,data)
  File "/home/sss1/workspace/odoo_14.0_ent/odoo/addons/base/models/ir_actions_report.py",line 826,in _get_rendering_context
    data.update(report_model._get_report_values(docids,data=data))
  File "/home/sss1/workspace/custom_addons_v14/report_stock_inventory/reports/stock_report_pdf.py",line 61,in _get_report_values
    'description': lot_id.note,File "/home/sss1/workspace/odoo_14.0_ent/odoo/models.py",line 5624,in __setitem__
    return self._fields[key].__set__(self,value)<br/>
Bold: **double asterisks** TypeError: unhashable type: 'dict'
    for sm_rec in sm_recs:
        dict_data = {}
        if sm_rec.origin and sm_rec.origin[0:2] == 'P0':
            sum_qty = 0
            lot_data = {}
            for lot_id in sm_rec.lot_ids:
                sum_qty += lot_id.product_qty
                lot_id[lot_data] = {
                    'vehicle_name': lot_id.product_id.name,'unit': sm_rec.sale_line_id.product_uom.name,'so_no': sm_rec.origin,'description': lot_id.note,}

                products = {}
                for lot_product in lot_id.product_details:
                    products[lot_product] = {
                        'engine_number': lot_product.engine_number,'vin': lot_product.vin,'model': lot_product.model,'coi': lot_product.coi,'year': lot_product.year,'ec': lot_product.ec,'ic': lot_product.ic,}
            dict_data[sm_rec] = {
                'wh_name': sm_rec.warehouse_id.parent.name,'sub_wh_name': sm_rec.warehouse_id.name,'lot': sum_qty,}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...