Community mailing list archives
Re: [v9] 'Create and Edit' product from purchase order strange behaviourby
When creating directly from a Purchase Order, you are creating a product.product:
Also at http://i.imgur.com/0jYTS3j.png
When creating products from the Products menus, you are creating a product.template
Also at http://i.imgur.com/f77jGbA.png
From: Jesse Morgan [mailto:email@example.com]
Sent: Friday, April 28, 2017 8:46 PM
To: Community <firstname.lastname@example.org>
Subject: [v9] 'Create and Edit' product from purchase order strange behaviour
I have a self-made module which sets some defaults on product.product.
It defaults the barcode field to 'AUTO', then in model.write it detects the word AUTO, and if found generates a new barcode from an ir.sequence.
This all works great when creating or editing a product directly from the products tree view.
However, when entering a product through a purchase order (using create and edit), my code doesn't appear to be called at all.
The default does not appear, and if I type it in manually, it is not translated into a barcode # - but written to the database vanilla.
This makes me feel like some code other than in the product.product model is running when using the create and edit function.
Has anyone else run into anything like this?
Brightwave LTD, Jesse Morgan