Skip to content
Snippets Groups Projects
Commit b5902c3f authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] sale: allow invoice creation from public user

- Activate automatic invoicing after successful payment
- Go to the eCommerce with the public user
- Purchase an item

An error occurs because a `list` has no attribute `id`.

The root cause is the following line:

https://github.com/odoo/odoo/commit/3abe78087a0426ad2783942baa01e1d5fbdff2d9#diff-39d0613187d36f16c541734e80925e9dR556



We want to allow the following scenarios:
- a saleman generates an invoice for its customer but doesn't have
  accounting rights
  => check on `sale.order`
- an accountant generates an invoice from a SO he can read but not
  modify
  => check on `account.move`
- an invoice is generated from a purchase on the ecommerce
  => use of `sudo` in calling methods

opw-2185680

closes odoo/odoo#44400

X-original-commit: 9ef6282f
Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: default avataralt-odoo <alt@odoo.com>
Co-authored-by: default avatarThibault Francois <tfr@openerp.com>
parent 83f28112
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment