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

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
Discard

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? ...

Best Answer

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
Discard
Related Posts Replies Views Activity
1
Aug 25
136
0
Aug 25
28
0
Aug 25
2
0
Aug 25
3
0
Aug 25
154