Closed GoogleCodeExporter closed 9 years ago
参与人员:
Jeff
大小鱼
Joshua
结论:
1 account.payment.term->compute 方法 用于计算最后(收/付)款日期,
在生成会计凭证的时候,
将应(收/付)款项按日期维度进行拆分. 拆
分方法取决于 业务所选择的对应的 account.payment.term 记录.
概念类似于 按(收/付)款日期 进行的销售折扣.
2 财务报表的数据的方向 取决于本对象
A 凭证属于几大要素中的哪一类.(左边/右边)
B 用于报表的数据的正负
3 废代码
1836 行,覆盖了该对象代码.205-207 行代码完全是废代码.
4 _parent_store 可以参考技术文档介绍(Joshua提供) 具体作用,
待后续
估计用来改善性能的. 几个重要的一点, 比较耗时计算的对象都使用了它:
account.account
res.partner.category
product.category
stock.location
5 仅用于 年度结转时,
结转凭证的生成/更改.(更改固定的年度结转的凭证)
Original comment by mrshe...@gmail.com
on 13 Aug 2012 at 4:00
附件为YY频道录音文件
现金折扣又称销售折扣(sale
discount)。为敦促顾客尽早付清货款而提供的一种价格优惠。
现金折扣的表示方式为:2/10,1/20,,n/30,15E.O.M。例如,A公
司向B公司出售商品30
000元,付款条件为2/10,N/60,如果B公司在10日内付款,只须付29
400元,如果在60天内付款,则须付全额30,000。
现金折扣是企业财务管理中的重要因素,对于销售企业,现��
�折扣有两方面的积极意义:缩短收款时间,减少坏账损失。�
��作用是减少现金流量。因此,销售企业都试图将折扣率确定
在平衡正面作用和负面作用的水平之上。一般来说,购货企��
�会尽可能享受现金折扣,但仍取决于利息成本,如B公司决�
��受现金折扣,但仍取决于利息成本,如B公司决定享受现金
折扣,意味着B公司放弃50天使用29
400元以取得2%的折扣,相当于承提年息为14.9%(0.02/0.98×360/50��
�的利息成本,如果B公司能取得低于14.9%的资金,这一现金��
�扣无疑是有利的。
joshuajan (14:14:05)
http://www.openerp-china.org/index.php?page=account.account.type
joshuajan (14:14:48)
P&L / BS分类
Jeff (14:16:49)
financial_report_ref = {
'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr,
uid, 'account','account_financial_report_assets0')[1], context=context),
'liability': obj_financial_report.browse(cr, uid,
obj_data.get_object_reference(cr, uid,
'account','account_financial_report_liability0')[1], context=context),
'income': obj_financial_report.browse(cr, uid,
obj_data.get_object_reference(cr, uid,
'account','account_financial_report_income0')[1], context=context),
'ex
joshuajan (14:21:04)
还有年结
Jeff (14:23:39)
1695
Jeff (14:23:57)
1836
joshuajan (14:24:41)
老革命。
joshuajan (14:26:42)
used in conjunction with _parent_store flag on object, allows faster access to
tree structures (see also Performance
Optimization section)
joshuajan (14:29:03)
parent_left,
parent_right
和_parent_store对象属性一起使用,可以更快地访问树结构(也�
��性能
优化部分)
joshuajan (14:30:32)
避免的递归具有层次的对象(例如有parent_id关系的对象),��
�过加上parent_left和parent_right的整型字段,设置对象类型的_pare
nt_store 为
True。ORM会使用一个变形的前序遍历树能使到用某些查询(例�
��:child_of)在进行 递归查询的时候的复杂度为O(1)而不是O(n)
宅丶 在家 (14:33:37)
编程不会
joshuajan (14:36:27)
财务不会
宅丶 在家 (14:37:34)
HOHO
Jeff (14:37:47)
00417: term_pool = self.pool.get('account.payment.term')
00418: terms = False
00419: due_date = False
00420: default = {'date_due':False}
00421: if term_id and amount:
00422: terms = term_pool.compute(cr, uid, term_id, amount)
00423: if terms:
00424: due_date = terms[-1][0]
00425: default.update({
00426: 'date_due':due_date
00427: })
joshuajan (14:42:10)
播音乐
joshuajan (14:44:12)
8
Original comment by mrshe...@gmail.com
on 13 Aug 2012 at 8:30
Attachments:
Original issue reported on code.google.com by
mrshe...@gmail.com
on 12 Aug 2012 at 5:35