'Write server action.
- 1. evaluate the value mapping
- 2. depending on the write configuration:
- `current`: id = active_id
- `other`: id = from reference object
- `expression`: id = from expression evaluation'

@api.model
def run_action_object_write(self, action, eval_context=None):

    res = {}
    for exp in action.fields_lines:
        res[exp.col1.name] = exp.eval_value(eval_context=eval_context)[exp.id]
    if (action.use_write == 'current'):
        model = action.model_id.model
        ref_id = self._context.get('active_id')
    elif (action.use_write == 'other'):
        model = action.crud_model_id.model
        ref_id = action.ref_object.id
    elif (action.use_write == 'expression'):
        model = action.crud_model_id.model
        ref = safe_eval(action.write_expression, eval_context)
        if isinstance(ref, models.BaseModel):
            ref_id = ref.id
        else:
            ref_id = int(ref)
    self.env[model].browse(ref_id).write(res)
