Skip to Content
Menu
This question has been flagged

Top of the day to all of you! 

Just noticed a very mean bug in Runbot v15.

1. Created an SO normally, including an item Service Work (based on Timesheet)

2. Added few hours in TimeSheet entry.

3. Went to SO to create an invoice normally

4. In Draft Invoice view checked the invoice content (headers and rows) as usual and then pressed the smart button to see which TS-entries are about be invoiced.

5. Pressing the button caused an error msg "User Error: No default view of type 'grid' could be found".

Anyone got an idea about the error msg or faced the same issue? 


regards, Matti

Avatar
Discard
Best Answer

Hello Matti Immonen,

Hope you are doing well.

For solving this issue, please remove grid view from view_mode attribute in action so please rewrite the code like below.

Go to sale_timesheet module > views > account_invoice_views.xml file and in this file find action_timesheet_from_invoice record id and change value of view_mode attribute.


Find Code in Comment.


Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Discard

<record id="action_timesheet_from_invoice" model="ir.actions.act_window">
<field name="name">Timesheets</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.line</field>
<field name="view_mode">tree,form,graph,pivot,kanban</field>
<field name="context">{'create': False, 'edit': False, 'delete': False}</field>
<field name="domain">[('timesheet_invoice_id', '=', active_id)]</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
No activities found
</p>
<p>
Track your working hours by projects every day and invoice this time to your customers.
</p>
</field>
</record>

Author Best Answer

Hello Jainesh Shah,

thanks for your most valuable answer.

We tested the functionality and it works as you said.

Now, this should be part of the base code - obviously you should do the pull request to Github for the
fix as you have invented the proven solution :-)

Cheers,

Matti

Avatar
Discard

Hello Matti Immonen,

Hope you are doing well.

Someone has already created PR for this issue and recently I have checked the status of PR and the status of PR is closed means its already merged into odoo base code so please Pull the latest odoo 15 base code may be you will get the latest code. The link of the PR is attached below.

https://github.com/odoo/odoo/issues/88274

Hope it will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com

Related Posts Replies Views Activity
3
Oct 22
9116
0
Nov 17
5014
1
Feb 24
754
0
Aug 23
940
0
May 23
1028