odoo10_addons

Check-in [360ea2d621]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:trial_balance_co: codigos de saldo anterior y consultados se adicionan por conjuntos/set
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | enterprise
Files: files | file ages | folders
SHA3-256: 360ea2d6212fd086e40d95efb2aa7d691ae84f2c520ec693449545423121006d
User & Date: bit4bit 2019-03-10 00:39:42
Context
2019-03-10
01:20
trial_balance_co: se fuerza limpieza de campo account.code check-in: df7b79db23 user: bit4bit tags: enterprise
00:39
trial_balance_co: codigos de saldo anterior y consultados se adicionan por conjuntos/set check-in: 360ea2d621 user: bit4bit tags: enterprise
00:21
corr check-in: de8dd9a7a4 user: bit4bit tags: enterprise
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to trial_balance_co/report/balance.py.

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
        results = self._fetch_moves_by_account_code(accounts, default_account_id)
        date_to = dateutil.parser.parse(used_context['date_from']) - timedelta(days=1)
        used_context_previous = copy.copy(used_context)
        used_context_previous.update({'date_to': date_to, 'date_from': False})
        account_result_previous = self.with_context(used_context_previous)._fetch_moves_by_account_code(accounts, default_account_id)

        res = []
        codes = results.keys() + account_result_previous.keys()
        def sort_by_code(x, y):
            a = x.ljust(6, '0')
            b = y.ljust(6, '0')
            if len(x) > 6:
                a = x[:6]
            if len(y) > 6:
                b = y[:6]







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
        results = self._fetch_moves_by_account_code(accounts, default_account_id)
        date_to = dateutil.parser.parse(used_context['date_from']) - timedelta(days=1)
        used_context_previous = copy.copy(used_context)
        used_context_previous.update({'date_to': date_to, 'date_from': False})
        account_result_previous = self.with_context(used_context_previous)._fetch_moves_by_account_code(accounts, default_account_id)

        res = []
        codes = list(set(results.keys()) | set(account_result_previous.keys()))
        def sort_by_code(x, y):
            a = x.ljust(6, '0')
            b = y.ljust(6, '0')
            if len(x) > 6:
                a = x[:6]
            if len(y) > 6:
                b = y[:6]