|
@ -6,7 +6,6 @@ |
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
|
|
|
|
|
from openerp import models, fields, api |
|
|
from openerp import models, fields, api |
|
|
from openerp.exceptions import Warning as UserError |
|
|
|
|
|
from datetime import datetime |
|
|
from datetime import datetime |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -36,14 +35,6 @@ class OpenInvoiceWizard(models.TransientModel): |
|
|
def onchange_atdate(self): |
|
|
def onchange_atdate(self): |
|
|
self.until_date = self.at_date |
|
|
self.until_date = self.at_date |
|
|
|
|
|
|
|
|
@api.onchange('until_date') |
|
|
|
|
|
def onchange_untildate(self): |
|
|
|
|
|
# ---- until_date must be always >= of at_date |
|
|
|
|
|
if self.until_date: |
|
|
|
|
|
if self.until_date < self.at_date: |
|
|
|
|
|
raise UserError( |
|
|
|
|
|
'Until Date must be equal or greater than At Date') |
|
|
|
|
|
|
|
|
|
|
|
def _build_contexts(self, data): |
|
|
def _build_contexts(self, data): |
|
|
result = {} |
|
|
result = {} |
|
|
return result |
|
|
return result |
|
|