mirror of
https://github.com/bringout/oca-financial.git
synced 2026-04-22 04:22:07 +02:00
Initial commit: OCA Financial packages (186 packages)
This commit is contained in:
commit
3e0e8473fb
8757 changed files with 947473 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
from . import account_analytic_line
|
||||
from . import account_move_line
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# Copyright 2015 Tecnativa - Pedro M. Baeza
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountAnalyticLine(models.Model):
|
||||
_inherit = "account.analytic.line"
|
||||
|
||||
other_partner_id = fields.Many2one(
|
||||
comodel_name="res.partner",
|
||||
string="Other Partner",
|
||||
domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]",
|
||||
)
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2015 Tecnativa - Pedro M. Baeza
|
||||
# Copyright 2017 Tecnativa - Luis Martínez
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = "account.move.line"
|
||||
|
||||
def _prepare_analytic_distribution_line(
|
||||
self, distribution, account_id, distribution_on_each_plan
|
||||
):
|
||||
vals = super()._prepare_analytic_distribution_line(
|
||||
distribution, account_id, distribution_on_each_plan
|
||||
)
|
||||
vals["other_partner_id"] = self.move_id.partner_id.commercial_partner_id.id
|
||||
return vals
|
||||
Loading…
Add table
Add a link
Reference in a new issue