콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

Every time I make an invoice I generate a custom sequence code in account.invoice. I can see it in the POS orders, and it's being generated properly, but I can't make it display the code inside the POS or the Receipt screen. I read you could insert it extending models.js and then calling it from the .xml but I can't make it work. After many many tries this is what I got:


My models.js is the following:


odoo.define('pos.models', function(require) {
  "use strict";
  var models = require('pos.order');
  models.load_models({
    model:  'pos.order',
    fields: ['my_field'],
    domain: function(self){ return [['state','=','opened']; },
    loaded: function(self,pos_my_field){
      self.pos_my_field = pos_my_field[0];
    },
  });
});

and in the XML I've tried calling it with:
<t t-esc="widget.pos.my_field" />
<t t-esc="widget.my_field" />
<t t-esc="my_field" />
and plenty of other variations but you get the point.
아바타
취소
관련 게시물 답글 화면 활동
0
3월 25
1066
3
5월 23
2876
0
7월 22
1334
3
7월 20
5552
2
6월 20
6096