This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
in Odoo 8.0, I am trying to calculate the sum of payments made by a customer according to the customer's id. I wrote the following code but this hasn't helped at all. If any suggestions or help, you are more than welcome
def _get_sum_invoices(self, cr, uid, ids, field_name, arg, context=None):
res = dict(map(lambda x: (x, 0), ids))
# The current user may not have access rights for sale orders
try:
for partner in self.browse(cr, uid, ids, context):
setOfInvoices = self.env['account.invoice'].search([('id', "in", partner.invoice_ids)])
total = 0
for invoice in setOfInvoices:
total += invoice.amount
res[partner.id] = total
except:
pass
return res
_columns = {
'sum_payments': fields.function(_get_sum_pay, string='# SUM', type='float'),
'total': fields.one2many('account.invoice', 'partner_id','Sum Of Payments')
}
How To add button in header in tree view when i add with button tag it applied in every field i need only one time in header section if idea anyone then plz say me
I would like to add Skype field to partner form to store Skype Name of our partners. I follow the instruction but I don't know what type of field to choose. Should it be char or text?
I was testing the flow of products from manufacturing to sales, later i noticed the items that are in done state in stock moves cant be deleted. whats the solution to this?
I configured an Odoo 8 instance, using my company actual domain, and actual email user logins/passwords…
Config A… 1. Entered an enquiry@mycompanyname.com as company email via "Configure your company data" in General Settings. 2. Applied my company's actual domain name as the Alias Domain in General Settings. 3. Restarted the instance after the steps above. 4. Created an outgoing SMTP using smtp.gmail.com. Deleted the localhost entry. There was only one outgoing mail server entry 5. Created 2 users' incoming mail servers entries, using users' actual company email accounts that exist in company mail server. 6. Applied the actual users' email addresses as Messaging Alias in the respective User Preference. 7. I did not delete mail.catchall.alias entry in system parameters.
With this config, I was able to successfully a. Send Reset Password Instruction to users' company email accounts b. Send a new email to the the 3rd gmail account from a user within Odoo. c. Receive emails from a 3rd gmail account, to the 2 users' message inboxes within Odoo d. Reply the emails sent by 3rd gmail account from user's message inboxes.
However, whenever I made just this change… Config B… 1. Replaced the out outgoing mail server from smtp.gmail.com to one of the users' valid company email accounts tested in Config A above, then a. Failed: Send Reset Password Instruction to users' company email accounts b. Failed: Send a new email to the the 3rd gmail account from a user within Odoo c. Passed: Receive emails from a 3rd gmail account, to the 2 users' message inboxes within Odoo d. Failed: the emails sent by 3rd gmail account from user's message inboxes failed. 2. The file attached is an error message when I attempted to Send Reset Password Instruction. All other action did not have any pop up messages. Only shown as a liner record showing Delivery Failed in General Settings->Email:Emails
When I reverted back to smtp.gmail.com, then everything worked again.
My desire is to have external party sees my company domain in messages sent out from Odoo messaging, instead of seeing the gmail.com account address. I was using company smtp server thinking that I could achieve this desire. May I know if there is anyone who could help, what can I do to achieve the stated desire.
We have an implementation on sales.order that worked correctly until last week. Suddenly, some of the custom fields disappeared. If I check the FormView in debug, it shows the correct xml, but the UI is wrong.
Tests:
- Recovered a Monday backup, the UI is OK (lets call it "working" DB).
- Check modules: Although there where some differences, installing and/or removing them didn't change anything. Module Drop shipping was in the "fault" DB and not in the "working" and Sale_service module was in the "working" DB but not in the "fault" one. Once this differences were solved, the problem persists and the same modules are installed in both DB.
- A diff between FormViews confirmed that they are exactly the same. Even select arch from ir_ui_view where id = 566; returns the same content in both DBs.
- Checked all possible configuration issues (menu, views…) everything is the same.
There is a symptom which I can't relate to the problem. Although module Product & pricelist Module is installed. The menu Sales/Configuration/pricelist is not shown in the "faulty" database.
Changes prior to the error The only change done on the database was activating the Manage multiple locations and warehouses and Manage advanced routes for your warehouse options to create a Quotation from a Sale order. As far as I know no other changes were applied (there's another user with admin rights, but he claims that no change was done).
A solution could be restoring the backup, but that will only cover the issue that could raise at any moment if I don't find it's source. And users would loose their job from monday.
How to Set Default Debit Account and Default Credit Account for Opening Entries Journal in odoo 8 And I want to know "Opening Expense Account" Internal Type="Regular" and Account Type="Expense" and set Default Debit Account Account Code ? and Parent Account ?
"Opening Income Account" Internal Type="Regular" and Account Type="Income" and set Default Credit Account
I like to add some fields in the warehouse so I added the class with columns in the stock.py. But it shows error. I can not find what the error is.
The error message is
Traceback (most recent call last): File "/home/rck/Desktop/odoo-8.0/openerp/http.py", line 539, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/rck/Desktop/odoo-8.0/openerp/http.py", line 590, in dispatch return self._json_response(result) File "/home/rck/Desktop/odoo-8.0/openerp/http.py", line 528, in _json_response body = simplejson.dumps(response) File "/usr/local/lib/python2.7/dist-packages/simplejson/__init__.py", line 366, in dumps return _default_encoder.encode(obj) File "/usr/local/lib/python2.7/dist-packages/simplejson/encoder.py", line 269, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/local/lib/python2.7/dist-packages/simplejson/encoder.py", line 348, in iterencode return _iterencode(o, 0) File "/usr/local/lib/python2.7/dist-packages/simplejson/encoder.py", line 246, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: product.step1() is not JSON serializable
My py code in stock.py is
class product_step1(osv.osv): _name = "product.step1"