Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3881 Zobrazení

In which case we use the attribute _depends  in odoo classes ? 

Ex: in account/report/account_invoice_report.py

...

_depends = { 'account.invoice': [ 'account_id', 'amount_total_company_signed', 'commercial_partner_id', 'company_id', 'currency_id', 'date_due', 'date_invoice', 'fiscal_position_id', 'journal_id', 'partner_bank_id', 'partner_id', 'payment_term_id', 'residual', 'state', 'type', 'user_id', ],

'account.invoice.line': [ 'account_id', 'invoice_id', 'price_subtotal', 'product_id', 'quantity', 'uom_id', 'account_analytic_id', ], 'product.product': ['product_tmpl_id'], 'product.template': ['categ_id'], 'product.uom': ['category_id', 'factor', 'name', 'uom_type'],

'res.currency.rate': ['currency_id', 'name'], 'res.partner': ['country_id'],

}

...

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
7
dub 19
15239
3
led 19
8832
3
čvc 16
26920
1
dub 16
3767
1
bře 16
3786