mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-26 18:12:02 +02:00
Initial commit: Sale packages
This commit is contained in:
commit
14e3d26998
6469 changed files with 2479670 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = 'account.move.line'
|
||||
|
||||
def _compute_analytic_distribution(self):
|
||||
# when a project creates an aml, it adds an analytic account to it. the following filter is to save this
|
||||
# analytic account from being overridden by analytic default rules and lack thereof
|
||||
project_amls = self.filtered(lambda aml: aml.analytic_distribution and any(aml.sale_line_ids.project_id))
|
||||
super(AccountMoveLine, self - project_amls)._compute_analytic_distribution()
|
||||
Loading…
Add table
Add a link
Reference in a new issue