在xml中的float字段上设置数字

Zec*_*eck 3 python openerp

我需要在xml的float字段上设置数字。在python中,我们可以像这样设置数字

'data': fields.float('Data', digits=(16,4))
Run Code Online (Sandbox Code Playgroud)

如何在openerp 6的xml中的float字段上设置数字?

小智 5

从OpenERP XML文件:

<group colspan="2" col="2" groups="base.group_extended">
                            <separator string="Weights" colspan="2"/>
                            <field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
                            <field digits="(14, 3)" name="weight" attrs="{'readonly':[('type','=','service')]}"/>
                            <field digits="(14, 3)" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
                        </group>
Run Code Online (Sandbox Code Playgroud)

希望对您有帮助!