I understand, but to create a new custom module to just add that one parameter seems a lot of work and was just thinking about it. It’s almost impossible to put this into the trytond.conf because you can have multiple shops.
When you look at the variables, you can see a pattern like <key>="<value>". What about doing that also in the module? Replacing all the woocommerce fields in the shop class with a text field and on each line you enter the key=value. The property then splits those based on the newline character, maybe add some checking if the key is allowed etc. With this, you are giving the user great flexibility but also the responsibility to add the right data correctly.
This may work but for us normally it’s easier to extend the code on a third party module instead of having configuration on the database because it may allow to hide the api internals to the end users.
This at least made the “import orders” feature work; “import products” still does not.
Now, I receive orders as “posted” ones. In my case, this is not the ideal solution. My customers often purchase one service from the web shop, but when I receive their items, I see that they did not choose the appropriate service, and have to change or enhance their order.
Therefore: Is it possible to introduce an option where I can choose:
plugin provides
This may be the case often. But I think not always. A customer
may ring me up of mail me after a purchase that he forgot something,
… or accidentally ordered too much or wrong
I notice that one of the items ran out of stock and I will not sell them any longer
There are so many cases of error, misunderstanding or whatever… I again would vote of an option to receive a “draft” status - which I can finish then. Legally, this always should be allright if both parties agree.
If that’s difficult to implement, only import parties from woocommerce would be a usable compromise.
With the “sale_amendment” module, I get an error when I try to change an article:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 110, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 47, in rpc
return methods.get(request.rpc_method, _dispatch)(
File "/trytond/wsgi.py", line 77, 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 186, in _dispatch
result = rpc.result(meth(inst, *c_args, **c_kwargs))
File "/trytond/model/fields/field.py", line 116, in wrapper
return func(self, *args, **kwargs)
File "/trytond/modules/sale_amendment/sale.py", line 409, in on_change_with_product_uom_category
return self.line.product_uom_category.id
AttributeError: 'NoneType' ob
NB: The “download products” still does not work in my setup.
The method “Update WooCommerce Products” works fine, i can push my products from tryton to woocommerce - including stock, SKU, name. But the method “Download WooCommerce Orders” seems to have no effect. I get no error, but it also won’t download the orders. I manualy checked the API response and it’s fine. SKUs also seem to be identical (Although the difference between, and the naming of, “code” and “SKU” in Tryton is not clear to me)
What could i do next in order to identify whats going wrong?
Edit: Is it possible to execute “Download WooCommerce Orders” with trytond in a terminal, to get additional infos?
Yes, i have a few orders with woocommerce status “completed”, “processing” and “cancelled”.
Hmm…? Where am i supposed to see the downloaded orders in tryton, under Sales > Sales?
What i did inside tryton is roughly the following: I set up one party and one product. I used Inventories to stock up the warehouse with the product. I created a webshop and asigned it to the party, the warehouse and the product. Now i can push the stock amount, price etc. from tryton to woocommerce but i don’t see the downloaded orders.
Only on-hold orders are downloaded and then it’s status is update to processing on Woocomerce.
Then when the goods are sent the order is marked as Completed on WooCommerce.
I’ve updated the module documentation to explain how the module works. I hope this makes it easier for others to properly understand the behaviour of the module. Let me know if there is something else that need to be clarified.
Sorry, still I’m not happy with an invoice I cannot change.
We’re on holidays. Orders came in, but we’re not working. So invoice date would be in the last year, although actual shipping happens next week, nearly mid of January. Not nice.
Customer purchased wrong shipment method - I cannot change that without hassle.
Sorry having to insist - but still it does not work for me this way.
In the meanwhile, I understood that products to be synced need to be added under [menu] > sales > settings > webshops - articles
Actually, these are synced now.
I could not find how to achieve it the other way - download from woocommerce to tryton.
I do not know why you are having issues with invoices as the connector does anything with them.
For me the current workflow is correct. The connector downloads the sales order with the date of the customer order and leaves it as processing. Then invoice is created depending following your default invoice method but is always created in the draft state so you can adjust the invoice date to the previous fiscalyear if required.
Uuuuuuuh. I need to dress in sackcloth and ashes (hope this saying is correct in English)
And - especially for @pokoli - with your “¡”: ¡Mea Culpa!
You’re completely right - it was me to mess up the “order form” and the “invoice”. Obviously, they are not the same thing - but not obvious enough for my stupid mind.
Please accept my sincere apologies - I should have thought a little more about that!
Remains one thing: How do I mark items in woocommerce to be downloaded to tryton?
Once I know that, I’ll try to get a little more familiar with the module and then try to write a little HOWTO.
Once added to a woocommerce web_shop they are uploaded to woocommerce.
Once there is a sale in woocommerce is downloaded in tryton
If you have an existing woocommerce website with products that you want to manage from tryton you should import them in tryton and set the proper woo_commerce_id on the tryton models so the system will correctly link them and do not create duplicate products on the next sync.
pokoli
(Sergi Almacellas Abellana)
Split this topic
43
in Tryton I have a product with variants and attributes.
When uploading this product to WooCommerce, each of the product variant is uploaded as an independent product in woocommerce.
Is there a way to to upload a Tryton-product with variants and attributes, for example, as variable WooCommerce product with its corresponding variants and attributes?