I added a new field in res.partner , then in customer view of POS ; but when editing or creating a customer ; I got error when saving . Here is my code , what's missing to save field from xml to database? Thanks.
odoo.define('My_module.My_module', function (require) {
"use strict";
var models = require('point_of_sale.models');
models.load_fields('res.partner', ['my_field']);
<templates id="point_of_sale.template" xml:space="preserve">
<t t-extend="ClientDetails">
<t t-jquery=".client-details-right" t-operation="append">
<div class="client-detail">
<span class="label">My Field</span>
<t t-if='partner.my_field'>
<span class='detail client'><t t-esc='partner.my_field' /></span>
</t>
<t t-if='!partner.my_field'>
<span class='detail client empty'>N/A</span>
</t>
</div>
</t>
</t>
<t t-extend="ClientDetailsEdit">
<t t-jquery=".client-details-right" t-operation="append">
<div class="client-detail">
<span class="label">My Field</span>
<input class='detail client' type="date" t-att-value='partner.my_field'></input>
</div>
</t>
</t>
</templates>