[MERGE] forward port of branch 8.0 up to 0cddf87
This commit is contained in:
@@ -12,12 +12,18 @@ class BankStatement(models.Model):
|
|||||||
def button_draft(self):
|
def button_draft(self):
|
||||||
self.state = 'draft'
|
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):
|
class BankStatementLine(models.Model):
|
||||||
_inherit = 'account.bank.statement.line'
|
_inherit = 'account.bank.statement.line'
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def cancel(self):
|
def cancel(self):
|
||||||
for line in self:
|
if not self.env.context.get('bank_statement_cancel'):
|
||||||
if line.statement_id.state == 'confirm':
|
for line in self:
|
||||||
raise Warning(_("Please set the bank statement to New before canceling."))
|
if line.statement_id.state == 'confirm':
|
||||||
|
raise Warning(_("Please set the bank statement to New before canceling."))
|
||||||
return super(BankStatementLine, self).cancel()
|
return super(BankStatementLine, self).cancel()
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
{
|
{
|
||||||
'name': 'Costa Rica - Accounting',
|
'name': 'Costa Rica - Accounting',
|
||||||
'version': '0.1',
|
'version': '0.1',
|
||||||
'url': 'http://launchpad.net/openerp-costa-rica',
|
'url': 'https://github.com/CLEARCORP/odoo-costa-rica',
|
||||||
'author': 'ClearCorp S.A.',
|
'author': 'ClearCorp S.A.',
|
||||||
'website': 'http://clearcorp.co.cr',
|
'website': 'http://clearcorp.co.cr',
|
||||||
'category': 'Localization/Account Charts',
|
'category': 'Localization/Account Charts',
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 322 B |
@@ -232,7 +232,7 @@ class Partner(osv.osv):
|
|||||||
s = 4
|
s = 4
|
||||||
if partner_data.member_lines:
|
if partner_data.member_lines:
|
||||||
for mline in 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:
|
if mline.account_invoice_line and mline.account_invoice_line.invoice_id:
|
||||||
mstate = mline.account_invoice_line.invoice_id.state
|
mstate = mline.account_invoice_line.invoice_id.state
|
||||||
if mstate == 'paid':
|
if mstate == 'paid':
|
||||||
|
|||||||
@@ -1007,7 +1007,8 @@ class purchase_order(osv.osv):
|
|||||||
if (po_line.move_ids and
|
if (po_line.move_ids and
|
||||||
all(move.state in ('done', 'cancel') for move in po_line.move_ids) and
|
all(move.state in ('done', 'cancel') for move in po_line.move_ids) and
|
||||||
not all(move.state == 'cancel' for move in po_line.move_ids) and
|
not all(move.state == 'cancel' for move in po_line.move_ids) and
|
||||||
all(move.invoice_state == 'invoiced' for move in po_line.move_ids if move.state == 'done')):
|
all(move.invoice_state == 'invoiced' for move in po_line.move_ids if move.state == 'done')
|
||||||
|
and po_line.invoice_lines and all(line.invoice_id.state not in ['draft', 'cancel'] for line in po_line.invoice_lines)):
|
||||||
is_invoiced.append(po_line.id)
|
is_invoiced.append(po_line.id)
|
||||||
else:
|
else:
|
||||||
for po_line in po.order_line:
|
for po_line in po.order_line:
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class WebsiteMembership(http.Controller):
|
|||||||
today = time.strftime(DEFAULT_SERVER_DATE_FORMAT)
|
today = time.strftime(DEFAULT_SERVER_DATE_FORMAT)
|
||||||
base_line_domain += [
|
base_line_domain += [
|
||||||
('membership_id', '=', membership_id), ('date_to', '>=', today),
|
('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)
|
membership = product_obj.browse(cr, uid, membership_id, context=context)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -374,6 +374,7 @@ class html(text):
|
|||||||
def to_field_args(self):
|
def to_field_args(self):
|
||||||
args = super(html, self).to_field_args()
|
args = super(html, self).to_field_args()
|
||||||
args['sanitize'] = self._sanitize
|
args['sanitize'] = self._sanitize
|
||||||
|
args['strip_style'] = self._strip_style
|
||||||
return args
|
return args
|
||||||
|
|
||||||
import __builtin__
|
import __builtin__
|
||||||
|
|||||||
Reference in New Issue
Block a user