inheart a sql_constraints

Asked by Joshua Jan(SHINEIT)

Hello everyone,
I have a question about account.py.
Code:

_sql_constraints = [
        ('credit_debit1', 'CHECK (credit*debit=0)', 'Wrong credit or debit value in model !'),
        ('credit_debit2', 'CHECK (credit+debit>=0)', 'Wrong credit or debit value in model !'),
    ]

I want to delete this code ,but I don`t want to delete it in origin file.I want to create new module to inheart it. But i don`t konw how to write code to delete a _sql_constraints.
thank you very much
Joshua

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Borja López Soilán (NeoPolus) (borjals) said :
#1

By the way, a related question is whether it is really needed to have a positive credit and debit: https://answers.launchpad.net/openobject-addons/+question/123322

Revision history for this message
vrsb (shipilov555) said :
#2

Maybe _sql_constraints = [] works this way?

Can you help with this problem?

Provide an answer of your own, or ask Joshua Jan(SHINEIT) for more information if necessary.

To post a message you must log in.