Change unlink to delete for issue201
This commit is contained in:
1 parent
9cae3b4ecf
commit
033f3b2317
2 files changed
+19
-19
No files matched your search
+8
-8
@@ -605,7 +605,7 @@ class Invoice(OSV):
|
||||
if exception:
|
||||
self.raise_user_error(cursor, 'missing_tax_line',
|
||||
context=context)
|
||||
tax_obj.unlink(cursor, user, tax.id,
|
||||
tax_obj.delete(cursor, user, tax.id,
|
||||
context=context)
|
||||
continue
|
||||
if not currency_obj.is_zero(cursor, user,
|
||||
@@ -629,7 +629,7 @@ class Invoice(OSV):
|
||||
tax_obj = self.pool.get('account.invoice.tax')
|
||||
for invoice in self.browse(cursor, user, ids, context=context):
|
||||
if invoice.taxes:
|
||||
tax_obj.unlink(cursor, user, [x.id for x in invoice.taxes],
|
||||
tax_obj.delete(cursor, user, [x.id for x in invoice.taxes],
|
||||
context=context)
|
||||
computed_taxes = self._compute_taxes(cursor, user, invoice,
|
||||
context=context)
|
||||
@@ -797,11 +797,11 @@ class Invoice(OSV):
|
||||
res = self.name_get(cursor, user, ids, context=context)
|
||||
return res
|
||||
|
||||
def unlink(self, cursor, user, ids, context=None):
|
||||
def delete(self, cursor, user, ids, context=None):
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
self.check_modify(cursor, user, ids, context=context)
|
||||
return super(Invoice, self).unlink(cursor, user, ids,
|
||||
return super(Invoice, self).delete(cursor, user, ids,
|
||||
context=context)
|
||||
|
||||
def write(self, cursor, user, ids, vals, context=None):
|
||||
@@ -1279,11 +1279,11 @@ class InvoiceLine(OSV):
|
||||
self.raise_user_error(cursor, 'modify', context=context)
|
||||
return
|
||||
|
||||
def unlink(self, cursor, user, ids, context=None):
|
||||
def delete(self, cursor, user, ids, context=None):
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
self.check_modify(cursor, user, ids, context=context)
|
||||
return super(InvoiceLine, self).unlink(cursor, user, ids,
|
||||
return super(InvoiceLine, self).delete(cursor, user, ids,
|
||||
context=context)
|
||||
|
||||
def write(self, cursor, user, ids, vals, context=None):
|
||||
@@ -1477,11 +1477,11 @@ class InvoiceTax(OSV):
|
||||
context=context)
|
||||
return
|
||||
|
||||
def unlink(self, cursor, user, ids, context=None):
|
||||
def delete(self, cursor, user, ids, context=None):
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
self.check_modify(cursor, user, ids, context=context)
|
||||
return super(InvoiceTax, self).unlink(cursor, user, ids,
|
||||
return super(InvoiceTax, self).delete(cursor, user, ids,
|
||||
context=context)
|
||||
|
||||
def write(self, cursor, user, ids, vals, context=None):
|
||||
|
||||
+11
-11
@@ -83,7 +83,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_payment_term_account_admin">
|
||||
<field name="model" search="[('model', '=', 'account.invoice.payment_term')]"/>
|
||||
@@ -91,14 +91,14 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_payment_term_line">
|
||||
<field name="model" search="[('model', '=', 'account.invoice.payment_term.line')]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_payment_term_line_account_admin">
|
||||
<field name="model"
|
||||
@@ -107,7 +107,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
<menuitem parent="menu_invoices_configuration" action="act_payment_term_form"
|
||||
@@ -145,7 +145,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_pay_invoice">
|
||||
@@ -397,7 +397,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_invoice_account">
|
||||
<field name="model" search="[('model', '=', 'account.invoice')]"/>
|
||||
@@ -405,7 +405,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.action.report" id="report_invoice">
|
||||
<field name="name">Invoice</field>
|
||||
@@ -555,7 +555,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_invoice_line_account">
|
||||
<field name="model" search="[('model', '=', 'account.invoice.line')]"/>
|
||||
@@ -563,7 +563,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="invoice_tax_view_form">
|
||||
@@ -621,7 +621,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.access" id="access_invoice_tax_account">
|
||||
<field name="model" search="[('model', '=', 'account.invoice.tax')]"/>
|
||||
@@ -629,7 +629,7 @@
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user