Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to get pricelist date_end on report?

By
Andreas Marpmann
on 6/30/14, 7:19 AM 528 views

def _get_date_end(self, pricelist_id):
        pool = pooler.get_pool(self.cr.dbname)
        pricelist = pool.get('product.pricelist.version').read(self.cr, self.uid, [pricelist_id], ['date_end'], context=self.localcontext)[0]
        return pricelist['date_end']  

 

<para style="8_left">[[ formatLang (get_date_end(data['form']['price_list']), date=True) ]]</para>

That works at simple price lists, but not if the price list based on another price list.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/30/14, 7:19 AM
Seen: 528 times
Last updated: 3/16/15, 8:10 AM