Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Project
- MRP
Esta pergunta foi sinalizada
Yes, you can. From method of your button you can call your onchange method. Onchange will return dictionary, you have to fetch values from dictionary and pass that dictionary in write method.
Sample:
def your_btn_method(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
#Pass required fields value as a parameter in onchange
res = self.your_onchange(cr, uid, [rec.id], rec.field1, rec.field2)
if res.has_key('values'):
self.write(cr, uid, [rec.id], res.get('values'), context=context)
return True
Hope this will help you.
Short: In the standard webclient not.
Before the action of the button is executed it makes a save (or create, when the record is new) and the form is reloaded anyway. This is done so, to have all data from the form on the server when executing the action of the button.
actually m new to openerp..but i think we can trigger a function by a button click...we juz have to implement a workflow and in activity we can mentions the method which has to be triggered...also we must map button name with the signal in workflow transition..plz correct me if m wrong
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
2
jul. 15
|
6623 | ||
opening a view through a button
Resolvido
|
|
2
jan. 22
|
4649 | |
|
2
mar. 23
|
10045 | ||
Cacher le bouton "créer" d'une liste
Resolvido
|
|
2
mar. 23
|
2453 | |
|
1
jan. 24
|
14305 |