0

Odoo Warning, MissingError One of the documents you are trying to access has been deleted, please try again after refreshing.

Am accessing this button action_four_weeks_schedule_form which is shown below on .

<field name='multiple_ratecard_id' nolabel="1" options="{'reload_on_button': true}">  <!-- widget="many2many"-->
                                            <tree  string="ALLOCATE SPOTS" editable="bottom" >
                                                <button name="action_four_weeks_schedule_form" type="object" string="CREATE RATECARD SCHEDULE" class="oe_highlight" />

The multiple_ratecard_id is a many to many to a model called singular which has the function action_four_weeks_schedule_form in it
This is the function

   def action_four_weeks_schedule_form(self,cr,uid,ids,context):
    for id in ids:
        order_obj = self.pool.get('ratecard.multiple').browse(cr,uid,id)
        my_id=int(order_obj.id)
    scheduled_for= order_obj.scheduled_for
    code= order_obj.code
    return {
        'name':_("Four  Week Schedule to Process"),
        'view_mode': 'form',
        'view_id': False,
        'view_type': 'form',
        'res_model': 'four.weeks.schedule',
        'context':{'default_scheduled_for':scheduled_for,'default_code':code},
        'type': 'ir.actions.act_window',
        'nodestroy': True,
        'target': 'new',
        'domain': '[]',
        'flags': {'form': {'action_buttons': True}}

    }

How can i solve this error and have the button pop out the view and not the Odoo Warning ?

danielmwai
  • 305
  • 1
  • 6
  • 24

2 Answers2

1

Try the following:

  1. Restart the server
  2. Update your module
  3. Refresh the page
Alessandro Ruffolo
  • 1,575
  • 1
  • 16
  • 34
0

This error occurs when you try to access your module from another OS or Your module has access right issue, On Linux just give read and write access rights to "Others" for your module and restart the server.

Abhishek kadadi
  • 120
  • 2
  • 11
  • 1
    The error was not due to permission errors , it was caused by odoo server on list view not keeping the context and passsing it to all the lines in the list view .... it just passed the context to the first line , check this to understand more of what i mean ..... http://stackoverflow.com/questions/34335376/odoo-throws-a-missingerror-on-treeview-second-line-record – danielmwai Mar 16 '16 at 17:03