odoo10_addons

Check-in [6ed9313c1c]

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

Overview
Comment:se muestra desde clase en trial_balance_co
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | enterprise
Files: files | file ages | folders
SHA3-256: 6ed9313c1ce133c74c943bd9da1ada917c832608e6ce11312e2ec4c19681348a
User & Date: bit4bit 2019-03-09 23:21:04
Context
2019-03-09
23:53
trial_balance_co: se adiciona cuenta desconocida, ya que pueden haber movimientos sin realiacion a account.account check-in: 56c723e76c user: bit4bit tags: enterprise
23:21
se muestra desde clase en trial_balance_co check-in: 6ed9313c1c user: bit4bit tags: enterprise
2019-03-08
00:34
se fuerza id de account a enteror check-in: d72a82ca28 user: bit4bit tags: enterprise
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to trial_balance_co/report/balance.py.

50
51
52
53
54
55
56


57
58
59



60
61
62

63
64




65
66
67
68
69
70
71
...
115
116
117
118
119
120
121

122
123
124
125
126
127
128
                if not rid in account_result:
                    account_result[rid] = {
                        'debit': 0.0,
                        'credit': 0.0,
                        'balance': 0.0,
                    }



                account_result[rid]['debit'] += row.get('debit')
                account_result[rid]['credit'] += row.get('credit')
                account_result[rid]['balance'] += row.get('balance')



                account_result[rid]['name'] = accounts[account_id].name
                account_result[rid]['account_id'] = account_id
                account_result[rid]['code'] = rid

                rid = rid[:-2]





        return account_result

    def _fetch_moves_by_account_id_and_partner_id(self, accounts, default_partner_id):
        account_result = {}
        indexes = {}
        (tables, where_clause, where_params, wheres) = self._prepare_sql()
        filters = " AND ".join(wheres)
................................................................................
                'code': None,
                'name': None
            }
            result['type'] = 'line'
            result.update(results.get(code, {}))
            result['balance_prev'] = 0.0
            result['balance_total'] = 0.0

            if code in account_result_previous:
                result['balance_prev'] = account_result_previous[code]['balance']
                result['code'] = account_result_previous[code]['code']
                result['name'] = account_result_previous[code]['name']
            res.append(result)

        return res







>
>



>
>
>
|


>
|
<
>
>
>
>







 







>







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76
77
78
79
80
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
                if not rid in account_result:
                    account_result[rid] = {
                        'debit': 0.0,
                        'credit': 0.0,
                        'balance': 0.0,
                    }

                account_by_code = self.env['account.account'].search([('code', '=', rid)])

                account_result[rid]['debit'] += row.get('debit')
                account_result[rid]['credit'] += row.get('credit')
                account_result[rid]['balance'] += row.get('balance')
                if account_by_code:
                    account_result[rid]['name'] = account_by_code.name
                else:
                    account_result[rid]['name'] = accounts[account_id].name
                account_result[rid]['account_id'] = account_id
                account_result[rid]['code'] = rid
                if len(rid) > 2:
                    rid = rid[:-2]

                elif len(rid) == 2:
                    rid = rid[:-1]
                else:
                    break
        return account_result

    def _fetch_moves_by_account_id_and_partner_id(self, accounts, default_partner_id):
        account_result = {}
        indexes = {}
        (tables, where_clause, where_params, wheres) = self._prepare_sql()
        filters = " AND ".join(wheres)
................................................................................
                'code': None,
                'name': None
            }
            result['type'] = 'line'
            result.update(results.get(code, {}))
            result['balance_prev'] = 0.0
            result['balance_total'] = 0.0

            if code in account_result_previous:
                result['balance_prev'] = account_result_previous[code]['balance']
                result['code'] = account_result_previous[code]['code']
                result['name'] = account_result_previous[code]['name']
            res.append(result)

        return res