Skip to content

Commit

Permalink
[Karthi] | BAH-3609 | Refactor. Discount Head fields domain added for…
Browse files Browse the repository at this point in the history
… client request (#54)
  • Loading branch information
karthikeyansp91 authored Feb 20, 2024
1 parent abaee74 commit e1e806d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bahmni_account/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class AccountInvoice(models.Model):
default='none')
discount = fields.Monetary(string="Discount")
discount_percentage = fields.Float(string="Discount Percentage")
disc_acc_id = fields.Many2one('account.account',
string="Discount Account Head")
disc_acc_id = fields.Many2one('account.account',string="Discount Account Head" ,domain=[('account_type', '=', 'income_other')])
round_off_amount = fields.Monetary(string="Round Off Amount")

@contextmanager
Expand Down
2 changes: 1 addition & 1 deletion bahmni_sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _get_partner_details(self):
('percentage', 'Percentage')], string="Discount Type",
default='none')
discount = fields.Monetary(string="Discount")
disc_acc_id = fields.Many2one('account.account', string="Discount Account Head")
disc_acc_id = fields.Many2one('account.account', string="Discount Account Head" ,domain=[('account_type', '=', 'income_other')])
round_off_amount = fields.Float(string="Round Off Amount")
prev_outstanding_balance = fields.Monetary(string="Previous Outstanding Balance",
)
Expand Down

0 comments on commit e1e806d

Please sign in to comment.