Hi, can anyone tell me how can I align a float or number on Odoo 10? Thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
3
Replies
3306
Views
I get an error now (I don't think it's due to that): The error is as follow: Element odoo has extra content: record, line 4
Xml file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--Daily Transaction List View -->
<record id="daily_transaction_tree_view" model="ir.ui.view">
<field name="name">daily.transaction.tree</field>
<field name="model">daily.transaction</field>
<field name="arch" type="xml">
<!-- this will be our title of list/tree view -->
<tree string="Daily Transaction">
<!-- these will automatically map table headers for our list view, so we’ll select out column names of our model here -->
<field name="name"/>
<field name="date"/>
<field name="type"/>
<field name="amount" widget="char"/>
</tree>
</field>
</record>
<!--Daily Transaction Form View-->
<record id="daily_transaction_form_view" model="ir.ui.view">
<field name="name">daily.transaction.form</field>
<field name="model">daily.transaction</field>
<field name="arch" type="xml">
<!-- this will be our title of list/tree view -->
<form string="Daily Transaction" version="8.0">
<group>
<field name="name"/>
<field name="subject"/>
<field name="date"/>
<field name="type"/>
<field name="amount"/>
<field name="note"/>
</group>
</form>
</field>
</record>
<record id="action_daily_transaction" model="ir.actions.act_window">
<field name="name">Daily Transaction</field>
<!-- name of action -->
<field name="res_model">daily.transaction</field>
<!-- this action will be mapped to model specified -->
<field name="view_type">form</field>
<field name="view_mode">tree, form</field>
<!-- these are type of view our module will show for our daily transaction mode -->
<field name="search_view_id" eval="False"/>
<!-- here we specify id of our search view -->
<field name="context">{}</field>
<field name="help" type="html">Create new daily transaction.</field>
<!-- help text for our model -->
</record>
<!-- Main Menu Related Info -->
<menuitem name="Daily Transaction" id="base.daily_transaction_root" sequence="60"/>
<!-- Sub Menu Related Info -->
<menuitem id="menu_daily_transaction_root" name="Daily Transaction"
parent="base.daily_transaction_root" sequence="1"/>
<!-- Action Menu Related Info -->
<menuitem action="action_daily_transaction" id="menu_action_daily_transaction"
parent="menu_daily_transaction_root" sequence="20"/>
</odoo>
EDIT: Fixed...<field name="amount" widget="float" type="char"/>
What do you mean by align Float/number ?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Try widget='char'