I want to move the fields to a different notebook (or tab) in the view and hide the company field: invoice_policy (Invoice Policy), tic_category_id (TaxCloud Category), company_id (Company). However, I encountered an error, this is applicable to the fields mentions:
When i use "position=replace" the fields:
Element '' cannot be located in parent view
When i call the fields again to their new position:
Field "tic_category_id" does not exist in model "product.product"
Here's my code, i am inheriting the form view in Inventory module:
<record id="view_product" model="ir\.ui\.view\"\>
\ \ \ \ \ \ \ \ \<field\ name=\"name\"\>custom.product.product.form.inherit</field>
<field name="model">product.product</field>
<field name="priority" eval="6"/>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<!-- When i do this i don’t encounter an error —>
<field name="barcode" position="replace"/>
<!-- When i do this i encounter an error an error —>
<field name="invoice_policy" position="replace"/>
<group name="group_general" position="inside">
<!— No error here whenever i call the field —>
<field name="barcode"/>
<!— Error when calling again the invoice_policy, saying that it does not exist in product.product —>
<field name="invoice_policy"/>
</group>
</field>
</record>
I'm not sure why these 3 fields are experiencing an error and why i can't use the field again. As much as possible i don't want to use xpath. Although, i tried xpath, i still encountered the error above.
Please help. Thank you so much
You can visible the invisible field
field name="field_name" invisible="0"/>