File: template_jo_standard.py

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (44 lines) | stat: -rw-r--r-- 2,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from odoo.addons.account.models.chart_template import template


class AccountChartTemplate(models.AbstractModel):
    _inherit = 'account.chart.template'

    @template('jo_standard')
    def _get_jo_standard_template_data(self):
        return {
            'property_account_receivable_id': 'jo_account_100201',
            'property_account_payable_id': 'jo_account_200101',
            'property_account_expense_categ_id': 'jo_account_500101',
            'property_account_income_categ_id': 'jo_account_400101',
            'property_account_expense_id': 'jo_account_500101',
            'property_account_income_id': 'jo_account_400101',
            'property_stock_valuation_account_id': 'jo_account_100502',
            'property_stock_account_input_categ_id': 'jo_account_100503',
            'property_stock_account_output_categ_id': 'jo_account_100504',
            'property_stock_account_production_cost_id': 'jo_account_100505',
            'code_digits': '6',
        }

    @template('jo_standard', 'res.company')
    def _get_jo_standard_res_company(self):
        return {
            self.env.company.id: {
                'account_fiscal_country_id': 'base.jo',
                'bank_account_code_prefix': '1000',
                'cash_account_code_prefix': '1009',
                'transfer_account_code_prefix': '1001',
                'account_default_pos_receivable_account_id': 'jo_account_100202',
                'income_currency_exchange_account_id': 'jo_account_400301',
                'expense_currency_exchange_account_id': 'jo_account_500903',
                'account_journal_suspense_account_id': 'jo_account_100102',
                'account_journal_early_pay_discount_loss_account_id': 'jo_account_501107',
                'account_journal_early_pay_discount_gain_account_id': 'jo_account_400304',
                'default_cash_difference_income_account_id': 'jo_account_400302',
                'default_cash_difference_expense_account_id': 'jo_account_500909',
                'deferred_expense_account_id': 'jo_account_100416',
                'deferred_revenue_account_id': 'jo_account_200401',
            },
        }