跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

  1. 主页
  2. 版块
  3. Odoo 安装指南
  4. Windows下安装UNO,配置AEROO_REPORT (Openoffice4已经升级为Python2.7.5版)

Windows下安装UNO,配置AEROO_REPORT (Openoffice4已经升级为Python2.7.5版)

已定时 已固定 已锁定 已移动 Odoo 安装指南
17 帖子 8 发布者 22.7k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • T 离线
    T 离线
    t11t11
    写于 最后由 编辑
    #7

    Conditional Sections (条件选择篇)

    Most generic directive for using conditional sections is “if”. For marking end of the conditional section use “/if”. Remember, this is paired directive, consisting of two containers and section between them.

    If we want to print conditional text if the the partner is Customer, the directive would look:

    <if test="objects[0].customer">
    This text is being printed when partner is a customer.
    </if>
    Here we can see paired directive, so you have to place two separate containers, one for the opening part of directive (if test=”objects[0].customer”), the other for closing part (/if). All that is between them will be placed on final document, when check-box named “Customer” on Partner object is marked.

    Similar to if-elif-else conditional section like it is in most programming languages, there is slightly complicated structure used instead. Consisting of “choose” paired directive, at least one “when” and one “otherwise” paired directives, it is possible to create switch like constructions.

    Following example shows how to create such conditional section:

    <choose>
    <when test="objects[0].customer">
    This text is being printed when partner is a customer.
    </when>
    <when test="objects[0].supplier">
    This text is being printed when partner is a supplier.
    </when>
    <otherwise>
    This text is being printed in all the other occasions.
    </otherwise>
    </choose>

    1 条回复 最后回复
    0
    • T 离线
      T 离线
      t11t11
      写于 最后由 编辑
      #8

      Loop Sections (循环篇)

      Now when we want to report on several objects, we have create loop for each object in the list. For this task paired “for” directive is being used. Paired – means, one container for opening, another container for closing.

      Remember example from Conditional Sections chapter. We will modify it to report all the customer names, from all selected partners.

      <for each="one_partner in objects">
      <if test="one_partner.customer">
      <one_partner.name>
      </if>
      </for>
      Please notice paired for directive with embedded conditional, if directive inside. Variable one_partner has been introduced, to hold temporary reference to each partner in objects list.

      1 条回复 最后回复
      0
      • T 离线
        T 离线
        t11t11
        写于 最后由 编辑
        #9

        Extra Functions (附加的功能)

        There are set of embedded functions defined for user convenience. These represent generic functionality that is commonly used for creating reports. Listing of these functions is not to be considered as complete, we may introduce more functions over time. Do not hesitate to ask, if you want some function to appear among them. All requests will be treated as a wish-list, and if the requested function will appear as commonly required item we will gladly include it in the embedded function list. You may place your motivated request on launchpad project bugs/blueprints sections. You can use our dedicated forum, if you are not familiar with launchpad. Reports with attached source code will receive somehow better attention, so may be implemented more sooner.

        You may vote for functionality by donating funds to this project and naming the functionality you would like to be implemented.

        For better reference we decided to split listing of functions by domains.

        Language related functions

        setLang - sets default language on template;
        gettext - gets translation for a given text;
        _ - same as gettext;
        getLang - gets current effective language of template;
        currency_to_text - converts floating point currency to it's written form;
        Mathematical functions

        sum_field - returns sum of named field from all objects in a list;
        sumif - returns sum of named field from conditionally selected objects in a list;
        Parameters:

        list_of_objects – list of objects that have field to sum;
        field_name – name of the numeric field to sum, expressed as string;
        condition – condition on which objects should be selected, expressed as string;
        Return Values:

        -
        Description

        Returns sum of named field from conditionally selected objects in a list.

        Statistical functions

        average - returns the average (arithmetic mean) of fields from all objects in a list;
        count - returns total count of objects in a list;
        count_blank - returns total count of objects in a list, where named field is empty;
        countif - Returns count of objects from a list, where fields meet condition;
        large - returns k-th largest numeric value in a list of objects;
        max_field - returns largest numeric value in a list of objects;
        min_field - returns smallest numeric value in a list of objects;
        small - returns k-th smallest numeric value in a list of objects;
        Time related functions

        dec_to_time - converts time to hh:min representation;
        time - time access and conversions;
        Barcode related functions

        barcode - converts code to barcode image;
        Helper functions

        asarray - returns named field from all objects as a list;
        asimage - converts binary data to image;
        bool_as_icon - translates boolean value to text string;
        browse - returns list of objects;
        chunks - splits list of objects into chunks;
        debugit - helps debugging templates;
        epl2_gw - insert EPL v2 'gw' command (use on Zebra & compatible printers);
        field_accuracy - returns accuracy for the OpenERP object's field;
        field_size - returns maximum size for named field;
        get_attachments - returns attachment(s) from an object;
        get_label - returns human readable name for the field;
        get_log - ;
        get_name - returns string representation for object;
        get_selection_item - returns human readable name for selection field's code;
        html_embed_image - embeds image on html templates
        html_escape - escapes HTML unsafe characters (New in v1.1.)
        http_builduri - builds string of URI attributes from dictionary(ies) (New in v1.1.)
        http_prettyuri - converts string URI safe format (New in v1.1.)
        include_document - ;
        insert-subreport - inserts Open ERP sub reports;
        itemize - Appends the given array with number of usefull attributes (New in v1.1.)
        safe - tries to safely evaluate expression;
        search - do a search returning list of OpenERP objects;
        search_ids - do a search returning only list of OpenERP object ids;

        1 条回复 最后回复
        0
        • JoshuaJ 离线
          JoshuaJ 离线
          Joshua 管理员
          写于 最后由 编辑
          #10

          非常好,谢谢楼主分享

          【上海先安科技】(joshua AT openerp.cn),欢迎关注公众号:openerp_cn

          1 条回复 最后回复
          0
          • W 离线
            W 离线
            wjjs2008
            写于 最后由 编辑
            #11

            请问楼主,report_aeroo; report_aeroo_ooo;是从网站的哪个位置下载的?怎么一直没有找到呢?

            1 条回复 最后回复
            0
            • T 离线
              T 离线
              t11t11
              写于 最后由 编辑
              #12

              http://www.alistek.com/en/products-catalogue/4-product_single/222-aeroo-reports-for-openerp-version-7x.html

              <pay with a tweet>

              点击一下,帮开发做做广告就可以下载了。 可惜tweet不能直接访问,这个自己想办法吧。

              1 条回复 最后回复
              0
              • 1 离线
                1 离线
                1348647581qq.com
                写于 最后由 编辑
                #13

                谢谢楼主哦。

                1 条回复 最后回复
                0
                • Y 离线
                  Y 离线
                  youring
                  写于 最后由 编辑
                  #14

                  超赞的分享,收藏!

                  -nologo -nofirststartwizard -headless -norestore -invisible -accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;
                  这个启动参数看不懂,记录一下:<br / http://wiki.openoffice.org/wiki/Framework/Article/Command_Line_Arguments br / http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Opening_a_Connection br / http://wiki.openoffice.org/wiki/Uno/Remote/Specifications/Uno_Remote_Protocol br />

                  1 条回复 最后回复
                  0
                  • 1 离线
                    1 离线
                    1348647581qq.com
                    写于 最后由 编辑
                    #15

                    请教楼主:按楼主的步骤过了一遍,当然我的是openoffice4的,步骤有一些变通。安装report_aeroo和reprot_aeroo_sample两个模块皆无问题。但是安装reprot_aeroo_direct_print和openoffice Help Addons时报错:[b]Warning! Unmet python dependencies!No module named cups[/b];
                    谢谢

                    1 条回复 最后回复
                    0
                    • T 离线
                      T 离线
                      t11t11
                      写于 最后由 编辑
                      #16

                      CUP 是lunix系统下的打印服务, 我也没有安装成功过.

                      1 条回复 最后回复
                      0
                      • M 离线
                        M 离线
                        matrowang
                        写于 最后由 编辑
                        #17

                        没有安装Gnome 则openoffice可以安装吗?

                        1 条回复 最后回复
                        0

                        • 登录

                        • 没有帐号? 注册

                        • 登录或注册以进行搜索。
                        • 第一个帖子
                          最后一个帖子
                        0
                        • 版块
                        • 标签
                        • 热门
                        • 用户
                        • 群组