Vauxoo / addons-vauxoo

All our modules related to developments that solves generic issues on Odoo, or that solve internal problems on Odoo Core, if something is here, maybe it is solving an issue in your company, try it and report what you see.
http://www.vauxoo.com
193 stars 288 forks source link

[FIX] partner_credit_limit: Add hook to initialize credit limit #1401

Closed luisg123v closed 4 years ago

luisg123v commented 4 years ago

Starting from 1e18a7457, the partner's credit limit field is company-dependent, so their values need to be set manually, because they are properties instead of a standard field.

A migration script was provided on the aforementioned commit to set that value when the module is already installed. However, since that field is a native one, values need to be set also when the module is installed.

This commit fixes the above by implementing a post-init hook to set required values.

luisg123v commented 4 years ago

@moylop260 could you merge, please?

This is a cherry pick of 9f3863c9ec5ed834c1172f81fa61e86b2a4cc874

moylop260 commented 4 years ago

Foward-port from https://github.com/Vauxoo/addons-vauxoo/pull/1395