odoo-9

Set default values for One2many field

无人久伴 提交于 2021-02-08 10:18:23
问题 I have a class student_student which have a one2many field result_ids defined like the following: result_ids = fields.One2many("schoolresults.detail", "student_id", "School Results", default="_get_subjects") and def _get_subjects(self): cr = self.pool.cursor() self.env return self.pool.get('schoolresults.subject').search(cr, self.env.uid, []) in the other side I have a class schoolresults_subject : class schoolresults_subject(models.Model): _name = "schoolresults.subject" _description =

Login to Odoo from external php system

旧时模样 提交于 2021-02-07 10:15:45
问题 I have a requirement where I need to have a redirect from the external php system to Odoo, and the user should be logged in as well. I thought of the following two ways to get this done: A url redirection from the php side which calls a particular controller,and pass the credentials alongiwth the url, which is not a secure option for obvious reasons A call of method using xmlrpc from php, and pass the necessary arguments along from php, use the arguments to sign in and then in the method over

Login to Odoo from external php system

跟風遠走 提交于 2021-02-07 10:15:28
问题 I have a requirement where I need to have a redirect from the external php system to Odoo, and the user should be logged in as well. I thought of the following two ways to get this done: A url redirection from the php side which calls a particular controller,and pass the credentials alongiwth the url, which is not a secure option for obvious reasons A call of method using xmlrpc from php, and pass the necessary arguments along from php, use the arguments to sign in and then in the method over

How to print a POS receipt from Sale Order?

馋奶兔 提交于 2021-02-04 19:42:32
问题 I need to print POS receipt from sale order with same products qty etc. In Sale order I have created a button "Print POS receIpt". with this button I want to trigger a method that prints out a receipt with sale order lines on it. So I need to find the method that creates POS receipts and pass the sale order line values to it. So which method is printing receipts in POS and how can I trigger it? Is it in models.js ? 回答1: In those Odoo versions, the receipts that are being printed in the POS

How to print a POS receipt from Sale Order?

ⅰ亾dé卋堺 提交于 2021-02-04 19:41:00
问题 I need to print POS receipt from sale order with same products qty etc. In Sale order I have created a button "Print POS receIpt". with this button I want to trigger a method that prints out a receipt with sale order lines on it. So I need to find the method that creates POS receipts and pass the sale order line values to it. So which method is printing receipts in POS and how can I trigger it? Is it in models.js ? 回答1: In those Odoo versions, the receipts that are being printed in the POS

Custom module doesn't show up in the list of apps

别来无恙 提交于 2021-01-23 04:49:24
问题 I am trying to install module from odoo 8 to odoo 9. I just copied over the whole folder to the addons folder in odoo 9 and was expecting that I can somehow install the module in odoo 9 but it doesn't show up in the list of apps to install. Is there anything changed in the structure of odoo that I have to prepare the module to show up in the apps list? Thanks in advance. 回答1: You do not see your modules/apps because you must update list of modules. First what you need is restart server .