File: entry_position.py

package info (click to toggle)
tryton-client 7.0.27-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,476 kB
  • sloc: python: 27,180; sh: 37; makefile: 18
file content (9 lines) | stat: -rw-r--r-- 281 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
# This file is part of Tryton.  The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.


def reset_position(entry):
    if entry.get_alignment() <= 0.5:
        entry.set_position(0)
    else:
        entry.set_position(-1)