如何在Odoo 15中再次看到一个无形的领域
在Odoo的销售模块中,当客户想要创建新的销售报价时,报价日期不可见。因此,在开发人员模式下,我进入了表单视图,并意识到它具有带有隐形属性的属性。我尝试删除整个属性,但这似乎不起作用,我只在开发人员模式下看到它。如何使客户可以看到该字段以输入报价日期,以反映在前端? 以下是代码:
< field name =“ date_order” nolabel =“ 1” groups =“ base.group_no_one” attrs =“ {'Invisible':[('state'in'in'in','in',['sale'' ,'完成','cancel'])]}”/>
,这是添加到:
<group name="order_details">
<field name="validity_date" attrs="{'invisible': [('state', 'in', ['sale', 'done'])]}"/>
<div class="o_td_label" groups="base.group_no_one" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}">
<label for="date_order" string="Quotation Date"/>
</div>
<field name="date_order" nolabel="1" groups="base.group_no_one" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/>
<div class="o_td_label" attrs="{'invisible': [('state', 'in', ['draft', 'sent'])]}">
<label for="date_order" string="Order Date"/>
</div>
<field name="date_order" attrs="{'required': [('state', 'in', ['sale', 'done'])], 'invisible': [('state', 'in', ['draft', 'sent'])]}" nolabel="1"/>
<field name="show_update_pricelist" invisible="1"/>
<label for="pricelist_id" groups="product.group_product_pricelist"/>
<div groups="product.group_product_pricelist" class="o_row">
<field name="pricelist_id" options="{'no_open':True,'no_create': True}"/>
<button name="update_prices" type="object" string=" Update Prices" help="Recompute all prices based on this pricelist" class="btn-link mb-1 px-0" icon="fa-refresh" confirm="This will update all unit prices based on the currently set pricelist." attrs="{'invisible': ['|', ('show_update_pricelist', '=', False), ('state', 'in', ['sale', 'done','cancel'])]}"/>
</div>
<field name="currency_id" invisible="1"/>
<field name="tax_country_id" invisible="1"/>
<field name="payment_term_id" options="{'no_open':True,'no_create': True}"/>
</group>```
Is there a way i could make the quotation date visible or it's an access right thing?
In the sales module in odoo, when the client wants to create a new sales quotation, the Quotation date is not visible. So in developer mode, i went into the form view and realised it had an attribute attached to it with an invisible attribute. I tried deleting the whole attribute but that doesn't seem to work, i only see it in developer mode. How do i make this field visible for the client to input a quotation date so it reflects in the frontend?
Below is the code:
<field name="date_order" nolabel="1" groups="base.group_no_one" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/>
And this is the group it is added to:
<group name="order_details">
<field name="validity_date" attrs="{'invisible': [('state', 'in', ['sale', 'done'])]}"/>
<div class="o_td_label" groups="base.group_no_one" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}">
<label for="date_order" string="Quotation Date"/>
</div>
<field name="date_order" nolabel="1" groups="base.group_no_one" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/>
<div class="o_td_label" attrs="{'invisible': [('state', 'in', ['draft', 'sent'])]}">
<label for="date_order" string="Order Date"/>
</div>
<field name="date_order" attrs="{'required': [('state', 'in', ['sale', 'done'])], 'invisible': [('state', 'in', ['draft', 'sent'])]}" nolabel="1"/>
<field name="show_update_pricelist" invisible="1"/>
<label for="pricelist_id" groups="product.group_product_pricelist"/>
<div groups="product.group_product_pricelist" class="o_row">
<field name="pricelist_id" options="{'no_open':True,'no_create': True}"/>
<button name="update_prices" type="object" string=" Update Prices" help="Recompute all prices based on this pricelist" class="btn-link mb-1 px-0" icon="fa-refresh" confirm="This will update all unit prices based on the currently set pricelist." attrs="{'invisible': ['|', ('show_update_pricelist', '=', False), ('state', 'in', ['sale', 'done','cancel'])]}"/>
</div>
<field name="currency_id" invisible="1"/>
<field name="tax_country_id" invisible="1"/>
<field name="payment_term_id" options="{'no_open':True,'no_create': True}"/>
</group>```
Is there a way i could make the quotation date visible or it's an access right thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个标签和日期字段用于显示属于
技术特性
组的用户的报价日期,第二个标签和日期字段用于显示有权访问销售订单的用户的订单日期。它应该具有草稿/发送报价的创建日期(不需要编辑)。
您可以通过删除
group
属性、将用户添加到Technical features
组或添加新组(如下所示)来使该字段对这些用户可见:The first label and date field are used to show the quotation date for users who belong to the
Technical Features
group and the second label and date field are used to show the order date for users who has access to the sale order.It is supposed to have the creation date of the draft/sent quotations (does not need to be edited).
You can make the field visible for those users by removing the
group
attribute, adding a user to theTechnical features
group, or by adding a new group like following: