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

Hello, please help. I have a problem about a field that I just added in my custom module named package quantity inside the orderline, and it is not appearing in mobile view.. I'm using a web responsive module from community for mobile responsiveness but the problem is, the field is not appearing/hidden when i'm in mobile view. Buttons and other field that are not defined inside the notebook/page seem to work well.





Any help will be highly appreciated. Thank you.

Ảnh đại diện
Huỷ bỏ

Make sure the visibility attribute is true

Tác giả

Hello Hilar,

Thanks for the response. it should be visible because in web view, the column is there. Only in mobile view that it did not load the filed/column. Please review my code.

class SalesOrderLine(models.Model):

_inherit = 'sale.order.line'

# calculate uom qty / packaging

@api.onchange('product_uom_qty')

def _calculate_pcs_box(self):

for data in self:

if data.product_packaging:

self.product_packaging_qty = data.product_uom_qty / data.product_packaging.qty

product_packaging_qty = fields.Float(string='Package Quantity', descriptio="Field for packaging qty")

<xpath expr="//tree/field[@name='name']" position="after" >

<field name="product_packaging_qty" optional="show"

groups="product.group_stock_packaging"/>

</xpath>

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 21
2457
3
thg 8 24
40822
Odoo 9 mobile view Đã xử lý
1
thg 3 16
4945
1
thg 5 15
3652
0
thg 9 22
1995