二开过程中新增了计算字段如果历史数据很多升级超级慢,大家是怎么克服的?
-
fields1 = fields.Char(string="xxxxxxx", compute="_compute_xxxxxxxx", store=True)
这种情况,大家怎么克服的?
或者说有没有其他方法来处理这个需求?期待先安科技的老师指点。
@digitalsatori 先安科技的老师救救我
-
@digitalsatori 先安科技的老师救救我
-
@zerone40 要看你的这个fields1字段是派什么用场的,以及这个compute字段是怎么写的,依赖的模型和字段是什么?
作用仅仅是为了计算出一个值 展示在视图上。
compute 方法也很简单
@api.depends("partner_id.email") def _compute_partner_info(self): for record in self: record.info = f"{record.name}<{partner_id.email}>"非常简单,如果有历史数据 4万条,升级时计算就已经很慢了
-
作用仅仅是为了计算出一个值 展示在视图上。
compute 方法也很简单
@api.depends("partner_id.email") def _compute_partner_info(self): for record in self: record.info = f"{record.name}<{partner_id.email}>"非常简单,如果有历史数据 4万条,升级时计算就已经很慢了
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login