Skip to content

Commit

Permalink
Update receipt projection: remove 'from_date' parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
abernardi committed May 24, 2023
1 parent a66f735 commit 709298a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
8 changes: 0 additions & 8 deletions locale/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ msgctxt "field:cooperative.lote.update_projection.start,formula:"
msgid "Unit Price Formula"
msgstr "Fórmula de Precio"

msgctxt "field:cooperative.lote.update_projection.start,from_date:"
msgid "From Date"
msgstr "Desde la fecha"

msgctxt "field:cooperative_ar.print_cashflow.start,analytic_account:"
msgid "Analytic Account"
msgstr "Cuenta analítica"
Expand Down Expand Up @@ -54,10 +50,6 @@ msgstr ""
"Expresión de Python que se evaluará como:\n"
"- amount: El importe actual de cada recibo"

msgctxt "help:cooperative.lote.update_projection.start,from_date:"
msgid "Date from which the amounts will be updated"
msgstr "Fecha a partir de la cual se actualizarán los importes"

msgctxt "help:purchase.update_projection.start,formula:"
msgid ""
"Python expression that will be evaluated with:\n"
Expand Down
11 changes: 0 additions & 11 deletions recibo.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,10 @@ class UpdateReciboLoteProjectionStart(ModelView):
'Update Recibo Projection'
__name__ = 'cooperative.lote.update_projection.start'

from_date = fields.Date('From Date', required=True,
help='Date from which the amounts will be updated')
formula = fields.Char('Unit Price Formula', required=True,
help=('Python expression that will be evaluated with:\n'
'- amount: the current amount of each receipt'))

@classmethod
def default_from_date(cls):
pool = Pool()
Date = pool.get('ir.date')
return Date.today()

@classmethod
def default_formula(cls):
return 'amount'
Expand Down Expand Up @@ -155,9 +147,6 @@ def update_amount(self):
for recibo in lote.recibos:
if recibo.state != 'projected':
continue
if (not recibo.date or
self.start.from_date > recibo.date):
continue
amount = self.get_amount(recibo.amount).quantize(
Decimal(1) / 10 ** 2)
recibo.amount = amount
Expand Down
2 changes: 0 additions & 2 deletions view/lote_update_projection_start_form.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0"?>
<form>
<label name="from_date"/>
<field name="from_date"/>
<label name="formula"/>
<field name="formula"/>
</form>

0 comments on commit 709298a

Please sign in to comment.