Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5 Trả lời
7092 Lượt xem

Hi,

I will like to add fields in article type, because i need more option. For the moment i have just the option  Consumable or Service, and i will like to add a fields like Licence or Equipment.


Do u have any solution to solve the problem? 


Thanks a lot

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Sorry, but why you want extra types even in Equipment module you can create your own equipment. And for licences you can choose service type product.

Thanks. 

Ảnh đại diện
Huỷ bỏ

Yes, good answer. Use consumables or product type for equipments and Services for licenses.

Tác giả Câu trả lời hay nhất

"Sorry, but why you want extra types even in Equipment module you can create your own equipment. And for licences you can choose service type product.

Thanks. "

Because it will be more easy for me to find my product, easier for my research. 

Because I have problem with the internal reference, in fact the internal reference appear in my quote and i dont want that. 

Have u got a solution for that? 

Thank a lot

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In your custom module, you can redefine the particular field by inheriting the product.template model.


class product_template(models.Model):

         _inherit = 'product.template'

         type = fields.Selection(options, string="Type")


Like the above, it is easy if you copy and paste the base field, and put it in your inherited model, and add the appropriate opltions along with the previous options if you need.


Ảnh đại diện
Huỷ bỏ

don't do that, you will have lots of errors as the code expect to have consumables, services and products.

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 22
4204
0
thg 3 15
3417
1
thg 3 15
4277
3
thg 3 23
2679
1
thg 1 18
5319