Skip to content

Commit

Permalink
[IMP] logistics_planning_sale: adds domain account_analytic in existi…
Browse files Browse the repository at this point in the history
…ng account move
  • Loading branch information
ChristianSantamaria committed Dec 9, 2024
1 parent 7a79bcc commit 7e4d271
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion logistics_planning_sale/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
''',
'author': 'Solvos',
'license': 'LGPL-3',
'version': '13.0.1.7.0',
'version': '13.0.1.8.0',
'category': 'stock',
'website': 'https://github.com/solvosci/slv-stock',
"depends": [
Expand Down
1 change: 1 addition & 0 deletions logistics_planning_sale/wizards/__init__.py
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
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

0 comments on commit 7e4d271

Please sign in to comment.