在odoo的销售模块中,当客户想要创建新的销售报价单时,报价单日期不可见。因此,在开发人员模式下,我进入表单视图,意识到它有一个附加了不可见属性的属性。我尝试删除整个属性,但似乎不起作用,我只在开发者模式下看到它。我如何让这个字段对客户可见,以便输入报价日期,从而在前端反映出来?以下是代码:
<field name="date_order" nolabel="1" groups="base.group_no_one" attrs="{'invisible': [('state', 'in', ['sale', 'done', '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?
第一个标签和日期字段用于显示属于Technical Features
组的用户的报价日期,第二个标签和数据字段用于显示有权访问销售订单的用户的订单日期。
它应该有草稿/发送报价的创建日期(不需要编辑(。
您可以通过删除group
属性、将用户添加到Technical features
组或添加一个新组(如下所示(来使这些用户可见该字段:
<div class="o_td_label" groups="base.group_no_one,{GROUP_EXTERNAL_ID}" 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,{GROUP_EXTERNAL_ID}" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}"/>