Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
595 Visualizzazioni

Hi Im lost on how to solve this problem, please do assist, thanks in advance. When i try to define "default_print_option, i can only name it as x_default_print_option hence unable to solve the issue.



UncaughtPromiseError > OwlError

Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)

OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)

    at handleError 


*had to remove web link

Caused by: Error: "ir.actions.report"."default_print_option" field is undefined.

    at Field.parseFieldNode *had to remove web link

visitChildren *had to remove web link

    at visit *had to remove web link

    at visitChildren *had to remove web link

    at visit *had to remove web link

    at visitChildren *had to remove web link

    at visit *had to remove web link

    at visitChildren *had to remove web link

Avatar
Abbandona

Where's the requirement for an attribute default_print_option coming from in the first place? Mostly, default_* is a constructed key enabling you to pre-set a field value to what comes after 'default_' (so, here, print_option). At a quick glance, I can't find either in core. Thus, more context and information is needed how you've reached to this problem in the first place. Did you modify a report in Studio? What version are we talking about? What report is it? What customization has been done that could be relevant here? ...

Risposta migliore

Hii,

You're getting this error because default_print_option is not defined on ir.actions.report.

  1. Define the field in Python:

from odoo import models, fields class ReportAction(models.Model): _inherit = 'ir.actions.report' default_print_option = fields.Selection([ ('download', 'Download'), ('open', 'Open in new tab'), ('print', 'Direct Print') ], string="Default Print Option", default='download')

upgrade your module and restart your module


i hope it is use full

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
ago 25
12
0
ago 25
6
0
ago 25
142
1
ago 25
271
2
ago 25
426