我想通过打开Setting->Companies->Currency.来改变公司的货币但是,当我已经改变货币并点击保存按钮时,我会得到这个警告对话框。
您不能更改公司的货币,因为某些日记账项目已经存在
如何解决这个问题?
发布于 2021-12-24 06:24:10
您不能更改公司的货币,因为某些日记账项目已经存在。
参考代码- 源代码
#forbid the change of currency_id if there are already some accounting entries existing
if 'currency_id' in values and values['currency_id'] != company.currency_id.id:
if self.env['account.move.line'].search([('company_id', '=', company.id)]):
raise UserError(_('You cannot change the currency of the company since some journal items already exist'))发布于 2021-12-25 14:44:48
发生此错误是因为存在日记条目。如果必须更改公司货币,则至少有两个选项:
一旦选项1或2完成,然后再尝试更改公司货币。
https://stackoverflow.com/questions/70469365
复制相似问题