Navigation

    Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

    由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

    本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

    开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

    如果您登录系统碰到问题,请在微信公众号留言:

    Odoo9的视图继承时,不能使用string作为选择器了?

    Odoo 开发与实施交流
    3
    5
    3097
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dwz35296 last edited by

      今天测试9的时候,发现继承视图的时候,如果使用string属性作为选择器会出现错误:View inheritance may not use attribute 'string' as a selector.
      言下之意就是说,不能使用string作为选择器了!
      可是,原始视图中,有很多元素没有name属性的啊,怎么扩展啊?

      1 Reply Last reply Reply Quote 0
      • A
        awuyoulei last edited by

        可以通过".."返回到上级菜单。例如:<page string="test">
                                                                <group>
                                                                        <field name="name"/>
                                                                </group>
                                                          </page>
        如果可以你要在这个页的后面再加一个分页,可以先用<field name="name"/>进行定位,然后再使用..返回上级菜单即可。 <xpath expr="//field[@name="test"]/../.." position="after"> 就可以定位到页之后了。

        1 Reply Last reply Reply Quote 0
        • L
          lindyue last edited by

          遇上相同的问题了,我是想修改tree的create为false,到目前为止依然未成功,也采用了楼上的方式,依然不行啊。

          1 Reply Last reply Reply Quote 0
          • L
            lindyue last edited by

            汗,直接取消string的匹配,就这样,OK了。

            <br />&lt;xpath expr=&quot;//tree&quot; position=&quot;attributes&quot;&gt;<br />&nbsp; &nbsp;  &lt;attribute name=&quot;create&quot;&gt;0&lt;/attribute&gt;<br /> &lt;/xpath&gt;<br />
            



            然后,我用了下面这种方式,仍然可行,哎,看来自己刚开始是想多了。

            <br />&lt;tree position=&quot;attributes&quot;&gt;<br />&nbsp; &nbsp; &lt;attribute name=&quot;create&quot;&gt;0&lt;/attribute&gt;<br />&lt;/tree&gt;<br />
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post