I'm using th purchase app on OpenErp.
I know this field is declared on purchase.py and called on purchase_view.xml but strangely it doesn't appears when i'm trying to add a new product quotation or purchase, don't get me wrong, the app works, but i find it amusing that this field isn't showing at all.
This is the field code on purchase.py
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
And the call on purchase_view.xml
<field name="product_uom" groups="product.group_unidadmedida" on_change="onchange_product_unidadmedida(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
Both on the same class purchase_order_line btw
Any hint on this?
Would please check you have given rights of "group_unidadmedida" to your user?
You need to assign this group to your logged user to see Unit of Measure in Purchase order.
"Manage Multiple Units of Measure"
Go to the Settings --> Users --> Users. Open logged user record. Go to Access Rights tab and first tick the "Technical Features", save it, reload it. Again open the same user record from menu. Now you will see some more groups under "Technical Settings: separator. Tick the "Manage Multiple Units of Measure" , save it and reload it. Now again open Purchase order form and you will be able to see Product UOM inside it.
Related
I am trying to change the displayed name Vendors in the Purchase application. I was successful in changing the submenu name from Settings--> Technical--> User interface(menu items). Now when i select this submenu the page that gets displayed has 'Vendors' displayed on the left top and in the filters. How do i change Vendors to some other name wherever it occurs.
I am using odoo 12
there are two methods,
the simplest is to change the name for each action view (form, tree). See the photos
the second, the same thing but by editing the xml of action code by inheriting the targeted view in order to modify it.
i hope that's can help you
I used the maintenance equipement module of odoo 10 i created many records but those records were available only for admin, if another user creates a record that record will be availabe for the user and admin !
how can I make all records visible to all users?
That means, Odoo already defined a record rules for Maintenance Request. You can find it here, Settings -> Technical -> Security Record Rules (make sure you activated developer mode). And search for Maintenace Requests in the search box. You can find 2 record rules one for admin and another for non-admin users.
Either you can modify the existing domain rule or clear it.
Hope it will help you.
There are three ways to achieve this:
1) Security Record Rules - as described by KbiR you can use security record rules. Firstly activate the developer mode in settings and then in Technical/Security Record Rules you can track the view and change the rules so all fields will be visible to all users.
2) Front end view edit* - you can activate the developer mode, go to the view and then click the "Edit View" from the developer mode icon (top right corner). You will see the xml:
Now you can simply erase the "groups" - the field will be visible for everyone, add "invisible="1" " if you want to make a field invisible or change the group to a desired one.
this is not really recommended option(except for testing). If you leave it like this your changes might disappear after Odoo update(they will be reset to default).
3) Change using the custom module - if you changed the field using the hint from point "2" and it is visible you should make a module to keep changes permanent. You would simply inherit the view and update them with desired "groups".
Example:
The module Opportunity on Sales Order Form activate the hidden field using the code:
<field name="opportunity_id" position="replace">
<field name="opportunity_id"/>
</field>
It is replacing the "opportunity_id" field with "opportunity_id" field without any "groups". The effect is that the field is visible by everyone.
We are using OpenERP 7 to manage leads within our organisation.
Leads are created by incoming emails. When assigning to a different sales person, the sales person gets an email with the original email and the from address is the original person that emailed it.
This is a problem because it looks like the customer emailed them directly and encourages the sales person to manage the lead from their email, rather than sending responses from the OpenERP system. How can I stop this email from being sent? I want to make my own template and use an automatic action to send a notification.
There is no automatic action sending this email. I believe it is somewhere in the python code.
You can check the automated actions from OpenERP in the Settings/Technical/Scheduler/Scheduled Actions menu. Look for the actions that read incoming e-mails and de-activate it.
In fact, I saw an option in the Settings / Configuration / Sales menu. At the bottom of the page, you must have a group called 'Emails Integration' and in this group, you must have a line with a checked checkbox with 'Create leads from incoming mails' as label.
Uncheck this box and click on 'Apply' button at the top of the page.
I found a hack solution which I hope someone can improve.
Basically the email comes in and adds an entry to the table mail_message. The type is set as "email" and this seems to be the issue. If I change it to "notification", the original email does not get sent to the newly assigned salesperson which is the behaviour that I want.
Create a server action on the incoming email server that executes the following python code:
cr.execute("UPDATE mail_message SET type = 'notification' WHERE model = 'crm.lead' AND res_id = %s AND type = 'email' ", (object.id, ))
I'm facing a complex problem, at least for me.
I have a form called "Task", which contains all the normal info, and I would like to add users to that Task.
If I want to add multiple users to that task, I should use the widget one2many, am I right? If so, is it possible to display a dropdown or something and add the users already registered? Because, with the default one2many, I have to register the users (like a Form) and then I can add them..but if they are already in the table, it should appear me a dropdown menu or something..
After the task is created, the users should only see the task with their name, only administrator can view it all. I think that to achieve this I need to create rules, right? If so, do I need to create them by code or could I use the openERP rule menu? And this will be enough: ('user_id', '=', user.id)]? The first column "user_id" is created on "Task" table?
I do not need to have a auxiliary table that would contain something like: id, task_id, id_user..and by this I could get which tasks belongs to whichs users??
Thanks guys
For your cases:
You can try using Many2Many relation so as to choose the record of users.
Use Groups to obtain your desired result.
For example:
<field name="user_id" groups="your_group" />
By doing this you can provide what fields to be visible to which user based on access rights provided in your GROUPS.
(All code is some kind of pseudocode, just for better reading
I have an Invoice model:
class Invoice(models.Model):
// many fields here
I need to attach some products (with price for unit, and quantity fields) to this invoice, so I made additional table:
class InvoiceProduct(models.Model):
product = models.ForeignKey
quantity = models.IntegerField
unit_price = models.DecimalField
invoice = models.ForeignKey(Invoice)
So, this is almost first question — «Could it be done better way?»
My second problem is, that in django admin I have manage these models by inlines:
Screenshot
But my customer wants otherwise. He wants one button (Add product) then pop-up windows appears, with fields:
product, quantity, unit price. He fills them, press OK. Then pop-up window closes and line with "product fields" appears in main form.
I suppose I need override admin form template? Or I need to write my own widget or smth like that?
Sorry for my English.
My suggestion for your customer's request
He wants one button (Add product) then pop-up windows appears, with fields: product, quantity, unit price. He fills them, press OK.
Do NOT use the django admin for this. Only use it for people who want to access the data almost directly. In my head I see it just one half step up from the database itself. This means it is not suitable for users rather than administrators.
Or I need to write my own widget or smth like that?
Yes