Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2142 Представления

Hello,


I'm trying to modify the names of the labels when, on a product, you click "Print Labels".


It is related to the selection field "print_format" in model "product.label.layout"


So I tried to inherit and override the field like this:


from odoo import models, fields, api


class TfaLabel(models.TransientModel):
    _inherit = 'product.label.layout'

    print_format = fields.Selection([
        ('dymo', 'Dymo'),
        ('2x7xprice', 'TFA Grande étiquette'),
        ('4x7xprice', 'TFA Petite étiquette'),
        ('4x12', '4 x 12'),
        ('4x12xprice', '4 x 12 with price')], string="Format", default='2x7xprice', required=True)


And... somehow it worked in my test database but not in any other I tried and I can't recall doing anything specific on the test database that made it works...


Can anyone help ? Thanks !

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
мая 24
3226
1
янв. 24
1256
3
мая 24
2515
0
окт. 23
1147
1
февр. 24
5122