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账号

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

    OpenERP数量精度问题(Product BoM Structure)

    Odoo 新手求助
    4
    8
    6247
    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.
    • Joshua
      Joshua 管理员 last edited by

      关于在Openerp里面修改数量的精度,其中一个办法就是在view上面修改
      E.g:

      <field name="xtotvol" widget="float" digits="(8, 4)" />
      



      我修改了mrp.bom.form, mrp.bom.tree.却发现不能在 Product BoM Structure里面实现
      [attachimg=1]
      在bill of material 里面成功修改,但是在 Product BoM Structure不成功
      [attachimg=2]

      1 Reply Last reply Reply Quote 0
      • digitalsatori
        digitalsatori 管理员 last edited by

        在view上定义和在对象上定义意思是一样的。你可以在对象上定义这样就可以保证一致性。

        1 Reply Last reply Reply Quote 0
        • Joshua
          Joshua 管理员 last edited by

          谢谢校长,但是我在对象上定义了,Product BoM Structure仍然显示2位小数

          1 Reply Last reply Reply Quote 0
          • wjfonhand
            wjfonhand last edited by

            确实,view_mode是form的小数点位数可以改过来
                    view_mode是tree的还是16.2的格式,不知道是不是哪里有问题。

            1 Reply Last reply Reply Quote 0
            • mrshelly
              mrshelly last edited by

              安装哪个模块可以看到? 我觉得 应该是 tree 的 ir_ui_view 没有找到. 或者 更新 view xml 失败了.

              你直接去 ir_ui_view 数据表里去找到相关 xml 修改了, 应该是OK的.

              1 Reply Last reply Reply Quote 0
              • Joshua
                Joshua 管理员 last edited by

                @shelly 在mrp里面的,这里是mrp_view.xml关于这个的代码。我查看了数据库,mrp.bom.form, mrp.bom.tree是修改了。但是Product BoM Structure依然是没改变  ???

                 &lt;act_window<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id=&quot;action_product_bom_structure&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name=&quot;Product BoM Structure&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; domain=&quot;[(&#039;product_id&#039;, &#039;=&#039;, active_id),(&#039;bom_id&#039;,&#039;=&#039;,False)]&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; view_type=&quot;tree&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; view_id=&quot;mrp_bom_tree_view&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; res_model=&quot;mrp.bom&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src_model=&quot;product.product&quot;/&gt;
                
                1 Reply Last reply Reply Quote 0
                • Joshua
                  Joshua 管理员 last edited by

                  经过shelly测试,发现原来是我之前的字段属性错误了,但是这里OE里面应该有一个这样的bug。

                  这类 tree view 带 child_complete_ids 的, 很多不会受 xml 的影响. 需要修改对象的属性

                   &#039;product_qty&#039;: fields.float(&#039;Product Qty&#039;, required=True,digits=(8,4)),
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post