Skip to content
Snippets Groups Projects
Commit 38a20af9 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[MERGE] forward port of branch saas-6 up to dfdd12e0

parents 4b9b4573 dfdd12e0
Branches
Tags
No related merge requests found
......@@ -12,12 +12,18 @@ class BankStatement(models.Model):
def button_draft(self):
self.state = 'draft'
@api.multi
def button_cancel(self):
return super(BankStatement, self.with_context(bank_statement_cancel=True)).button_cancel()
class BankStatementLine(models.Model):
_inherit = 'account.bank.statement.line'
@api.multi
def cancel(self):
for line in self:
if line.statement_id.state == 'confirm':
raise Warning(_("Please set the bank statement to New before canceling."))
if not self.env.context.get('bank_statement_cancel'):
for line in self:
if line.statement_id.state == 'confirm':
raise Warning(_("Please set the bank statement to New before canceling."))
return super(BankStatementLine, self).cancel()
......@@ -35,7 +35,7 @@
{
'name': 'Costa Rica - Accounting',
'version': '1.0',
'url': 'http://launchpad.net/openerp-costa-rica',
'url': 'https://github.com/CLEARCORP/odoo-costa-rica',
'author': 'ClearCorp S.A.',
'website': 'http://clearcorp.co.cr',
'category': 'Localization/Account Charts',
......
No preview for this file type
......@@ -181,7 +181,7 @@ class Partner(osv.osv):
s = 4
if partner_data.member_lines:
for mline in partner_data.member_lines:
if mline.date_to >= today and mline.date_from < today:
if mline.date_to >= today and mline.date_from <= today:
if mline.account_invoice_line and mline.account_invoice_line.invoice_id:
mstate = mline.account_invoice_line.invoice_id.state
if mstate == 'paid':
......
......@@ -45,7 +45,7 @@ class WebsiteMembership(http.Controller):
today = time.strftime(DEFAULT_SERVER_DATE_FORMAT)
base_line_domain += [
('membership_id', '=', membership_id), ('date_to', '>=', today),
('date_from', '<', today), ('state', '=', 'paid')
('date_from', '<=', today), ('state', '=', 'paid')
]
membership = product_obj.browse(cr, uid, membership_id, context=context)
else:
......
......@@ -356,6 +356,7 @@ class html(text):
def to_field_args(self):
args = super(html, self).to_field_args()
args['sanitize'] = self._sanitize
args['strip_style'] = self._strip_style
return args
import __builtin__
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment