Tuesday, April 2, 2019

I continued to work for Lino Presto.

Where to configure the default duration to be used when an event doesn’t contain an end_time?

Invoice generators have a new attribute default_invoiceable_qty whose default value is 1 (as it was until now, but now we can change the hard-coded default value per application).

New field lino_xl.lib.cal.EventType.default_duration per calendar entry type. If a calendar entry has a type (event_type) and if that type has a default duration, Lino will change the end_time of an entry when the start_date is changed (and the start_time when the end_date)

The lino_xl.lib.products plugin adds one menu entry per product type. Until now it used the label of the lino_xl.lib.products.ProductType.table_name, now it uses the lino_xl.lib.products.ProductType.text. The difference appears if you have several product types which use a same table.

Added demo data.

The (description) of an order item is now a single-line CharField (not a multi-line RichTextField)

I am having a problem because start_time is a TimeField while default_duration a DurationField. Errors like:

  • Conversion from datetime.time to Decimal is not supported

  • TypeError: conversion from NotImplementedType to Decimal is not supported

  • TypeError: unsupported operand type(s) for +: ‘datetime.time’ and ‘datetime.time’

Continued tomorrow.