跳转至内容

Odoo 开发与实施交流

No decsciption available
2.3k 主题 10.5k 帖子
  • 关于不确定价格的采购与销售管理

    2
    0 赞同
    2 帖子
    1k 浏览
    尚无回复
  • 可以在列表内打开一行

    2
    0 赞同
    2 帖子
    785 浏览
    尚无回复
  • Odoo9.0仓库加载后,显示的错误。怎么做。

    5
    0 赞同
    5 帖子
    2k 浏览
    JoshuaJ

    楼主的版本是最新的吗,我运行了最新的版本并且安装stock,点进去是正常的。你可以尝试下载并使用新版本的OdooV9。
    [attach=1]

  • Odoo9的看板项目应用案例

    5
    0 赞同
    5 帖子
    3k 浏览
    W

    多谢指正啊。
    kanban和dashboard确实有少许区别,不过odoo的dashboard可以看做是kanban的升级,其功能和配置都来自于kanban。

    dashboard可用发挥的场合还是很多的。

  • GreenOdoo-8.0-win32 绿色安装包 有32位 64位之分吗,在64位win7系统下报错

    2
    0 赞同
    2 帖子
    1k 浏览
    尚无回复
  • Functional Fields的一个例子

    7
    0 赞同
    7 帖子
    5k 浏览
    佳先生

    [quote author=Peter Seng link=topic=5748.msg14197#msg14197 date=1360812735]
    假设我们创建了一个contract对象:

    <br />class hr_contract(osv.osv):<br />&nbsp; &nbsp; _name = &#039;hr.contract&#039;<br />&nbsp; &nbsp; _description = &#039;Contract&#039;<br />&nbsp; &nbsp; _columns = {<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;name&#039; : fields.char(&#039;Contract Name&#039;, size=30, required=True),<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;employee_id&#039; : fields.many2one(&#039;hr.employee&#039;, &#039;Employee&#039;, required=True),<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;function&#039; : fields.many2one(&#039;res.partner.function&#039;, &#039;Function&#039;),<br />&nbsp; &nbsp; }<br />hr_contract()<br />


    如果添加一个字段要通过看它的current contract来检索员工,我们使用functional field。对象hr_employee这样继承:

    <br />class hr_employee(osv.osv):<br />&nbsp; &nbsp; _name = &quot;hr.employee&quot;<br />&nbsp; &nbsp; _description = &quot;Employee&quot;<br />&nbsp; &nbsp; _inherit = &quot;hr.employee&quot;<br />&nbsp; &nbsp; _columns = {<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;contract_ids&#039; : fields.one2many(&#039;hr.contract&#039;, &#039;employee_id&#039;, &#039;Contracts&#039;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;function&#039; : fields.function(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _get_cur_function_id,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type=&#039;many2one&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj=&quot;res.partner.function&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; method=True,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string=&#039;Contract Function&#039;),<br />&nbsp; &nbsp; }<br />hr_employee()<br />



    这里有三个[color=red]note[/color]:
    [list type=decimal]
    [li]type =’many2one’是因为function field 必须生成一个一个many2one field;function is declared as a many2one in hr_contract also.[/li]
    [li]obj =”res.partner.function” is used to specify that the object to use for the many2one field is res.partner.function.[/li]
    [li]We called our method _get_cur_function_id because its role is to return a dictionary whose keys are ids of employees, and whose corresponding values are ids of the function of those employees. The code of this method is:[/li]
    [/list]

    <br />def _get_cur_function_id(self, cr, uid, ids, field_name, arg, context):<br />&nbsp; &nbsp; for i in ids:<br />&nbsp; &nbsp; &nbsp; &nbsp; #get the id of the current function of the employee of identifier &quot;i&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; sql_req= &quot;&quot;&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; SELECT f.id AS func_id<br />&nbsp; &nbsp; &nbsp; &nbsp; FROM hr_contract c<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LEFT JOIN res_partner_function f ON (f.id = c.function)<br />&nbsp; &nbsp; &nbsp; &nbsp; WHERE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (c.employee_id = %d)<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;&quot; % (i,)<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; cr.execute(sql_req)<br />&nbsp; &nbsp; &nbsp; &nbsp; sql_res = cr.dictfetchone()<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; if sql_res: #The employee has one associated contract<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; res[i] = sql_res&#91;&#039;func_id&#039;]<br />&nbsp; &nbsp; &nbsp; &nbsp; else:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #res[i] must be set to False and not to None because of XML:RPC<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # &quot;cannot marshal None unless allow_none is enabled&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; res[i] = False<br />&nbsp; &nbsp; return res<br />



    [size=12pt][color=red]这是官方的文档,有的地方我做了小小的翻译,有的地方我怕翻译错了给帮助我的人带来不便。我主要是三个note不是很理解原理也不清晰,希望版主或者哪位大哥今天心情舒爽,能够指点指点!谢谢![/color][/size]
    [/quote]

    请问怎么返回html类型??并且在视图内显示出来。。。返回的html是img

  • 如何解决复制表单是字段有唯一约束???

    9
    0 赞同
    9 帖子
    3k 浏览
    佳先生

    ok,已经搞定了,重写copy方法。。

  • Odoo9中website翻译存在问题

    4
    0 赞同
    4 帖子
    2k 浏览
    W

    楼主 怎么解决的 我也碰到这问题了 翻译后的网页编辑器编辑不了

  • 怎么限制text的输入字数??

    2
    0 赞同
    2 帖子
    845 浏览
    尚无回复
  • 0 赞同
    4 帖子
    3k 浏览
    A

    非常感谢! 🙂
    我设置仓库的批次跟踪方式。
    但是销售是否可以根据批次完成价格定制?

  • OpenERP 关于rml报表的修改

    13
    0 赞同
    13 帖子
    13k 浏览
    W

    刚接触没几天,正要修个页眉和页脚,看出来点思路来了,谢谢分享

  • Odoo V9的一个大变化

    8
    0 赞同
    8 帖子
    5k 浏览
    A

    Automatically transition sessions from Draft to Confirmed when more than half the session's seats are reserved.
    当预定的座位数量大于50的时候,工作流状态自动从草稿,变成确认状态。
            <record model="workflow.transition" id="session_auto_confirm_half_filled">
                <field name="act_from" ref="draft"/>
                <field name="act_to" ref="confirmed"/>
                <field name="condition">taken_seats &gt; 50</field>
            </record>

  • 修改产品视图中的字段长度

    9
    0 赞同
    9 帖子
    6k 浏览
    佳先生

    [quote author=Joshua link=topic=16495.msg28482#msg28482 date=1405410922]
    [quote author=wanjin6666 link=topic=16495.msg28481#msg28481 date=1405404859]
    [quote author=Jeff link=topic=16495.msg28453#msg28453 date=1405007095]
    跑偏了

    请新建模块用继承的方式修改
    [/quote]

    你好,Jeff!请问如果通过继承来修改字段长度,下面的代码是否正确?

    # -- encoding: utf-8 --

    from osv import osv, fields
    class product_variants(osv.osv):
        """
        修改产品模版表variants字段长度为1500,
        """
        _inherit = "product.product"
        _columns = {
            'variants': fields.char('Variants', size=1500)
            }
    product_variants()
    [/quote]
    正确,如果要改成是text不用改视图,直接:

    &#039;variants&#039;: fields.text(&#039;Variants&#039;)


    [/quote]


    请问text能限制输入字数吗??

  • 分享:OpenERP不进行二次开发的情况下,导出含订单明细的excel对账单

    17
    0 赞同
    17 帖子
    13k 浏览
    I

    好帖子,一定要mark

  • Erp 怎么实现树形结构

    5
    0 赞同
    5 帖子
    4k 浏览
    I

    坐等楼主分享

  • 订单tree 视图显示是否退货

    11
    0 赞同
    11 帖子
    6k 浏览
    I

    mark,这个需求很典型

  • 不能根据销售订单生成生产订单

    4
    0 赞同
    4 帖子
    3k 浏览
    Z

    我先前也碰到这样的问题,你下个绿色版的看看。有些版本有bug的

  • Odoo9.0仓库模块问题请教。

    2
    0 赞同
    2 帖子
    1k 浏览
    尚无回复
  • 请教!create事件无效~

    7
    0 赞同
    7 帖子
    3k 浏览
    Q

    digitalsatori兄,我已重启服务并且更新模块不下于10次,甚至还重启过系统 :-[

  • 请问在odoo中,可以用boostrap来美化页面吗?

    2
    0 赞同
    2 帖子
    1k 浏览
    尚无回复