I am trying to make it flexible…
Well, I declared a field:
sales_y_t_y_graph = fields.Function(fields.Binary('Sales M-t-M vs previous year', readonly=True, filename='filename_field'),'get_y_t_y_sales_graph')
def get_y_t_y_sales_graph(self, name):
# Build a grpah for Year to Year compare
self.filename_field = f'{self.sales_this_m.name}.png'
return self.draw_year_graph(db_fieled_name='sales_this_m', title='Sales M-t-M vs previous year')
self.draw_year_graph()
— returns binary data with an image based on various DB fields
When the user presses the “Save button”, Tryton still shows weird suggestion:
If this field “a system only use” or I do something wrong with the naming?
Constantine.