Odoo Ayuda

0

0
9 Answers
3
Avatar

Cybrosys Techno Solutions Pvt.Ltd

--Cybrosys Techno Solutions Pvt.Ltd--
Cybrosys Technologies
https://www.cybrosys.com
16262
| 7 6 10
Calicut, India
--Cybrosys Techno Solutions Pvt.Ltd--

Cybrosys Technologies is a private limited ISO certified company in Technology and Software Engineering sector. We serve as one of the best and trusted Odoo official partner, providing ultimate Customization and Implementation services in Odoo ERP. A frequent contributor to Odoo Apps, our customized free apps are downloaded by more than one lakh users. Most of our apps augment the potentialities of Odoo and are trending in the Odoo app store.

Cybrosys keeps privilege to be one among the finest Odoo Official Partners with 200+ free apps contribution towards the Odoo community. Cybrosys also stands number one in Odoo-social Media Integration empowering every kind of business solutions.

We are also enriched with highly skilled UI/UX technical experts for Developing, Implementing and Designing, thereby providing ultimate benefit to our customer base.

Today Cybrosys has reached par excellent in Odoo Implementation and allied services, proving its credibility and reliability. Our proven services are used by customers sprawling across 160+ countries including Middle East, African continents, UK, Germany, Spain, Thailand, Hong Kong, New Zealand, Australia, Malaysia, Singapore, Egypt etc.

We are rapidly expanding our base with robust quality management and business process re-engineering to meet the ultimate customer desire.

To know more about Cybrosys Technologies and our Odoo Apps, Kindly visit:

Cybrosys Technologies 

Odoo Apps 

And inbox us your queries to odoo@cybrosys.com

Cybrosys Techno Solutions Pvt.Ltd
3/6/19 2:20

Try This :-

<span t-esc="'%.0f'% field_name"/>


1

Hello Try this

10.1223 should  be your_field_name

<t t-esc=" '%.0f' % 10.1223"/> prints 10
<t t-esc=" '%.1f' % 10.1223"/> prints 10.1
<t t-esc=" '%.2f' % 10.1223"/> prints 10.12
1
Avatar

Jignesh Mehta

--Jignesh Mehta--
11429
| 7 6 10
Surat, India
--Jignesh Mehta--
General Summary :-
- Odoo (Formerly OpenERP) Technical & Functional Expert.
- Worked as Project lead on Jewellery Manufacturing ERP.
- Having 3+ years of strong experience in odoo module development.
- Work for 3+ odoo customization to international & national clients.

Module Developments :-
- Develop Jewellery Manufacturing ERP from Scratch.
- Work in Several Modules like CRM, Sales, Purchase, Account, Inventory HR, Payroll, Website, etc.
- Work in Odoo themes which is Business and E-commerce.

Report Development :-
- Develop several Qweb and Excel Reports.

Code Migration :-
- Migrate code from Odoo9.0 to Odoo12.0 of Jewellery Manufacturing ERP.
Jignesh Mehta
3/6/19 2:07

Hello LaoThai,


Try This :-

<span t-esc="'%.2f'% field_name"/>


Hope it will works for you.

Thanks,

1 Comentario
LaoThai
3/6/19 2:23

Hello Jignesh, I wite a custom addons to do that, so i need to call the function get_display_price in models.js ( inside point_of_sale ). and then, use that function to show the data without decimal in that field. But when i call this function in my customJs file, it cann't call and give me an error: Unexpected token .

0
Avatar

Rishan Malaka

--Rishan Malaka--
--Rishan Malaka--

Software Engineer(Odoo) - Capital TRUST Information Technologies (Pvt) Ltd.

Rishan Malaka
3/6/19 2:17

You can change this from odoo core,

for that go to the point_of_sale module and follow below path to fin the pos.xml file.

point_of_sale -> static -> src -> xml -> pos.xml

under above file change the Total field value  <t t-esc = "widget.format_currency (order.get_total_with_tax ())" />  to
<t t-esc = "order.get_total_with_tax ()" />

<tt-name = "PosTicket"> 
<div class = "pos-sale-ticket">

<div class = "pos-center-align"> <tt-esc = "order.formatted_validation_date" /> <t t -esc = "order.name" /> </ div>
<br />
<t t-esc = "widget.pos.company.name" /> <br />
<div class = "receipt-phone">
Phone : <t t-esc = "widget.pos.company.phone || ''" /> <br />
</ div>
<div class = "receipt-user">
User: <t t-esc = "widget .pos.get_cashier (). name "/> <br />
</ div>
<br />
<tt-if = "receipt.header">
<div style = 'text-align: center'>
<t t-esc = "receipt.header" />
</ div>
<br />
</ t>
<table class = 'receipt-orderlines'>
<colgroup>
<col width = '50%' />
<col width = '25% '/>
<col width =' 25% '/>
</ colgroup>
<tr t-foreach = "orderlines" t-as = "orderline">
<td>
<t t-esc = "orderline.get_product (). Display_name" />
<t t- if = "orderline.get_discount ()> 0">
<div class = "pos-disc-font ">
With a <t t-esc =" orderline.get_discount () "/>% discount
</ div>
</ t>
</ td>
<td class = "pos-right-align">
<t t-esc = "orderline.get_quantity_str_with_unit ()" />
</ td>
<td class = "pos right-align ">
<t t-esc =" widget.format_currency (orderline.get_display_price ()) "/>
</ td>
</ tr>
</ table>
<br />
<table class = 'receipt-total' >
<tr>
<td> Subtotal: </ td>
<td class = "pos-right-align">
<t t-esc = "widget.format_currency (order.get_total_without_tax ())" />
</ td>
</ tr>
<t t-foreach = "order.get_tax_details ()" t-as = "taxdetail">
< tr>
<td> <tt-esc = "taxdetail.name" /> </ td>
<td class = "pos-right-align">
<tt-esc = "widget.format_currency (taxdetail.amount)" />
</ td>
</ tr>
</ t>
<tr>
<t t-if = "order.get_total_discount ()> 0 ">
<td> Discount: </ td>
<td class = "pos-right-align">
<t t-esc = "widget.format_currency (order.get_total_discount ())" />
</ td>
</ t>
</ tr>
<tr class = "emph ">
<td> Total: </ td>
<td class =" pos-right-align ">
<! - <t t-esc =" widget.format_currency (order.get_total_with_tax ()) "/> ->
<t t-esc = "order.get_total_with_tax ()" />
</ td>
</ tr>
</ table>
<br />
<table class = 'receipt-paymentlines'>
<t t-foreach = "paymentlines" t-as = "line">
<tr>
<td>
<t t-esc = "line.name" />
</ td>
<td class = "pos-right-align ">
<tt-esc =" widget.format_currency (line.get_amount ()) "/>
</ td>
</ tr>
</ t>
</ table>
<br />
<table class = 'receipt-change '>
<tr> <td> Change: </ td> <td class = "pos-right-align">
<t t-esc = "widget.format_currency (order.get_change ())" />
</ td> </ tr>
</ table>
<tt-if = "receipt.footer">
<br />
<div style = 'text-align: center'>
<t t-esc = "receipt.footer" />
</ div>
< / t>
</ div>
</ t>


then you can find the change on layout. using that logic you can do your works.
1 Comentario
LaoThai
3/6/19 2:20

I know, but I don't want to change the core code, i want to write my custom addons to update this. In JS file, I can't call the function of models.js at point of sale to use this function and make it clear. Any ideas?

Realizar una pregunta
Writer
Keep Informed
1 seguidor(es)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now