Issue 10186

Title
Creating Supplier Invoice from Purchase Line
Priority
bug
Status
chatting
Nosy list
Marc, pokoli
Assigned to
Keywords

Created on 2021-03-12.10:58:34 by Marc, last changed 1 month ago by Marc.

Files

File name Uploaded Type Details
PO.jpg Marc, 2021-03-12.12:13:32 image/jpeg view
Material.docx Marc, 2021-03-12.11:48:29 application/vnd.openxmlformats-officedocument.wordprocessingml.document view

Messages

Author: [hidden] (Marc)
Date: 2021-03-12.12:39:01

"The problem may be related that you selected "Purchase Line" as origin but did not set any value for it."

Correct !

Sequence on selection screen is :

1- Select Origin : Purchase Line
2- Select Product
3- Crash

Author: [hidden] (Marc)
Date: 2021-03-12.12:08:15

Note : I can also dump database tables if so required

Traceback (most recent call last):
File "/usr/local/lib/python37/dist-packages/trytond/model/modelpy", line 282, in __getattr__
return self_values[name]
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python37/dist-packages/trytond/wsgipy", line 116, in dispatch_request
return endpoint(request, *requestview_args)
File "/usr/local/lib/python37/dist-packages/trytond/protocols/dispatcherpy", line 48, in rpc
request, database_name, *requestrpc_params)
File "/usr/local/lib/python37/dist-packages/trytond/wsgipy", line 83, in auth_required
return wrapped(
args, *kwargs)
File "/usr/local/lib/python37/dist-packages/trytond/protocols/wrapperspy", line 131, in wrapper
return func(request, pool, *args, *
kwargs)
File "/usr/local/lib/python37/dist-packages/trytond/protocols/dispatcherpy", line 186, in _dispatch
result = rpcresult(meth(inst, c_args, *c_kwargs))
File "/usr/local/lib/python37/dist-packages/trytond/model/modelviewpy", line 88, in wrapper
result = func(self, args, *kwargs)
File "/usr/local/lib/python37/dist-packages/trytond/model/fields/fieldpy", line 118, in wrapper
return func(self, args, *kwargs)
File "/usr/local/lib/python37/dist-packages/trytond/modules/commission/invoicepy", line 181, in on_change_product
super(InvoiceLine, self)on_change_product()
File "/usr/local/lib/python37/dist-packages/trytond/model/fields/fieldpy", line 118, in wrapper
return func(self, args, *kwargs)
File "/usr/local/lib/python37/dist-packages/trytond/modules/account_asset/invoicepy", line 44, in on_change_product
super(InvoiceLine, self)on_change_product()
File "/usr/local/lib/python37/dist-packages/trytond/model/fields/fieldpy", line 118, in wrapper
return func(self, args, *kwargs)
File "/usr/local/lib/python37/dist-packages/trytond/modules/account_invoice/invoicepy", line 2025, in on_change_product
pattern = self_get_tax_rule_pattern()
File "/usr/local/lib/python37/dist-packages/trytond/model/fields/fieldpy", line 118, in wrapper
return func(self, args, *kwargs)
File "/usr/local/lib/python37/dist-packages/trytond/modules/account_tax_rule_country/accountpy", line 124, in _get_tax_rule_pattern
invoice_address = selforiginpurchaseinvoice_address
File "/usr/local/lib/python37/dist-packages/trytond/model/modelstoragepy", line 1414, in __getattr__
return super(ModelStorage, self)__getattr__(name)
File "/usr/local/lib/python37/dist-packages/trytond/model/modelpy", line 285, in __getattr__
% (self__name__, name, self_values))
AttributeError: 'purchaseline' Model has no attribute 'purchase': None

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-03-12.11:53:16

The problem may be related that you selected "Purchase Line" as origin but did not set any value for it.

Could you copy-paste the text of the expection here instead of using an image. It's easier for us to understand it.
From the screenshots and the docker pull date it seems you are using 5.8 series

Author: [hidden] (Marc)
Date: 2021-03-12.11:48:29

Hi Sergi,

Context :
I am creating a Purchase Order
This PO creates Invoice Lines
I want to create a Invoice from the Invoice Lines (assuming this is the correct way to do it)
I select ORIGIN in detail of Invoice then click (+) to add a line
I obtain a display to enter my line where I select "Purchase Line" as Origin (probably my mistake)
Crash


I am not sure where I can find the Tryton version number
docker pull tryton/tryton around 2021-03-08


Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-03-12.11:02:11

Hi Marc,

Thanks for reporting the issue, could you please share more details about it. I'm specially interested in:

  1. Which tryton version are you using?
  2. What type of crash do you have? If you have a traceback it will be great to include it here.
  3. The steps to reproduce your issue on a fresh database. Could you please share a list of steps so I can test your scenario and provide a fix if necessary.

Without any of this information we can not do anything to fix your issue. Thanks for the comprension.

Author: [hidden] (Marc)
Date: 2021-03-12.10:58:34

Most probably a newbie scenario error

History
Date User Action Args
2021-03-12 12:39:01Marcsetmessages: + msg65446
2021-03-12 12:13:32Marcsetfiles: + PO.jpg
2021-03-12 12:08:15Marcsetmessages: + msg65439
2021-03-12 11:53:16pokolisetcomponent: + purchase
messages: + msg65438
status: need-eg -> chatting
2021-03-12 11:48:29Marcsetfiles: + Material.docx
messages: + msg65437
2021-03-12 11:02:11pokolisetmessages: + msg65433
nosy: + pokoli
status: unread -> need-eg
2021-03-12 10:58:34Marccreate

Showing 10 items. Show all history (warning: this could be VERY long)