Skip to Content
Menu
This question has been flagged
2 Replies
837 Views

Dear all,

does anyone know about this problem.

i want to create excel report use window action with code like below:



   

​Offer Sheet

​ir.actions.act_window

​product.product

    ​form

​new

     


   

   

        offer.sheet.form

        product.offer.sheet

       


           


               

Please click button Generate Excel Report below to generate the Product Offer ​Sheet.


               

                   

       

   


     

        Offer Sheet

        ir.actions.act_window

        product.product

        form

        new

       

       

        list

        {'default_product_product_id' : active_ids}

   


   

        Offer Sheet

        ir.actions.act_window

        product.template

        form

        new

       

       

        list

        {'default_product_template_id' : active_ids}

   

 when i select product and click action, 

and click Generate Excel Report i got error message like bellow



Thanks for any response


kind regards 

Giri


Avatar
Discard
Best Answer

Hi,

It looks like you are experiencing a validation error related to the "name" field in the "product.template" model when clicking the "GENERATE EXCEL REPORT" button, which triggers a create method.
The error message suggests that the "name" field, which is a required field in the "product.template" model, is empty during the creation process.
To resolve this issue, you need to ensure that you are providing a value for the "name" field when creating instances of the "product.template" model. The "name" field is usually a mandatory field in Odoo models, and it's essential to populate it with a meaningful value.


Hope it helps

Avatar
Discard
Author Best Answer

This error message generatet because :

When the wizard form is opened, we have an empty record. The

create() method hasn't been invoked yet; this will only happen when

we press a button. So, it can't be used to set the initial values to be

presented in a wizard form.

so when i click button, it invoke create() method without selected product.

that why getting error message


Avatar
Discard