Skip to Content
Menu
This question has been flagged
1 Reply
1129 Views

buenas estoy tratando de quitar ocultar el boton guardar de un wizard en odoo 15 con estos codigos no lo logro 

en la vista tengo

     "\ rel="ugc">ir\.ui\.view">
\ \ \ \ \ \ \ \ \ View\ get\ year\ base
\ \ \ \ \ \ \ \ \ modelo\.generador
\ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ false
\ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \
\ \ \ \ \

en\ el\ py\ tengo\ el\ llamado\ asi

\ \ \ \ @api\.model
\ \ \ \ def\ _get_year\(self\):
\ \ \ \ \ \ \ \ self\.ensure_one\(\)
\ \ \ \ \ \ \ \ view\ =\ self\.env\.ref\('modelo\.form_view_get_year_base',\ False\)
\ \ \ \ \ \ \ \ if\ view:
\ \ \ \ \ \ \ \ \ \ \ \ tree_view\ =\ \{
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'name':\ _\('Get\ Year\ Version'\),
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'type':\ 'ir\.actions\.act_window',
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'views':\ \[\[view\.id,\ 'form'\]\],
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'domain':\[\['id',\ '=',\ self\.id\]\],
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'res_model':\ 'exo_genreport\.generador',
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'target':\ 'new',
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'context':\ \{
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'write':\ False,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'obj_id':\ self\.id,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'format_concepts_ids':\ self\.format_concepts_ids,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'display_name':\ self\.display_name,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'format_type':\ self\.format_type,
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 'format_id':\ self.version_id.format_id.id,
} ,
}
_logger.warning("\n\n------{}".format(tree_view))
return tree_view


De antemano
Gracias por su ayuda
Avatar
Discard
Best Answer

Hi,

The footer can be overridden in the wizard; to change the buttons with another, simply add a button to the footer element; to remove it, simply leave the footer tag empty.

Regards

Avatar
Discard