Files
public/rsbu_payroll/models/hr_salary_rule.py

30 lines
1.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from odoo import fields, models
class HrSalaryRule(models.Model):
"""Правило расчёта зарплаты + счета РСБУ для проводки.
По образцу OCA `payroll_account`, но счета — из плана счетов РСБУ
(`rsbu.account`), а не из нативного `account.account`. Схема проводки
задаётся декларативно на каждом правиле: дебет/кредит.
"""
_inherit = 'hr.salary.rule'
rsbu_account_debit = fields.Many2one(
'rsbu.account',
string='РСБУ счёт (дебет)',
company_dependent=True,
domain="[('is_group', '=', False)]",
help='Счёт РСБУ по дебету для строки проводки этого правила.')
rsbu_account_credit = fields.Many2one(
'rsbu.account',
string='РСБУ счёт (кредит)',
company_dependent=True,
domain="[('is_group', '=', False)]",
help='Счёт РСБУ по кредиту для строки проводки этого правила.')
rsbu_subconto_employee = fields.Boolean(
string='Субконто «Сотрудник»',
default=True,
help='Проставлять сотрудника расчётного листка субконто в строках '
'проводки этого правила.')