odoo 默認顯示字段
阿新 • • 發佈:2017-12-07
custom != line rate 字段 enter multi trade 商品
@api.multi def generate_customs_declaration(self): # if len(self.mapped(‘cus_goods_list_ids‘)) != 1: # raise UserError(_("有多個商品")) customs_order_info_dic = dict() for line in self: customs_order_info_dic.update({ ‘default_inout‘: line.inout, ‘default_customs_id‘: line.customs_id.id, ‘default_trade_mode_id‘: line.trade_mode_id.id, ‘default_CutMode_id‘: line.CutMode_id.id, ‘default_packing_id‘: line.packing_id.id, ‘default_trade_country_id‘: line.trade_country_id.id, ‘default_origin_arrival_country_id‘: line.origin_arrival_country_id.id, ‘default_port_id‘: line.port_id.id, ‘default_region_id‘: line.region_id.id, ‘default_qty‘: line.qty, ‘default_gross_weight‘: line.gross_weight, ‘default_net_weight‘: line.net_weight, ‘default_remarks‘: line.marks, }) # print(‘**************^^^^^^^^^^^&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&^^^^^^^^^^^^^^****************‘) for item in customs_order_info_dic.items(): print(item) return { ‘type‘: ‘ir.actions.act_window‘, ‘view_mode‘: ‘form‘, ‘res_model‘: ‘customs_center.customs_dec‘, ‘target‘: ‘current‘, ‘context‘: customs_order_info_dic, }
odoo 默認顯示字段