NoneType error if recurrence rule is bogus
When running a subscription, I get the follwoing error:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 111, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 48, in rpc
request, database_name, *request.rpc_params)
File "/trytond/wsgi.py", line 78, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 131, 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/modelview.py", line 740, in wrapper
return func(cls, records, *args, **kwargs)
File "/trytond/model/workflow.py", line 37, in wrapper
result = func(cls, filtered, *args, **kwargs)
File "/trytond/modules/company/model.py", line 67, in wrapper
result = func(cls, records, *args, **kwargs)
File "/trytond/modules/sale_subscription/subscription.py", line 320, in run
subscription.compute_next_invoice_date())
File "/trytond/modules/sale_subscription/subscription.py", line 270, in compute_next_invoice_date
return next_date.date()
AttributeError: 'NoneType' object has no attribute 'date'
Fault: 'NoneType' object has no attribute 'date'
How to reproduce
-
Fresh database
-
Only sale_subscriptions (and dependencies) installed and activated
-
Configure company
-
Define a product (Service)
-
Define a subscribtion service based on service "twice a year": monthly, interval: 6, per month: 4,10
-
Define a subscribtion recurance weekly, intervall 1
-
Create a subscription
- any Party
- start day: today
- reccurring invoice: "twice a year"
- Currency: fill one
- Other Information: Set Company
- Add subscription line
- subscribtion service created above
→ Quote → Run →→ Errror