| 1 |
|
| 2 |
from odoo import models, Command |
| 3 |
from odoo.addons.account.models.chart_template import template |
| 4 |
|
| 5 |
|
| 6 |
class AccountChartTemplate(models.AbstractModel): |
| 7 |
_inherit = 'account.chart.template' |
| 8 |
|
| 9 |
@template('de_skr03') |
| 10 |
def _get_de_skr03_template_data(self): |
| 11 |
return { |
| 12 |
'code_digits': '4', |
| 13 |
'property_account_receivable_id': 'account_1410', |
| 14 |
'property_account_payable_id': 'account_1610', |
| 15 |
'property_stock_valuation_account_id': 'account_3960', |
| 16 |
'name': 'German Chart of Accounts SKR03', |
| 17 |
} |
| 18 |
|
| 19 |
@template('de_skr03', 'res.company') |
| 20 |
def _get_de_skr03_res_company(self): |
| 21 |
return { |
| 22 |
self.env.company.id: { |
| 23 |
'account_fiscal_country_id': 'base.de', |
| 24 |
'bank_account_code_prefix': '120', |
| 25 |
'cash_account_code_prefix': '100', |
| 26 |
'transfer_account_code_prefix': '1360', |
| 27 |
'account_default_pos_receivable_account_id': 'account_1411', |
| 28 |
'income_currency_exchange_account_id': 'account_2660', |
| 29 |
'expense_currency_exchange_account_id': 'account_2150', |
| 30 |
'account_journal_early_pay_discount_loss_account_id': 'account_2130', |
| 31 |
'account_journal_early_pay_discount_gain_account_id': 'account_2670', |
| 32 |
'account_sale_tax_id': 'tax_ust_19_skr03', |
| 33 |
'account_purchase_tax_id': 'tax_vst_19_skr03', |
| 34 |
'expense_account_id': 'account_3400', |
| 35 |
'income_account_id': 'account_8400', |
| 36 |
'account_stock_journal_id': 'inventory_valuation', |
| 37 |
'account_stock_valuation_id': 'account_7200', |
| 38 |
}, |
| 39 |
} |
| 40 |
|
| 41 |
@template('de_skr03', 'account.reconcile.model') |
| 42 |
def _get_de_skr03_reconcile_model(self): |
| 43 |
return { |
| 44 |
'reconcile_3731': { |
| 45 |
'name': 'Discount-EK-7%', |
| 46 |
'line_ids': [ |
| 47 |
Command.create({ |
| 48 |
'account_id': 'account_3731', |
| 49 |
'amount_type': 'percentage', |
| 50 |
'tax_ids': [ |
| 51 |
Command.set([ |
| 52 |
'tax_vst_7_skr03', |
| 53 |
]), |
| 54 |
], |
| 55 |
'amount_string': '100', |
| 56 |
'label': 'Discount-EK-7%', |
| 57 |
}), |
| 58 |
], |
| 59 |
}, |
| 60 |
'reconcile_3736': { |
| 61 |
'name': 'Discount-EK-19%', |
| 62 |
'line_ids': [ |
| 63 |
Command.create({ |
| 64 |
'account_id': 'account_3736', |
| 65 |
'amount_type': 'percentage', |
| 66 |
'tax_ids': [ |
| 67 |
Command.set([ |
| 68 |
'tax_vst_19_skr03', |
| 69 |
]), |
| 70 |
], |
| 71 |
'amount_string': '100', |
| 72 |
'label': 'Discount-EK-19%', |
| 73 |
}), |
| 74 |
], |
| 75 |
}, |
| 76 |
'reconcile_8731': { |
| 77 |
'name': 'Discount-VK-7%', |
| 78 |
'line_ids': [ |
| 79 |
Command.create({ |
| 80 |
'account_id': 'account_8731', |
| 81 |
'amount_type': 'percentage', |
| 82 |
'tax_ids': [ |
| 83 |
Command.set([ |
| 84 |
'tax_ust_7_skr03', |
| 85 |
]), |
| 86 |
], |
| 87 |
'amount_string': '100', |
| 88 |
'label': 'Discount-VK-7%', |
| 89 |
}), |
| 90 |
], |
| 91 |
}, |
| 92 |
'reconcile_8736': { |
| 93 |
'name': 'Discount-VK-19%', |
| 94 |
'line_ids': [ |
| 95 |
Command.create({ |
| 96 |
'account_id': 'account_8736', |
| 97 |
'amount_type': 'percentage', |
| 98 |
'tax_ids': [ |
| 99 |
Command.set([ |
| 100 |
'tax_ust_19_skr03', |
| 101 |
]), |
| 102 |
], |
| 103 |
'amount_string': '100', |
| 104 |
'label': 'Discount-VK-19%', |
| 105 |
}), |
| 106 |
], |
| 107 |
}, |
| 108 |
'reconcile_2401': { |
| 109 |
'name': 'Loss of receivables-7%', |
| 110 |
'line_ids': [ |
| 111 |
Command.create({ |
| 112 |
'account_id': 'account_2401', |
| 113 |
'amount_type': 'percentage', |
| 114 |
'tax_ids': [ |
| 115 |
Command.set([ |
| 116 |
'tax_ust_7_skr03', |
| 117 |
]), |
| 118 |
], |
| 119 |
'amount_string': '100', |
| 120 |
'label': 'Loss of receivables-7%', |
| 121 |
}), |
| 122 |
], |
| 123 |
}, |
| 124 |
'reconcile_2406': { |
| 125 |
'name': 'Loss of receivables-19%', |
| 126 |
'line_ids': [ |
| 127 |
Command.create({ |
| 128 |
'account_id': 'account_2406', |
| 129 |
'amount_type': 'percentage', |
| 130 |
'tax_ids': [ |
| 131 |
Command.set([ |
| 132 |
'tax_ust_19_skr03', |
| 133 |
]), |
| 134 |
], |
| 135 |
'amount_string': '100', |
| 136 |
'label': 'Loss of receivables-19%', |
| 137 |
}), |
| 138 |
], |
| 139 |
}, |
| 140 |
} |
| 141 |
|
| 142 |
@template('de_skr03', 'account.account') |
| 143 |
def _get_de_skr03_account_account(self): |
| 144 |
return { |
| 145 |
'account_7200': { |
| 146 |
'account_stock_expense_id': 'account_3000', |
| 147 |
'account_stock_variation_id': 'account_3955', |
| 148 |
}, |
| 149 |
} |