Vauxoo / odoo

Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
https://www.odoo.com
Other
9 stars 9 forks source link

[12.0] account: don't set a journal_id if it has one already #280

Closed umiphos closed 5 years ago

umiphos commented 5 years ago

Description of the issue/feature this PR addresses: If you have a journal linked to the account.payment for that view, then there is no need to change it.

Current behavior before PR: If you set the currency_id with a domain to update the view and that journal is set a currency_id already, it will set another journal as default in the view

Desired behavior after PR is merged: If there is a journal already linked to that view, it will leave it like it is, otherwise, it will set a journal from a search related to the currency_id you are setting.

-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

moylop260 commented 5 years ago

It is a matter of a custom module

luisg123v commented 5 years ago

@moylop260
Even though I would approach this differently, I think this is actually a bug. If there is already a journal selected, and that journal's currency matches the selected currency, the journal shouldn't be overwritten by this onchange.

What do you think?

CC @dsabrinarg

moylop260 commented 5 years ago

Superseeded by https://github.com/odoo/odoo/pull/30969