Hi, Yannick, thanks for the contribution. Some remarks:
- Please respect PEP8.
- Use orm.Model instead of osv.osv.
- Do you need all imports in base_partner_customer_fiability.py?
- Put relative imports in __init__.py.
From functional point of view:
- Why do you need a res.partner.customer.fiability model? Isn't better to have a calculated field that makes the average from invoices delays?
- I'm also worried by the overall performance of the system, due to payment_delay is not stored and general fiability of the customer changes with each paid invoice and the way you make it. You can improving calling methods with packed ids, using read for reading only one data, and so on.
Changing approach, I would put a cron job that updates once a day all the data, storing them. This only means a no real-time update, but with little differences.
Hi, Yannick, thanks for the contribution. Some remarks:
- Please respect PEP8. customer_ fiability. py?
- Use orm.Model instead of osv.osv.
- Do you need all imports in base_partner_
- Put relative imports in __init__.py.
From functional point of view: customer. fiability model? Isn't better to have a calculated field that makes the average from invoices delays?
- Why do you need a res.partner.
- I'm also worried by the overall performance of the system, due to payment_delay is not stored and general fiability of the customer changes with each paid invoice and the way you make it. You can improving calling methods with packed ids, using read for reading only one data, and so on.
Changing approach, I would put a cron job that updates once a day all the data, storing them. This only means a no real-time update, but with little differences.
Regards.