```
ERROR openerp_test openerp.sql_db: bad query: ALTER TABLE "res_partner" ALTER COLUMN "lastname" SET NOT NULL
Traceback (most recent call last):
File "openerp/sql_db.py", line 230, in execute
res = self._obj.execute(query, params)
IntegrityError: column "lastname" contains null values
```
context is now received as a frozendict, so pop is not allowed on it directly.
We need to make a copy of it first, so
if context is None:
context = {}
is not enought...
For Partner:
1) Create always the SQL constraint on 'lastname'
2) Better implementation of "_write_name" allowing more intuitive update of the partner name when processing from another model (ex: res_user), i.e., try to keep the firstname if unchanged
3) When duplicating a partner, avoid to repeat the firstname in the name
4) Beautify the inner form for children contacts (placing fields as in the main form)
5) Allow edition of the field name in the inner form if child is a company
For User:
1) Reintegrate the name as "required"
2) When duplicating a user, avoid to repeat the firstname in the related partner name
[CHG] Improve the _write_name method
* trying to coerce to the correct lastname if the firstname is untouched
* resetting the firstname if contact is a company
[FIX] Avoid to replicate the firstname into the name when duplicating a partner
[FIX] Avoid to replicate the firstname into the name when duplicating a user
[CHG] Restore the required attribute of the field name in user form
[CHG] Beautify the inner form for children contacts (placing fields as in the main form)
[FIX] Allow edition of the field name in the inner form if child is a company