This commit is contained in:
Giorgio Borelli 2014-11-12 16:39:00 +01:00
parent fc55bca7aa
commit ebb4da70d5
3 changed files with 12 additions and 16 deletions

View File

@ -2,7 +2,8 @@
<openerp> <openerp>
<data noupdate="1"> <data noupdate="1">
<record id="base.user_demo" model="res.users"> <record id="base.user_demo" model="res.users">
<field eval="[(4, ref('base.group_sale_salesman')),(4, ref('base.group_document_user'))]" name="groups_id"/> <field eval="[(4, ref('base.group_document_user'))]"
name="groups_id"/>
</record> </record>
<record id="demo_category1" model="document.page"> <record id="demo_category1" model="document.page">
<field name="name">OpenERP Features</field> <field name="name">OpenERP Features</field>

View File

@ -30,13 +30,16 @@
Wiki text can easily be edited Wiki text can easily be edited
' '
- -
I check the page history for the current page by clicking on "Page History".After that find difference between history. I check the page history for the current page by clicking on "Page History".After that find difference between history.
- -
!python {model: wizard.document.page.history.show_diff}: | !python {model: wizard.document.page.history.show_diff, id: False}: |
hist_obj = model.pool.get('document.page.history') hist_obj = self.env['document.page.history']
ids = hist_obj.search(cr, uid, [('page_id', '=', ref("test_page0"))]) ids = hist_obj.search([('page_id', '=', ref("test_page0"))])
model.get_diff(cr, uid, {'active_ids': ids[:] }) self.with_context(active_ids=[i.id for i in ids]).get_diff()
- -
I click the "create menu" link and i fill the form. I click the "create menu" link and i fill the form.
- -
@ -46,9 +49,7 @@
- -
I create a Menu by clicking on "create menu" I create a Menu by clicking on "create menu"
- -
!python {model: document.page.create.menu}: | !python {model: document.page.create.menu, id: False}: |
ids = [ref("test_create_menu0")] menu = self.search([('id', '=', ref("test_create_menu0"))])
context['active_id'] = ref('test_page0') menu.with_context(active_id=[ref('test_page0')]).document_page_menu_create()
self.document_page_menu_create(cr, uid, ids, context)

View File

@ -49,12 +49,6 @@ class document_page_create_menu(models.TransientModel):
@api.multi @api.multi
def document_page_menu_create(self): def document_page_menu_create(self):
# events = self.env['event.event'].browse(self._context.get('event_ids', []))
# events.do_confirm()
# return {'type': 'ir.actions.act_window_close'}
# def document_page_menu_create(self, cr, uid, ids, context=None):
# if context is None:
# context = {}
obj_page = self.env['document.page'] obj_page = self.env['document.page']
obj_menu = self.env['ir.ui.menu'] obj_menu = self.env['ir.ui.menu']
obj_action = self.env['ir.actions.act_window'] obj_action = self.env['ir.actions.act_window']