@api.model def fields_view_get(self, cr, uid, view_id=None, view_type='form', toolbar=False, submenu=False): print('修改文件') print('conaaa', self._context) # if context is None: # context = {} # print('con',context) res = super().fields_view_get() print('res',res) doc = etree.XML(res['arch']) print(doc) summary = doc.xpath("//field[@name='jg']") print(summary) if len(summary): jljd = summary[0] jljd.addnext(etree.Element('field', {'name': 'x_ysjlnc1', 'string': 'title of new field', 'nolabel': '0', })) # 要加入到视图里的page _moves_arch_lst = """ <page string='新增page'
odoo 动态改变显示内容
最新推荐文章于 2024-03-05 10:06:23 发布