Migration from 3.4 to 3.6


(Cédric Krier) #1

Must

  • [XML] Use width / height instead of img_width / img_height.

  • [PY] New API for on_change: the instance is modified instead of returning a dictionary.
    Example: http://hg.tryton.org/modules/party/rev/3be0dbb6bf94

  • [SQL]: Fix amount second currency with:

    UPDATE account_move_line SET amount_second_currency = (amount_second_currency * -1) WHERE amount_second_currency IS NOT NULL AND SIGN(amount_second_currency) != SIGN(debit - credit);

  • [PY]: Replace float_time widget by TimeDelta field.

  • [XML]: Use pyson for fields that were evaluated using safe_eval.
    Example: http://hg.tryton.org/modules/account/rev/d60176cc48a2

  • [XML]: There is no more a datetime widget for list/tree, two columns with one widget date and one widget time should be used instead.
    Example: http://hg.tryton.org/trytond/rev/4a2d1a76de52

  • [PY]: The API of the Report class has been reworked to improve the customization of the engine. The formatting methods are now more strict to prevent silent failure.

  • [PY] The methods available in the context of the report execution has been renamed:

  • setLang(language) -> set_lang(language)

  • formatLang(value, lang, date=True) -> format_date(value, lang)

  • formatLang(value, lang[, grouping=True], currency[, symbol=True]) -> format_currency(value, lang, currency[, symbol=True][, grouping=True])

  • formatLang(value, lang[, digits=2][, grouping=True][, monetary=False]) -> format_number(value, lang[, digits=2][, grouping=True][, monetary=None])

  • The datas dictionary has been renamed to data

  • The StringIO and time functions are not available anymore by default.

New