Skip to content

Commit

Permalink
[FIX] account: default group_id
Browse files Browse the repository at this point in the history
- Set a product category to automated
- Create an Analytic Default for a product with the automated category
- Create an SO with said product.
- Confirm SO and try to validate the delivery order

Get an error (Model Analytic Line (account.analytic.line), Restriction: account_analytic_line_group_id_fkey)

opw-2204771

closes odoo#46763

Signed-off-by: Nicolas Martinelli (nim) <[email protected]>
  • Loading branch information
nim-odoo committed Mar 3, 2020
1 parent 3e4172b commit 6cdbc8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -3876,6 +3876,7 @@ def _prepare_analytic_line(self):
'name': default_name,
'date': move_line.date,
'account_id': move_line.analytic_account_id.id,
'group_id': move_line.analytic_account_id.group_id.id,
'tag_ids': [(6, 0, move_line._get_analytic_tag_ids())],
'unit_amount': move_line.quantity,
'product_id': move_line.product_id and move_line.product_id.id or False,
Expand Down

0 comments on commit 6cdbc8c

Please sign in to comment.