~openerp/openobject-client/4.2

« back to all changes in this revision

Viewing changes to bin/widget/model/field.py

  • Committer: Jay(Open ERP)
  • Date: 2009-04-17 07:37:43 UTC
  • Revision ID: jvo@tinyerp.com-20090417073743-xnyby598d2nwvb37
[FIX] Onchange on floatfield wasn't taking minor decimal point change

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
        def set_client(self, model, value, test_state=True, force_change=False):
148
148
                internal = model.value[self.name]
149
149
                self.set(model, value, test_state)
150
 
                if abs(float(internal or 0.0) - float(model.value[self.name] or 0.0)) >= (10.0**(-int(self.attrs.get('digits', (12,4))[1]))):
 
150
                if abs(float(internal or 0.0) - float(model.value[self.name] or 0.0)) >= (10.0**(-1-int(self.attrs.get('digits', (12,4))[1]))):
151
151
                        if not self.get_state_attrs(model).get('readonly', False):
152
152
                                model.modified = True
153
153
                                model.modified_fields.setdefault(self.name)