Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1572 Lượt xem

Hello,

I am modifying the pos_self_sale_order module (pos-self), and I'm trying to add partner_id information to a previously identified user. However, the object I store as partner_id is always "magically" converted into an integer.

This only happens with the partner_id field (e.g., session_id works as expected). I’m trying to figure out what’s missing or what needs to be changed so that the object I pass doesn’t get overwritten.

Here’s a snippet where the issue occurs:

```
          this.currentPartner = this.models['res.partner'].create(this.addressData);
          // some not related stuff

          const order = this.models['pos.order'].getBy('uuid', this.selectedOrderUuid);

          order.partner_id = this.currentPartner; // currentParnter is Proxy <Target>{ id: 77, ... }

          return super.sendDraftOrderToServer(...arguments); // Here partner_id magically is set to 77


```
Kind regards

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Other plugin was overriding the behavior of currentOrder with patch.
Solved

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 25
600
2
thg 7 25
1182
1
thg 6 25
811
1
thg 4 25
977
1
thg 3 25
1196