commit
892b1fd0f9
|
|
@ -164,7 +164,6 @@ class CtpDatabaseCleanUp(models.TransientModel):
|
|||
]
|
||||
return self.remove_data(to_removes, seqs)
|
||||
|
||||
# VVVVVVVVVVV قم باستبدال الدالة التالية VVVVVVVVVVV
|
||||
def remove_account(self):
|
||||
to_removes = [
|
||||
'payment.transaction',
|
||||
|
|
@ -178,7 +177,6 @@ class CtpDatabaseCleanUp(models.TransientModel):
|
|||
'account.move',
|
||||
]
|
||||
res = self.remove_data(to_removes, [])
|
||||
# FIX: The domain syntax was incorrect (extra '|' at the end)
|
||||
domain = [
|
||||
('company_id', '=', self.env.company.id),
|
||||
'|', ('code', '=ilike', 'account.%'),
|
||||
|
|
@ -196,7 +194,7 @@ class CtpDatabaseCleanUp(models.TransientModel):
|
|||
})
|
||||
except Exception as e:
|
||||
_logger.error('Reset Sequence Data error: %s,%s', domain, e)
|
||||
self._cr.rollback() # Rollback on error
|
||||
self._cr.rollback()
|
||||
return res
|
||||
|
||||
def remove_account_chart(self):
|
||||
|
|
@ -230,7 +228,6 @@ class CtpDatabaseCleanUp(models.TransientModel):
|
|||
'property_account_expense_id': False,
|
||||
})
|
||||
|
||||
# FIX: Check if 'stock.location' model exists before trying to access it
|
||||
if self.env['ir.model']._get('stock.location'):
|
||||
self.env['stock.location'].search([]).write({
|
||||
'valuation_in_account_id': False, 'valuation_out_account_id': False,
|
||||
|
|
|
|||
Loading…
Reference in New Issue