redesign switch company-menu
							parent
							
								
									102b275839
								
							
						
					
					
						commit
						1bb9d1a82a
					
				|  | @ -35,7 +35,8 @@ class Http(models.AbstractModel): | ||||||
|             "username": user.login, |             "username": user.login, | ||||||
|             "company_id": request.env.user.company_id.id if request.session.uid else None, |             "company_id": request.env.user.company_id.id if request.session.uid else None, | ||||||
|             "partner_id": request.env.user.partner_id.id if request.session.uid and request.env.user.partner_id else None, |             "partner_id": request.env.user.partner_id.id if request.session.uid and request.env.user.partner_id else None, | ||||||
|             "user_companies": {'current_company': (user.company_id.id, user.company_id.name), 'allowed_companies': [(comp.id, comp.name) for comp in user.company_ids]} if display_switch_company_menu else False, | #            "user_companies": {'current_company': (user.company_id.id, user.company_id.name), 'allowed_companies': [(comp.id, comp.name, comp.partner_description or '') for comp in user.company_ids]} if display_switch_company_menu else False, | ||||||
|  |             "user_companies": {'current_company': (user.company_id.id, user.company_id.name), 'allowed_companies': [(comp.id, comp.portal_prefix or '----', comp.partner_description or comp.name) for comp in user.company_ids]} if display_switch_company_menu else False, | ||||||
|             "currencies": self.get_currencies(), |             "currencies": self.get_currencies(), | ||||||
|             "web.base.url": self.env['ir.config_parameter'].sudo().get_param('web.base.url', default=''), |             "web.base.url": self.env['ir.config_parameter'].sudo().get_param('web.base.url', default=''), | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ var SwitchCompanyMenu = Widget.extend({ | ||||||
|             } else { |             } else { | ||||||
|                 a = '<span class="mr24"/>'; |                 a = '<span class="mr24"/>'; | ||||||
|             } |             } | ||||||
|             companies_list += '<li><a href="#" data-menu="company" data-company-id="' + company[0] + '">' + a + company[1] + '</a></li>'; |             companies_list += '<li><a href="#" style="font-family: \'Courier New\'; text-decoration: none" data-menu="company" data-company-id="' + company[0] + '">' + a + company[1] + ' ' + company[2] + '</a></li>'; | ||||||
|         }); |         }); | ||||||
|         self.$('.dropdown-menu').html(companies_list); |         self.$('.dropdown-menu').html(companies_list); | ||||||
|         return this._super(); |         return this._super(); | ||||||
|  |  | ||||||
|  | @ -158,7 +158,7 @@ class Partner(models.Model): | ||||||
|       help='The internal user that is in charge of communicating with this contact if any.') |       help='The internal user that is in charge of communicating with this contact if any.') | ||||||
|     vat = fields.Char(string='TIN', help="Tax Identification Number. " |     vat = fields.Char(string='TIN', help="Tax Identification Number. " | ||||||
|                                          "Fill it if the company is subjected to taxes. " |                                          "Fill it if the company is subjected to taxes. " | ||||||
|                                          "Used by the some of the legal statements.") |                                          "Used by the some of the legal statements.",copy=False) | ||||||
|     bank_ids = fields.One2many('res.partner.bank', 'partner_id', string='Banks') |     bank_ids = fields.One2many('res.partner.bank', 'partner_id', string='Banks') | ||||||
|     website = fields.Char(help="Website of Partner or Company") |     website = fields.Char(help="Website of Partner or Company") | ||||||
|     comment = fields.Text(string='Notes') |     comment = fields.Text(string='Notes') | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue