c043025e5d765a8ca49d88b7cbff37ecff8657bc
`event_sale` adds an onchange on the `product_id` of the sale order lines, which returns values for the fields `event_type_id` & `event_ok`, which are used for an attrs domain on the fields `event_id` & `event_ticket_id` in the sale order line form (dialog). `event_type_id` & `event_ok` are related to `product.product` fields, in addition. Changing the partner of the sale order triggers the onchange on the lines, which triggers the onchange of the `product_id`. As these two fields `event_type_id` & `event_ok` were not in the sale order lines tree view, as readonly, they were passed to the write operation when saving the SO, therefore writing on the product (the same value than before, in addition). Indeed, if an onchange returns values for fields that are reandonly in the view, these are ignored when saving/writing. However, if the onchange returns values for fields that are not in the view, these values are nevertheless passed to the write operation, even if there was actually no change. This behavior should probably change, that if an onchange returns values for fields that are not in the view, these are ignored, either when saving the record, either when returning the result of the onchange. Either way, these are risky changes, that we prefer to avoid in a stable release such as 9.0. As a workaround, we therefore add these fields in the sale order line tree view, as readonly, so they are properly ignored when saving the record. This is important to avoid this write on `product.product`, as users can have the write access to the `sale.order` without having access to the `product.product` (e.g. `Sales > See own leads` group) opw-660716
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
If you are a developer you may type the following command at your terminal:
wget -O- https://raw.githubusercontent.com/odoo/odoo/9.0/odoo.py | python
Then follow the developer tutorials
For Odoo employees
To add the odoo-dev remote use this command:
$ ./odoo.py setup_git_dev
To fetch odoo merge pull requests refs use this command:
$ ./odoo.py setup_git_review
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%