Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
1604 Переглядів

Dear all,
we have encountered a configuration problem for the following syntax:
[('account_id.user_type_id.type', '=', 'liquidity'), ('balance', '

The balance condition doesn't work.
Any help please.
Regards,
Ridha

Аватар
Відмінити
Автор

[('account_id.user_type_id.type', '=', 'liquidity'), 

('balance',=, 0.0)]

Please let me know where we can check store=True


@Ridah Please use comments instead of answers to discuss.

You can find the balance field in the model that you are trying to make the report for.

Автор

Formiles:
[('account_id.user_type_id.type', '=', 'liquidity'), ('balance', '=', 0.0)]

Автор

Information principale
Nom de la section
Encaissements
CR1
Code

Calcul
Formules
sum
Domaine
[('account_id.user_type_id.type', "=', "liquidity"), ('balance', '<', 0.0)]
Regrouper par
ccount_id
Changeur de date
Dates butoir pour tous les comptes et les
speciale
types de compte

Sequence
Especes
Parent

Автор

balance = fields.Monetary(string='Balance', store=True,
currency_field='company_currency_id',
compute='_compute_balance',
help="Technical field holding the debit - credit in order to open meaningful graph views from reports")

Найкраща відповідь

Odoo has special kind of fields that are called Computed Fields these fields can't be but in domain filters if they are not stored in the database. Witch means they don't have a value to be compared.

To make sure the balance is stored you can check if the balance has an attribute called store=True in the model. Other wise you have to calculate the balance by your self through SQL queries or Computed Fields.


.........
Another way is to calculate the balance your self form the credit and debit of your accounts try to make a formula with this equation:

balance = debit - credit



Happy to help :) an upvote will be awesome

Аватар
Відмінити