Compare commits
1 Commits
14.0-accou
...
14.0-accou
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
955cda6957 |
@@ -32,7 +32,7 @@ This modules adds the following functions:
|
||||
* A wizard to mark several invoices as sent at once (forward from v8)
|
||||
* Default date for Account Move Reversal is now D+1 instead of today
|
||||
* Track more fields on invoice (see details in account.py)
|
||||
* Add boolean fields `has_discount` and `has_attachment` on invoice
|
||||
* Add boolean fields `has_line_discount` and `has_attachment` on invoice
|
||||
* Add button "Delete line qty = 0" on supplier invoice
|
||||
* Cut name_get() of invoice if too long
|
||||
* A script for if Odoo screws up invoice attachment filename
|
||||
|
||||
@@ -296,11 +296,16 @@ msgstr "Possède une pièce jointe"
|
||||
|
||||
#. module: account_usability
|
||||
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__has_discount
|
||||
#: model:ir.model.fields,field_description:account_usability.field_account_move__has_discount
|
||||
#: model:ir.model.fields,field_description:account_usability.field_account_payment__has_discount
|
||||
msgid "Has Discount"
|
||||
msgstr "A une réduction"
|
||||
|
||||
#. module: account_usability
|
||||
#: model:ir.model.fields,field_description:account_usability.field_account_move__has_line_discount
|
||||
|
||||
msgid "Has Line Discount"
|
||||
msgstr "Contient une réduction"
|
||||
|
||||
#. module: account_usability
|
||||
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement__hide_bank_statement_balance
|
||||
#: model:ir.model.fields,field_description:account_usability.field_account_journal__hide_bank_statement_balance
|
||||
|
||||
@@ -28,8 +28,8 @@ class AccountMove(models.Model):
|
||||
fiscal_position_id = fields.Many2one(tracking=True)
|
||||
amount_total = fields.Monetary(tracking=True)
|
||||
# for invoice report
|
||||
has_discount = fields.Boolean(
|
||||
compute='_compute_has_discount', readonly=True)
|
||||
has_line_discount = fields.Boolean(
|
||||
compute='_compute_has_line_discount', readonly=True)
|
||||
# has_attachment is useful for those who use attachment to archive
|
||||
# supplier invoices. It allows them to find supplier invoices
|
||||
# that don't have any attachment
|
||||
@@ -41,15 +41,15 @@ class AccountMove(models.Model):
|
||||
help="This information appear on invoice qweb report "
|
||||
"(you may use it for your own report)")
|
||||
|
||||
def _compute_has_discount(self):
|
||||
def _compute_has_line_discount(self):
|
||||
prec = self.env['decimal.precision'].precision_get('Discount')
|
||||
for inv in self:
|
||||
has_discount = False
|
||||
has_line_discount = False
|
||||
for line in inv.invoice_line_ids:
|
||||
if not line.display_type and not float_is_zero(line.discount, precision_digits=prec):
|
||||
has_discount = True
|
||||
has_line_discount = True
|
||||
break
|
||||
inv.has_discount = has_discount
|
||||
inv.has_line_discount = has_line_discount
|
||||
|
||||
def _compute_has_attachment(self):
|
||||
iao = self.env['ir.attachment']
|
||||
|
||||
Reference in New Issue
Block a user