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.
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
3
Jul 25
|
2182 | ||
|
1
Apr 25
|
1635 | ||
|
0
Okt 24
|
1299 | ||
Odoo 13. Don't close a wizard when Click a button
Diselesaikan
|
|
4
Mei 24
|
12908 | |
|
2
Mei 24
|
4168 |