Odoo Aide

0
3
Asmita Chavan
Le 25/04/2017 03:47

You can check default_invoice_policy field definition,

default_invoice_policy = fields.Selection([
('order', 'Invoice ordered quantities'),
('delivery', 'Invoice delivered quantities')
], 'Default Invoicing',
default='order',
default_model='product.template')

In this field definition, default_model is set as product.template, so this value is not set under model 'sale.config.settings', but it is set under model 'product.template' with name invoice_policy,

So, you have to retrieve value using,

def_inv = ir_values.get_default('product.template', 'invoice_policy')

same applies for picking policy too, picking policy value is set under sale.order model.

In ir.values you can observed that no value is set with name which starts with default_ , there is always substitute field added in another model, to set that value.

A propos de cette communauté

Cette communauté est dédiée aux professionnels et utilisateurs enthousiastes de Odoo. Read Guidelines

Outils de question

1 Abonné(e)s

Statistiques

Posée: 24/04/2017 23:46
Vu: 999 temps
Dernière mise à jour: 29/04/2017 22:14