Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] account: default account #31373

Closed
wants to merge 1 commit into
base: 10.0
from

Conversation

Projects
None yet
2 participants
@nim-odoo
Copy link
Contributor

nim-odoo commented Feb 22, 2019

When importing an invoice without specifying the type, the invoice type
is set to out_invoice, but the account set is the supplier account.

At this point, the invoice type is simply undefined (False). It will
be set by default at creation to out_invoice. Therefore, we reach the
else condition which uses the supplier info.

We simply inverse the condition, so it creates a consistent object.
However, it raises a bigger question about how the action context should
be kept at invoice. We won't address it :-)

opw-1925547

closes #30154

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

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

[FIX] account: default account
When importing an invoice without specifying the type, the invoice type
is set to `out_invoice`, but the account set is the supplier account.

At this point, the invoice type is simply undefined (`False`). It will
be set by default at creation to `out_invoice`. Therefore, we reach the
`else` condition which uses the supplier info.

We simply inverse the condition, so it creates a consistent object.
However, it raises a bigger question about how the action context should
be kept at invoice. We won't address it :-)

opw-1925547

closes #30154

@nim-odoo nim-odoo self-assigned this Feb 22, 2019

@nim-odoo nim-odoo added the OE label Feb 22, 2019

@nim-odoo

This comment has been minimized.

Copy link
Contributor Author

nim-odoo commented Feb 26, 2019

robodoo r+

@robodoo robodoo added the r+ 👌 label Feb 26, 2019

robodoo pushed a commit that referenced this pull request Feb 26, 2019

[FIX] account: default account
When importing an invoice without specifying the type, the invoice type
is set to `out_invoice`, but the account set is the supplier account.

At this point, the invoice type is simply undefined (`False`). It will
be set by default at creation to `out_invoice`. Therefore, we reach the
`else` condition which uses the supplier info.

We simply inverse the condition, so it creates a consistent object.
However, it raises a bigger question about how the action context should
be kept at invoice. We won't address it :-)

opw-1925547

closes #30154

closes #31373
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 26, 2019

Staging failed: ci/runbot on 7700acffdd105e29fb16ef362f156068b9b06ab2 (view more at http://runbot.odoo.com/runbot/build/469280)

@nim-odoo

This comment has been minimized.

Copy link
Contributor Author

nim-odoo commented Feb 26, 2019

robodoo retry

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 26, 2019

Merged, thanks!

@robodoo robodoo closed this Feb 26, 2019

@nim-odoo nim-odoo deleted the odoo-dev:10.0-opw-1925547-default_inv-nim branch Feb 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.