Warning while installing bahmni_sale addon with existing Odoo data

Description

It appears that if some existing data is in the sale_order table, the bahmni_sale addon will display a warning.

See the message shown below:

2019-09-16 14:37:50,592 1 WARNING odoo odoo.models: WARNING: unable to set column shop_id of table sale_order not null !
Try to re-run: openerp-server --update=module
If it doesn't work, update records and execute manually:
ALTER TABLE sale_order ALTER COLUMN shop_id SET NOT NULL
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 2543, in _auto_init
cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" SET NOT NULL' % (self._table, name))
File "/usr/lib/python2.7/dist-packages/odoo/sql_db.py", line 154, in wrapper
return f(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/sql_db.py", line 231, in execute
res = self._obj.execute(query, params)
IntegrityError: column "shop_id" contains null values

Acceptance Criteria

Install bahmni_sale on top of a default demo Odoo and confirm that the above message does not show.

Status

Assignee

Romain Buisson

Reporter

Romain Buisson

Labels

None

Units

None

PercentDone

None

DueTime

None

Clients

None

External issue ID

None

UAT Assignee

None

Reviewer

None

Fix versions

Configure