On Thursday, 15 June 2017 01:03:31 UTC-6, Sergi Almacellas Abellana wrote:
>
> El 14/06/17 a les 23:24, Mark Shane Hayden ha escrit:
> >
> >
> > On Jun 14, 2017 14:45, "Cédric Krier" <[email protected] <javascript:>
> > <mailto:[email protected] <javascript:>>> wrote:
> >
> > On 2017-06-14 13:13, Mark Shane Hayden wrote:
> > > I have upgraded the development environment for a flask web app
> > from 4.2 to
> > > 4.4 After completing the upgrade the list prices of products are
> all
> > > returning None in the web application. However the Tryton GTK
> > client shows
> > > all the correct prices.
> > >
> > > I know that list_price was migrated over to a MultiValue field
> > type and
> > > things on the server side seem to be OK. Are there changes on
> > the flask
> > > end of things that would have to be changes as well? What would
> > cause
> > > these fields to always return None awhen the old property fields
> > worked
> > > fine?
> >
> > Probably the context is not correct.
> >
> > Is there something specific that is not correct? I believe we do set
> > the company, and the old property field seemed to work with the same
> > context. Can't think of what would be different...
> Which company do you have in the context?
>
> In the flask application I have the following:
@tryton.default_context
def default_context():
context = {}
context['company'] = app.config.get('TRYTON_COMPANY')
return context
And in the config file TRYTON_COMPANY = 1
It is the only company defined in this system, and the multivalues all
reference company ID of 1.
It doesn't seem that the company value is being set in the context as
expected otherwise product.list_price would not return None?
> --
> Sergi Almacellas Abellana
> www.koolpi.com
> Twitter: @pokoli_srk
>
--
You received this message because you are subscribed to the Google Groups
"tryton" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton/7cb3ca2f-8a5f-4932-b397-fb3df1b5b7d8%40googlegroups.com.