Initial commit: Accounting packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:47 +02:00
commit 4ef34c2317
2661 changed files with 1709616 additions and 0 deletions

View file

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
from odoo import fields, models
class AccountAnalyticDistributionModel(models.Model):
_inherit = 'account.analytic.distribution.model'
account_prefix = fields.Char(
string='Accounts Prefix',
help="Prefix that defines which accounts from the financial accounting this model should apply on.",
)
product_id = fields.Many2one(
'product.product',
string='Product',
ondelete='cascade',
help="Select a product for which the analytic distribution will be used (e.g. create new customer invoice or Sales order if we select this product, it will automatically take this as an analytic account)",
)
product_categ_id = fields.Many2one(
'product.category',
string='Product Category',
ondelete='cascade',
help="Select a product category which will use analytic account specified in analytic default (e.g. create new customer invoice or Sales order if we select this product, it will automatically take this as an analytic account)",
)
def _create_domain(self, fname, value):
if not fname == 'account_prefix':
return super()._create_domain(fname, value)