mirror of
https://github.com/bringout/oca-ocb-project.git
synced 2026-04-21 07:22:02 +02:00
Initial commit: Project packages
This commit is contained in:
commit
89613c97b0
753 changed files with 496325 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class PurchaseOrderLine(models.Model):
|
||||
_inherit = 'purchase.order.line'
|
||||
|
||||
def _compute_analytic_distribution(self):
|
||||
super()._compute_analytic_distribution()
|
||||
for line in self:
|
||||
if line._context.get('project_id'):
|
||||
line.analytic_distribution = {line.env['project.project'].browse(line._context['project_id']).analytic_account_id.id: 100}
|
||||
Loading…
Add table
Add a link
Reference in a new issue