-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] logistics_planning_sale: adds domain account_analytic in existi…
…ng account move
- Loading branch information
1 parent
7a79bcc
commit 7e4d271
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from . import logistics_schedule_sale_add_wizard | ||
from . import logistics_schedule_existing_account_move_wizard |
14 changes: 14 additions & 0 deletions
14
logistics_planning_sale/wizards/logistics_schedule_existing_account_move_wizard.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# © 2024 Solvos Consultoría Informática (<http://www.solvos.es>) | ||
# License LGPL-3 - See https://www.gnu.org/licenses/lgpl-3.0.html | ||
|
||
from odoo import models | ||
|
||
|
||
class LogisticsScheduleExistingAccountMove(models.TransientModel): | ||
_inherit = 'logistics.schedule.existing.account.move.wizard' | ||
|
||
def _prepare_domain_invoice_line_id(self): | ||
res = super(LogisticsScheduleExistingAccountMove, self)._prepare_domain_invoice_line_id() | ||
if self.logistics_schedule_id.sale_order_line_id: | ||
res += [('analytic_account_id', '=', self.logistics_schedule_id.sale_order_id.analytic_account_id.id)] | ||
return res |