Debian Codegraph @

addons/project_sale_expense/models/account_move_line.py

raw
1 # Part of Odoo. See LICENSE file for full copyright and licensing details.
2
3 from odoo import models
4
5
6 class AccountMoveLine(models.Model):
7 _inherit = 'account.move.line'
8
9 def _sale_determine_order(self):
10 """ For move lines created from expense, we override the normal behavior.
11 Note: if no SO but an AA is given on the expense, we will determine anyway the SO from its project's AAs linked,
12 using the same mecanism as in Vendor Bills.
13 """
14 mapping_from_project = self._get_so_mapping_from_project()
15 mapping_from_expense = self._get_so_mapping_from_expense()
16 mapping_from_project.update(mapping_from_expense)
17 return mapping_from_project