You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the latest pip version within a Django 2.2 project (Python 3.6.9).
I could succesfully create customers, providers, product-codes through the API.
I'm trying to create invoices through the API directly (without using plans, because my current use case is a one time invoice for a one time payment for a one time service, even though i plan to use all the features offered by Silver in the future).
Everything works fine (all fields are fed correctly, invoice is created)... except product_code which is null.
I created a product_code entry with a value (let's say value = "test-product" and it's the 1st product-code with a url like ".../product-codes/1/")
I also tried the value alone:
"product-code": "test-product"
and I even tried the key alone:
"product-code": 1 (or "1")
but nothing works for me, I end up with "product-code": null and I have to add the right product-code FK manually in the admin to have a complete invoice.
Is there a way to inject this data through the API?
Thank you for your outstanding work and for sharing it as free and open source software! :-)
jérôme
The text was updated successfully, but these errors were encountered:
jeromecc
changed the title
product_plan not taken up by API when creating invoice
product_code not taken up by API when creating invoice
Dec 13, 2019
I've identified the origin of this change to be 5 years old: 4c4ab85, but I can't tell if there was any reasoning behind it. If I were to guess I would say not...
Anyway, I don't see any reason why this field can't be made writable.
Hi!
I'm using the latest pip version within a Django 2.2 project (Python 3.6.9).
I could succesfully create customers, providers, product-codes through the API.
I'm trying to create invoices through the API directly (without using plans, because my current use case is a one time invoice for a one time payment for a one time service, even though i plan to use all the features offered by Silver in the future).
The dict in my Python code looks like this.
Everything works fine (all fields are fed correctly, invoice is created)... except product_code which is null.
I created a product_code entry with a value (let's say value = "test-product" and it's the 1st product-code with a url like ".../product-codes/1/")
I tried feeding an url to the api:
"product-code": "http://example.com/product-codes/1/"
I tried feeding it url + value
product-code: {"url": "http://example.com/product-codes/1/", "value": "test-product"}
I also tried the value alone:
"product-code": "test-product"
and I even tried the key alone:
"product-code": 1 (or "1")
but nothing works for me, I end up with "product-code": null and I have to add the right product-code FK manually in the admin to have a complete invoice.
Is there a way to inject this data through the API?
Thank you for your outstanding work and for sharing it as free and open source software! :-)
jérôme
The text was updated successfully, but these errors were encountered: