Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Differents logo for a company

By
Selverine
on 8/11/13, 12:46 PM 1,010 views

Hi everybody,

I would like to know how is possible to have different logo for one company? This company has a logo that contains a sentence. The sentence change depending on the client.

I would like to have the possibility to choose the logo during the quotation step (before printing the quotation).

Is it possible?

Thank you a lot.

Aurélien

5

Anas Taji

--Anas Taji--
2203
| 6 7 8
Amman, Jordan
--Anas Taji--

Skype: anas.taji-sw

Email: anas.taji@smartway-jo.com

Anas Taji
On 8/11/13, 7:50 PM

You can have this by adding a selection widget to the quotation form, and on change of this widget you can change the current company's logo. Also, you will need to save the selection to refer to it when printing the same quotation late..%

0
Selverine
On 8/16/13, 2:29 PM

Ok perfect! Thank you!

Btw, i have a "simple "problem fir the seletion widget. I try to use a drop-down menus to choose the logo. The user will have the name of logos in the drop-down menus, and choose one. But the drop-down menus print the name of the table and the id (not the name of the logo):

What i would like:

Name logo 1 Name logo 2 Name logo 3

What the drop-down menus print:

gestion.langue, 1 gestion.langue, 2 gestion.langue, 3

Have you an idea of the error?

My code sale.py:

class gestion_langue(osv.osv)
    _name = "gestion.langue"
    _description = "Gestion Langue"
    _columns = { 
             'name_langue': fields.char('Langue Name', size=64; required=True)
           }
   _defaults = {}

gestion_langue()

In def _get_default_shop

'langue_logo_site' : fields.many2one('gestion.langue', 'Langue')

In sale_view.xml

<field name="langue_logo_site" />

Thank you a lot!

Try to add widget="selection" to the XML field. Also, you may want to add on_change="onchange_logo(langue_logo_site, context)".

The onchange logo method should be something like def onchange_logo(self, cr, uid, ids, logo=False, context=None):

Smart Way LLC, Anas Taji
on 8/16/13, 10:24 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/11/13, 12:46 PM
Seen: 1010 times
Last updated: 3/16/15, 8:10 AM