Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Tryton Tryton
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 713
    • Issues 713
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 72
    • Merge requests 72
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TrytonTryton
  • TrytonTryton
  • Issues
  • #11999
Closed
Open
Issue created Jan 12, 2023 by Adrià Tarroja Caubet@acaubetDeveloper

Crash on PBL with no date

With pytz installed on the env, open the PBL of a product, remove the date and after refresh, the following is raised:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 119, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 46, in rpc
    return methods.get(request.rpc_method, _dispatch)(
  File "/trytond/wsgi.py", line 86, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 161, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 181, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/model/modelsql.py", line 932, in read
    getter_results = field.get(
  File "/trytond/model/fields/function.py", line 26, in wrapper
    return func(self, *args, **kwargs)
  File "/trytond/model/fields/function.py", line 137, in get
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 137, in <genexpr>
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 130, in call
    return method(records, name)
  File "/trytond/modules/stock/location.py", line 495, in get_cost_value
    cost_price = get_record().cost_price
  File "/trytond/model/fields/function.py", line 161, in __get__
    return super().__get__(inst, cls)
  File "/trytond/model/fields/field.py", line 365, in __get__
    return inst.__getattr__(self.name)
  File "/trytond/model/modelstorage.py", line 1764, in __getattr__
    read_data = self.read(list(index.keys()), list(ffields.keys()))
  File "/trytond/model/modelsql.py", line 932, in read
    getter_results = field.get(
  File "/trytond/model/fields/function.py", line 26, in wrapper
    return func(self, *args, **kwargs)
  File "/trytond/model/fields/function.py", line 137, in get
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 137, in <genexpr>
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 132, in call
    return dict((r.id, method(r, name)) for r in records)
  File "/trytond/model/fields/function.py", line 132, in <genexpr>
    return dict((r.id, method(r, name)) for r in records)
  File "/trytond/modules/product/product.py", line 191, in get_cost_price
    return product.cost_price
  File "/trytond/model/fields/function.py", line 161, in __get__
    return super().__get__(inst, cls)
  File "/trytond/model/fields/field.py", line 365, in __get__
    return inst.__getattr__(self.name)
  File "/trytond/model/modelstorage.py", line 1764, in __getattr__
    read_data = self.read(list(index.keys()), list(ffields.keys()))
  File "/trytond/model/modelsql.py", line 932, in read
    getter_results = field.get(
  File "/trytond/model/fields/function.py", line 26, in wrapper
    return func(self, *args, **kwargs)
  File "/trytond/model/fields/function.py", line 137, in get
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 137, in <genexpr>
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 132, in call
    return dict((r.id, method(r, name)) for r in records)
  File "/trytond/model/fields/function.py", line 132, in <genexpr>
    return dict((r.id, method(r, name)) for r in records)
  File "/trytond/model/multivalue.py", line 65, in _multivalue_getter
    value = self.get_multivalue(name)
  File "/trytond/modules/product_kit/product.py", line 71, in get_multivalue
    value = super().get_multivalue(name, **pattern)
  File "/trytond/modules/product_cost_history/product.py", line 50, in get_multivalue
    pytz.utc.localize(datetime, is_dst=None)
  File "/pytz/tzinfo.py", line 201, in fromutc
    return (dt + inf[0]).replace(tzinfo=self._tzinfos[inf])
OverflowError: date value out of range

Fault: date value out of range
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking