Community archives des diffusions par email

community@mail.odoo.com

Avatar

Re: How i get value from context in py file

par
Fawad Mazhar
- 06/11/2017 05:51:27

Iam not using wizard its just form please guide


From: iWesabe <odoo@iwesabe.com>
Sent: Monday, November 6, 2017 3:45:20 PM
To: Community
Subject: Re: How i get value from context in py file
 


This may be helpful  https://www.odoo.com/forum/help-1/question/110946


Thanks & Regards
-------------
Shameem Babu P K
Odoo Technical Consultant
______________________________
GLOBAL CREATIVE CONCEPTS TECH CO LTD
Kingdom of Saudi Arabia
E  : odoo@iwesabe.com
Ph : +966 13 895 6600; Ext:222
Mob: +966 539 079 660
Web: www.iwesabe.com
___________________
On 11/06/2017 01:40 PM, Fawad Mazhar wrote:

Dear All,


How i get value from context in py file


class ru_assignments_sub(models.Model):
 _name = 'ru.assignments.sub'
 test = fields.Char('test')
  ??????????????

class button_action_demo(models.Model):

    _name = 'button.demo'
    name = fields.Char(required=True,default='Click on generate name!')
    password = fields.Char()

    @api.multi
    def pass_context_parameters(self):
      return {
         'name': ('Assignment Sub'),
         'view_type': 'form',
         'view_mode': 'form',
         'res_model': 'ru.assignments.sub',
         'view_id': False,
         'type': 'ir.actions.act_window',
         'target': 'new',
         'context': "{'partner_id':'1'}",
      }

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

 
 
You're receiving this message because you're a member of the Odoo group. If you don't want to receive any messages or events from this group, stop following it in your inbox.
 
View group conversations   |   View group files
 

Référence