Code review comment for lp:~yannick-buron/partner-contact-management/partner-contact-management

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

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.

Regards.

review: Needs Fixing (code review)

« Back to merge proposal