danielmwai
danielmwai

Reputation: 303

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

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 ?

Upvotes: 0

Views: 4137

Answers (2)

Abhishek kadadi
Abhishek kadadi

Reputation: 120

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.

Upvotes: 0

Alessandro Ruffolo
Alessandro Ruffolo

Reputation: 1575

Try the following:

  1. Restart the server
  2. Update your module
  3. Refresh the page

Upvotes: 1

Related Questions