تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4774 أدوات العرض

So i'm trying to replicate the save and new button on the sales order line form, however i am trying to get it to pass the values of the previous entry to the new form, below is my current non working method:

this._save()
var form = this.form_view
var model = form.model
var handle = form.handle

var record = model.get(handle, {raw:true})
var data = record.data
var getcontext = record.getContext()
for (var attname in data) {getcontext[attname] = data[attname]}
return model.load({
    context: getcontext,     
    fields: record.fields,
    fieldsInfo: record.fieldsInfo,
    modelName: form.modelName,     
    parentID: self.parentID, 
res_ids: record.res_ids,
type: 'record',
viewType: 'form', }) .then(function (handle) {
form.handle = handle;
    form._updateEnv();
return form._setMode('edit');
})

So i thought that passing the values through within the context should then display the fields but this is not the case.

Is there anyway i can get it to display the fields?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 20
2411
0
ديسمبر 15
6056
0
أبريل 24
44
0
مارس 15
4951
0
سبتمبر 24
1086