Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4866 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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..%

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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!

Awatar
Odrzuć

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):