# Path: l10n_de_tax_statement/models/l10n_de_tax_statement_2018.py
# def _base_display_2018():
#     return (
#         '20', '21', '22', '23', '24',
#         '26', '27', '28', '29', '30',
#         '32', '33', '34', '35', '36',
#         '38', '39', '40', '41', '42',
#         '48', '49', '50', '51', '52',
#     )
# 
# def _tax_display_2018():
#     return (
#         '26', '27', '28', '30',
#         '33', '34', '35', '36',
#         '48', '49', '50', '51', '52', '53', '55',
#         '56', '57', '58', '59',
#         '60', '61', '62', '64', '65', '66', '67',
#     )
# 
# def _group_display_2018():
#     return (
#         '17', '18', '19',
#         '25', '31', '37',
#         '47', '54', '63',
#     )
# 
# def _total_display_2018():
#     return (
#         '53', '62',
#     )
# 
# def _editable_display_2018():
#     return (
#         '20', '21', '22', '23', '24',
#         '26', '27', '28', '29', '30',
#         '32', '33', '34', '35', '36',
#         '38', '39', '40', '41', '42',
#         '48', '49', '50', '51', '52',
#         '64', '65', '67',
#     )
# 
# Path: l10n_de_tax_statement/models/l10n_de_tax_statement_2019.py
# def _base_display_2019():
#     return (
#         '20', '21', '22', '23', '24',
#         '26', '27', '28', '29', '30',
#         '32', '33', '34', '35', '36',
#         '38', '39', '40', '41', '48',
#         '49', '50',
#     )
# 
# def _tax_display_2019():
#     return (
#         '26', '27', '28', '30',
#         '33', '34', '35', '36',
#         '48', '49', '50', '51',
#         '53', '54', '55', '56',
#         '57', '58', '59', '60',
#         '62', '63', '64', '65',
#     )
# 
# def _group_display_2019():
#     return (
#         '17', '18', '19',
#         '25', '31', '37',
#         '47', '52', '61',
#     )
# 
# def _total_display_2019():
#     return (
#         '51', '60',
#     )
# 
# def _editable_display_2019():
#     return (
#         '20', '21', '22', '23', '24',
#         '26', '27', '28', '29', '30',
#         '32', '33', '34', '35', '36',
#         '38', '39', '40', '41', '42',
#         '48', '49', '50', '64', '65',
#     )


from odoo import _, api, fields, models
from odoo.osv import expression
from odoo.exceptions import UserError
from odoo.tools.misc import formatLang
from .l10n_de_tax_statement_2018 import \
    _base_display_2018, _tax_display_2018, \
    _group_display_2018, _total_display_2018, _editable_display_2018
from .l10n_de_tax_statement_2019 import \
    _base_display_2019, _tax_display_2019, \
    _group_display_2019, _total_display_2019, _editable_display_2019
        res = [('id', 'in', past_amls.ids + curr_amls.ids)]
        return res

    def _filter_taxes_by_code(self, taxes):
        self.ensure_one()
        tags_map = self.statement_id._get_tags_map()
        filtered_taxes = self.env['account.tax']
        for tax in taxes:
            for tag in tax.tag_ids:
                tag_map = tags_map.get(tag.id)
                if tag_map and tag_map[0] == self.code:
                    filtered_taxes |= tax
        return filtered_taxes.with_context(taxes.env.context)

    def _get_domain_draft(self, taxes, tax_or_base):
        self.ensure_one()
        ctx = taxes.env.context.copy()
        ctx.update({
            'l10n_de_statement_tax_ids': taxes.ids
        })
        AccountTax = self.env['account.tax'].with_context(ctx)
        return AccountTax.get_move_lines_domain(tax_or_base=tax_or_base)

    def _get_domain_posted(self, taxes, tax_or_base):
        self.ensure_one()
        statement = self.statement_id
        domain = [('move_id.l10n_de_tax_statement_id', '=', statement.id)]
        if tax_or_base == 'tax':
            tax_domain = [('tax_line_id', 'in', taxes.ids)]
        else:

# Path: l10n_de_tax_statement/models/l10n_de_tax_statement_2018.py
# def _base_display_2018():
#     return (
#         '20', '21', '22', '23', '24',
#         '26', '27', '28', '29', '30',
#         '32', '33', '34', '35', '36',
#         '38', '39', '40', '41', '42',
#         '48', '49', '50', '51', '52',
#     )
# 
# def _tax_display_2018():
#     return (
#         '26', '27', '28', '30',
#         '33', '34', '35', '36',
#         '48', '49', '50', '51', '52', '53', '55',
#         '56', '57', '58', '59',
#         '60', '61', '62', '64', '65', '66', '67',
#     )
# 
# def _group_display_2018():
#     return (
#         '17', '18', '19',
#         '25', '31', '37',
#         '47', '54', '63',
#     )
# 
# def _total_display_2018():
#     return (
#         '53', '62',
#     )
# 
# def _editable_display_2018():
#     return (
#         '20', '21', '22', '23', '24',
#         '26', '27', '28', '29', '30',
#         '32', '33', '34', '35', '36',
#         '38', '39', '40', '41', '42',
#         '48', '49', '50', '51', '52',
#         '64', '65', '67',
#     )
# 
# Path: l10n_de_tax_statement/models/l10n_de_tax_statement_2019.py
# def _base_display_2019():
#     return (
#         '20', '21', '22', '23', '24',
#         '26', '27', '28', '29', '30',
#         '32', '33', '34', '35', '36',
#         '38', '39', '40', '41', '48',
#         '49', '50',
#     )
# 
# def _tax_display_2019():
#     return (
#         '26', '27', '28', '30',
#         '33', '34', '35', '36',
#         '48', '49', '50', '51',
#         '53', '54', '55', '56',
#         '57', '58', '59', '60',
#         '62', '63', '64', '65',
#     )
# 
# def _group_display_2019():
#     return (
#         '17', '18', '19',
#         '25', '31', '37',
#         '47', '52', '61',
#     )
# 
# def _total_display_2019():
#     return (
#         '51', '60',
#     )
# 
# def _editable_display_2019():
#     return (
#         '20', '21', '22', '23', '24',
#         '26', '27', '28', '29', '30',
#         '32', '33', '34', '35', '36',
#         '38', '39', '40', '41', '42',
#         '48', '49', '50', '64', '65',
#     )


# Path: l10n_de_tax_statement/models/l10n_de_tax_statement_line.py
from odoo import _, api, fields, models
from odoo.osv import expression
from odoo.exceptions import UserError
from odoo.tools.misc import formatLang
from .l10n_de_tax_statement_2018 import \
    _base_display_2018, _tax_display_2018, \
    _group_display_2018, _total_display_2018, _editable_display_2018
from .l10n_de_tax_statement_2019 import \
    _base_display_2019, _tax_display_2019, \
    _group_display_2019, _total_display_2019, _editable_display_2019

        res = [('id', 'in', past_amls.ids + curr_amls.ids)]
        return res

    def _filter_taxes_by_code(self, taxes):
        self.ensure_one()
        tags_map = self.statement_id._get_tags_map()
        filtered_taxes = self.env['account.tax']
        for tax in taxes:
            for tag in tax.tag_ids:
                tag_map = tags_map.get(tag.id)
                if tag_map and tag_map[0] == self.code:
                    filtered_taxes |= tax
        return filtered_taxes.with_context(taxes.env.context)

    def _get_domain_draft(self, taxes, tax_or_base):
        self.ensure_one()
        ctx = taxes.env.context.copy()
        ctx.update({
            'l10n_de_statement_tax_ids': taxes.ids
        })
        AccountTax = self.env['account.tax'].with_context(ctx)
        return AccountTax.get_move_lines_domain(tax_or_base=tax_or_base)

    def _get_domain_posted(self, taxes, tax_or_base):
        self.ensure_one()
        statement = self.statement_id
        domain = [('move_id.l10n_de_tax_statement_id', '=', statement.id)]
        if tax_or_base == 'tax':
            tax_domain = [('tax_line_id', 'in', taxes.ids)]
        else:

            tax_domain = [('tax_ids', 'in', taxes.ids)]