Compare commits

..

No commits in common. "19.0" and "main" have entirely different histories.
19.0 ... main

19 changed files with 7 additions and 7 deletions

0
.gitignore vendored Executable file → Normal file
View File

0
__init__.py Executable file → Normal file
View File

2
__manifest__.py Executable file → Normal file
View File

@ -22,7 +22,7 @@
'author': "Suherdy Yacob",
'category': 'Accounting',
'version': '19.0.1.0.0',
'version': '18.0.1.0.0',
# Dependencies
'depends': [

0
models/__init__.py Executable file → Normal file
View File

0
models/account_move_line.py Executable file → Normal file
View File

12
models/res_partner.py Executable file → Normal file
View File

@ -15,7 +15,7 @@ class ResPartner(models.Model):
'account.account',
company_dependent=True,
string='Customer Income Account',
domain="[('account_type', '=', 'income'), ('active', '=', True)]",
domain="[('account_type', '=', 'income'), ('deprecated', '=', False)]",
help="This account will be used for revenue entries when selling to this customer. "
"If not set, the income account from the product category will be used."
)
@ -24,7 +24,7 @@ class ResPartner(models.Model):
'account.account',
company_dependent=True,
string='Customer Expense Account (COGS)',
domain="[('account_type', '=', 'expense'), ('active', '=', True)]",
domain="[('account_type', '=', 'expense'), ('deprecated', '=', False)]",
help="This account will be used for COGS entries when selling to this customer. "
"If not set, the expense account from the product category will be used."
)
@ -49,7 +49,7 @@ class ResPartner(models.Model):
return False
# Runtime validation: Check if account is still active
if not account.active:
if account.deprecated:
_logger.error(
"Customer income account %s (ID: %s) for partner %s (ID: %s) is deprecated",
account.code, account.id, self.name, self.id
@ -105,7 +105,7 @@ class ResPartner(models.Model):
return False
# Runtime validation: Check if account is still active
if not account.active:
if account.deprecated:
_logger.error(
"Customer expense account %s (ID: %s) for partner %s (ID: %s) is deprecated",
account.code, account.id, self.name, self.id
@ -158,7 +158,7 @@ class ResPartner(models.Model):
) % account.display_name)
# Check if account is deprecated
if not account.active:
if account.deprecated:
raise ValidationError(_(
"The selected income account '%s' is deprecated and cannot be used. "
"Please select an active income account."
@ -189,7 +189,7 @@ class ResPartner(models.Model):
) % account.display_name)
# Check if account is deprecated
if not account.active:
if account.deprecated:
raise ValidationError(_(
"The selected expense account '%s' is deprecated and cannot be used. "
"Please select an active expense account."

0
models/stock_move.py Executable file → Normal file
View File

0
tests/__init__.py Executable file → Normal file
View File

0
tests/test_account_validation.py Executable file → Normal file
View File

0
tests/test_audit_trail.py Executable file → Normal file
View File

0
tests/test_customer_account_fields.py Executable file → Normal file
View File

0
tests/test_error_handling.py Executable file → Normal file
View File

0
tests/test_expense_account_determination.py Executable file → Normal file
View File

0
tests/test_form_view.py Executable file → Normal file
View File

0
tests/test_income_account_determination.py Executable file → Normal file
View File

0
tests/test_sales_flow_integration.py Executable file → Normal file
View File

0
views/.gitkeep Executable file → Normal file
View File

0
views/account_move_views.xml Executable file → Normal file
View File

0
views/res_partner_views.xml Executable file → Normal file
View File