首页 > 其他分享 >odoo关于 xml <template>标签 的继承修改方法

odoo关于 xml <template>标签 的继承修改方法

时间:2023-05-24 13:45:43浏览次数:34  
标签:xml 自定义 继承 视图 template odoo id

写法同之前的视图继承比较相似,话不多说,直接上案例

  • 比如我需在在下列报表添加barcode或者其他字段

 

  • 第一步先找到当前的视图位置,具体查找方法以后再讲。
  • 最后找到视图

 

  • 这里面的id还有这个xml文件所在的包会在后面用到

以上信息确认完毕之后,就可以直接写继承了

  • 自定义一个模块,自定义一个xml文件,然后在该模块的__manifest__.py文件你定义的xml文件

 

 

继承代码如下

 

 

 

  • id随意,inhert_id为你需要继承的模板所在的,包名 + 要继承template的id。

标签:xml,自定义,继承,视图,template,odoo,id
From: https://www.cnblogs.com/pythonClub/p/17428054.html

相关文章

  • 让java目录能导出.xml配置文件
    在maven中配置<!--插件配置--><build><resources><resource><directory>src/main/java</directory><!--包含了src/main/java目录下的所有xml资源配置文件--><includes......
  • XML解析之DOM解析
    XML解析之DOM解析XML结构是一种树型结构,处理步骤都差不多,Java己经将它们封装成了现成的类库。目前流行的解析方法有三种,分别为DOM、SAX和DOM4j。本文将讲解DOM解析。DOM(DocumentObjectModel,文档对象模型)是W3C组织推荐的处理XML的一种方式。它是一种基于对象的API,......
  • go检测状态 template
    typesystemStatusstruct{NamestringStatusstring}typeInitSystemStatusstruct{ErrorstringServiceList[]systemStatus}func(n*InitSystemChecker)Output(status*InitSystemStatus)error{tpl,isOk,err:=template.TryParse(`System......
  • 编写javaweb用到的基本依赖,mybatis-config.xml代码,SqlSessionFactoryUtils.java
    这篇文章仅仅作为记录,供以后复制粘贴使用pom.xml<dependencies><!--Servlet--><dependency><groupId>javax.servlet</groupId><artifactId>javax.servlet-api</artifactId><version>3.1.0</vers......
  • template
    templatedemos(......
  • resttemplate封装类方便调用
    1publicclassRnrFpRestTemplateUtils{23privatestaticfinalLoggerLOGGER=LoggerFactory.getLogger(RnrFpRestTemplateUtils.class);456/**7*Description:post请求Response泛型8*<br/>9*CreateDate......
  • odoo 后台传递信息给前台
     defset_values(self):super(ResConfigSettings,self).set_values()self.env['ir.config_parameter'].sudo().set_param('invoicefilepath',self.invoicefilepath)print(dir(exceptions))raiseexceptions.warnings("错误,地址无权限.......
  • python解析XML
    xml简介XML全称ExtensibleMarkupLanguage,中文译为可扩展标记语言。XML之前有两个先行者:SGML和HTML,率先登场的是SGML,尽管它功能强大,但文档结构复杂,既不容易学也不易于使用,因此几个主要的浏览器厂商均拒绝支持SGML,这些因素限制了SGML在网上的传播性;1989年HTML登场,它继......
  • odoo后台调用路由接口
    fromodoo.exceptionsimportUserErrorimportrequestsfromodoo.httpimportrequestdefaction_commit_approval(self,action_type='commit_approval'):"""action_type:commit_approval/cancel_approval......
  • web.xml
    1<?xmlversion="1.0"encoding="UTF-8"?>2<web-appxmlns="http://xmlns.jcp.org/xml/ns/javaee"3xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"4xsi:schemaLocation="http:/......