Add factor on number fields

review824002
This commit is contained in:
Cédric Krier
2013-06-26 22:59:28 +02:00
parent e14c671c4d
commit 3549a83bfc
6 changed files with 25 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add factor on number fields
* Add calendar view
* Remove request
+12
View File
@@ -133,6 +133,14 @@ List of attributes shared by many form elements:
:class:`trytond.model.fields.One2Many` to specifiy if the client must
auto-complete the field. The default value is True.
.. _common-attributes-factor:
* ``factor``: A factor to apply on fields
:class:`trytond.model.fields.Integer`,
:class:`trytond.model.fields.Float` and
:class:`trytond.model.fields.Numeric` to display on the widget. The
default value is 1.
form
^^^^
@@ -235,6 +243,8 @@ Display a field of the object with the value of the current record.
* ``completion``: see in common-attributes-completion_.
* ``factor``: see in common-attributes-factor_.
image
^^^^^
@@ -491,6 +501,8 @@ field
* ``completion``: see in common-attributes-completion_.
* ``factor``: see in common-attributes-factor_.
prefix or suffix
^^^^^^^^^^^^^^^^
+1
View File
@@ -104,6 +104,7 @@ attlist.field &= [a:defaultValue = "0"] attribute pre_validate { "0" | "1" }?
attlist.field &= attribute icon { text }?
attlist.field &= [a:defaultValue = "1"] attribute completion { "0" | "1" }?
attlist.field &= attribute string { text }?
attlist.field &= [a:defaultValue = "1"] attribute factor { text }?
image = element image { attlist.image, empty }
attlist.image &= attribute name { text }
attlist.image &= [ a:defaultValue = "1" ] attribute colspan { text }?
+5
View File
@@ -379,6 +379,11 @@
<attribute name="string"/>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute name="factor" a:defaultValue="1"/>
</optional>
</define>
<define name="image">
<element name="image">
<ref name="attlist.image"/>
+1
View File
@@ -52,6 +52,7 @@ attlist.field &=
attlist.field &= attribute float_time { text }?
attlist.field &= [a:defaultValue = "0"] attribute pre_validate { "0" | "1" }?
attlist.field &= [a:defaultValue = "1"] attribute completion { "0" | "1" }?
attlist.field &= [a:defaultValue = "1"] attribute factor { text }?
prefix = element prefix { attlist.affix, empty }
suffix = element suffix { attlist.affix, empty }
attlist.affix &= attribute string { text }?
+5
View File
@@ -172,6 +172,11 @@
</attribute>
</optional>
</define>
<define name="attlist.field" combine="interleave">
<optional>
<attribute name="factor" a:defaultValue="1"/>
</optional>
</define>
<define name="prefix">
<element name="prefix">
<ref name="attlist.affix"/>