Community mailing list archives


[v9] 'Create and Edit' product from purchase order strange behaviour

Brightwave LTD, Jesse Morgan
- 04/28/2017 23:41:41
Hi All,

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?