i tried to import product , but the income and expense field is filled from primary company not the company i import
Note: the account both have a same code and name only the company is different
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i tried to import product , but the income and expense field is filled from primary company not the company i import
Note: the account both have a same code and name only the company is different
Hi Arun,
I also encountered this problem and I solved it by following these steps:
1/ Step 1: Add the company_code field to the res.company model.
class ResCompany(models.Model):
_inherit = 'res.company'
company_code = fields.Char(string='Company Code', required=False, readonly=False, copy = False)
_sql_constraints = [('company_code _uniq', 'unique(company_code)', 'Company Code must be unique')]
2/ Step 2: Override the name_get function of the account.account model
def name_get(self):
res = []
tmp_d_name = False
for record in self:
tmp_d_name = '%s %s' % (record.code, record.name)
if record.company_id :
tmp_d_name= '%s - %s' % (record.company_id.company_code,tmp_d_name)
res.append((record.id, tmp_d_name))
return res
3/ Step 3: Use the value displayed on the system of the account_id field to import through customizing the import function. You can refer to the following video:
https://www.youtube.com/watch?v=UOBxxnYDIsM&list=PLSKcWRTtEl5qzvRaI-VTGavfReiHS_EEb&index=1 (starting at 37:00 in this video)
Hello,
In the product master, import the Income and Expense Account using the External ID or the Database ID of the COA. I think it will resolve your issue.
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
3
thg 7 25
|
2185 | ||
|
1
thg 4 25
|
1636 | ||
|
0
thg 10 24
|
1306 | ||
|
4
thg 5 24
|
12914 | ||
|
2
thg 5 24
|
4169 |