Compare commits
1 Commits
14.0-pos-u
...
14.0-accou
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a59c2e774a |
@@ -242,6 +242,17 @@ class AccountMoveLine(models.Model):
|
||||
compute='_compute_reconcile_string', string='Reconcile', store=True)
|
||||
# for optional display in tree view
|
||||
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
|
||||
balance = fields.Monetary(
|
||||
string='Balance',
|
||||
default=0.0,
|
||||
currency_field='company_currency_id',
|
||||
compute="_compute_balance",
|
||||
store=True)
|
||||
|
||||
@api.depends("credit", "debit")
|
||||
def _compute_balance(self):
|
||||
for line in self:
|
||||
line.balance = line.debit - line.credit
|
||||
|
||||
def show_account_move_form(self):
|
||||
self.ensure_one()
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
<field name="matching_number" position="after">
|
||||
<button title="View Journal Entry Form" type="object" name="show_account_move_form" icon="fa-arrow-right"/>
|
||||
</field>
|
||||
<field name="credit" position="after">
|
||||
<field name="balance" sum="Balance" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user