in the following code amount is assigned to price_unit,
invoice_line_id = self.env['account.move.line'].create({ 'name':std_fee_id.fee_item_id.name, 'move_id': invoice_rec.id, 'product_id': product_id.related_product.id, #'fiscalyear_month_id': std_fee_id.fiscalyear_month_id.id, 'price_unit': float(std_fee_id.amount), 'account_id': product_id.property_account_income_id.id, })
hi Niyas Raphy,
after adding that code now it gives me this user error:
User Error
Cannot create unbalanced journal entry. Ids: [59] Differences debit - credit: [-1500.0]
pass this in context: with_context(check_move_validity=False)