콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

Hello,

We are a manufacturing company that generate serial numbers after we have done some tests on the product. Is there any way I can add the serial numbers later to an inventory that has been created and moved? 

Also, is there a way the system can automatically generate and assign serial numbers to the products?


Thank you in advance for your help.

아바타
취소
베스트 답변

Yes, Odoo 16 allows you to add serial numbers to an inventory that has already been created and moved, and it can also automatically generate and assign serial numbers to products.


Here are the steps to add serial numbers to existing inventory:

  1. Enable Serial Number Tracking: Go to Inventory > Configuration > Settings and enable the Lots & Serial Numbers feature.
  2. Configure Serial Number Tracking: Go to Inventory > Products > Products, choose a product to track, click Edit, navigate to the Inventory tab, and select the By Unique Serial Number option.
  3. Create New Serial Numbers: Go to Inventory > Products > Lots/Serial Numbers and click Create. A new Lot/Serial Number is generated automatically. You can assign this new number to the product.

For automatic generation and assignment of serial numbers, you can use the ir.sequence model in Odoo. Here’s a sample code snippet:


@api.model

def create(self, vals):

    if vals.get('serial_number', _('New')) == _('New'):

        vals['serial_number'] = self.env['ir.sequence'].next_by_code('your.sequence.code') or _('New')

    rec = super(YourModel, self).create(vals)

    return rec


Remember, each product in Odoo must have a unique serial number.




아바타
취소
관련 게시물 답글 화면 활동
1
5월 25
1868
0
11월 23
1363
1
3월 23
2788
1
5월 22
2433
2
11월 21
5105