[FIX] account: default group_id
- 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/odoo#46795 X-original-commit: 6cdbc8c43afb560ee4fa1c9486aba0d919b8ed51 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -4028,6 +4028,7 @@ class AccountMoveLine(models.Model):
|
||||
'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,
|
||||
|
||||
Reference in New Issue
Block a user