Readonly views for Auditor option in Odoo 12 - security

Do we have readonly option for auditors in Odoo 12? we need to access whole system using readonly user for auditors.
Thanks,

Related

How add new option at sulu administration interface?

What steps should I follow to add a new option to the left menu of the SULU administration panel? Following the documentation I did not succeed.
To extend the admin menu you need to create a new "Admin" class in your src/Admin folder and extend from the Sulu Admin class and then:
<?php
namespace App\Admin;
use Sulu\Bundle\AdminBundle\Admin\Admin;
use Sulu\Bundle\AdminBundle\Admin\Navigation\NavigationItemCollection;
use Sulu\Bundle\AdminBundle\Admin\View\ViewCollection;
class EventAdmin extends Admin
{
const EVENT_LIST_VIEW = 'app.events_list';
public function configureNavigationItems(NavigationItemCollection $navigationItemCollection): void
{
$eventNavigationItem = new NavigationItem('app.events');
$eventNavigationItem->setView(static::EVENT_LIST_VIEW);
$eventNavigationItem->setIcon('su-calendar');
$eventNavigationItem->setPosition(30);
$navigationItemCollection->add($eventNavigationItem);
}
}
See more in the documentation here https://docs.sulu.io/en/2.2/book/extend-admin.html and I really can recommend to do https://github.com/sulu/sulu-workshop first to get into sulu.
If you get any error you should show the error instead of saying you tried and it did not work. Look for error in your browser dev tools console, network tab, symfony log or webservers log.

Acumatica - Web Service Endpoint for Custom Screen

We have created a new Custom Screen via a Customization project to display a header/detail list of custom data. Via the UI the screen is working and we are able to add/edit/delete header and detail records.
We are attempting to create a Web Service Endpoint link to this screen to allow access to the data via Web Services. When we attempt to call the Put on the entity we are getting back a Value must not be Null error message. We have supplied all the fields that are available with values and trace isn't showing what could be causing the error.
Is there anything we need to add to the DAC for Web Services?
Below are screenshots of the Custom Screen and the WSE Setup
OzPallets Custom Screen
OzPallets WSE Header
Chris, could you please comment on your choice of the PXFilter type to declare all data views in the OzPalletData BLC?
public class OzPalletData : PXGraph<OzPalletData>
{
public PXSave<OzPalletHeader> Save;
public PXCancel<OzPalletHeader> Cancel;
public PXFilter<OzPalletHeader> MasterView;
public PXFilter<OzPalletDetail> DetailsView;
}
I believe an issue should get resolved by data view declared as follows:
public class OzPalletData : PXGraph<OzPalletData>
{
public PXSave<OzPalletHeader> Save;
public PXCancel<OzPalletHeader> Cancel;
public PXSelect<OzPalletHeader> MasterView;
public PXSelect<OzPalletDetail,
Where<OzPalletDetail.palletNo, Equal<Current<OzPalletHeader.palletNo>>>> DetailsView;
}

Add current user to entity when created

I have created an entity with the help of the Yeoman generator. I chose not to create a DAO. The entity has a relationsship with User.
Now when I create an object I get to choose owner in a dropdown, but I would want to set owner to the currently logged on user. What's the best approach to do this?
I have tried
#Autowired
private Authentication authentication;
and
activity.setOwner((User) authentication.getPrincipal());
in the Resource Class, but this throws this exception
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.security.core.Authentication
Regards
Mattias
Well, I think all of your problem is in getting the current user.
So what make you stop from using the your.package.security.SecurityUtils.getCurrentLogin()?.
The above code will give you the login name. If you need either id or the user object as a whole, then you will need to fetch from DB. You can also use UserService to do so.

How to specify and organize OXM_METADATA_SOURCE in glassfish v4 MOXy Provider?

I am a fan of both Glassfish and MOXy, and it's good news for me that MOXy had been bundled into Glassfish v4.
I had read and tried a few of MOXy examples on the internet, I like the dynamic OXM_META_DATA_SOURCE part, since while providing RESTful services, the "client perspective" is very flexible than domain classes.
So here is the problem:
Different RESTful services can have different views from same domain classes, and in my work it's very common case. So there can be a lot of binding OXM metadata files for every service. And as we know a single OXM metadata file can only correspond to a single java package. So there will be much more OXM metadata files to maintain.
Back to JAX-RS, Is there any framework to design patterns or best practices to finish the mapping between OXM metadata file set and the service itself?
You can try new feature called Entity Filtering which has been introduced in Jersey 2.3. Even though Entity Filtering is not based on OXM_META_DATA_SOURCE you can achieve your goal with it:
Let's assume you have a following domain class (annotations are custom entity-filtering annotations):
public class Project {
private Long id;
private String name;
private String description;
#ProjectDetailedView
private List<Task> tasks;
#ProjectAnotherDetailedView
private List<User> users;
// ...
}
And, of course, some JAX-RS resources, i.e.:
#Path("projects")
#Produces("application/json")
public class ProjectsResource {
#GET
#Path("{id}")
public Project getProject(#PathParam("id") final Long id) {
return ...;
}
// ...
}
Now, we have 2 detailed views defined on domain class (via annotations) and the resource class. If you annotate getProject resource method with:
#ProjectDetailedView - returned entity would contain id, name, description AND a list of tasks from Project
#ProjectAnotherDetailedView - returned entity would contain id, name, description AND a list of users from Project
If you leave the resource method un-annotated the resulting entity would contain only: id, name, description.
You can find more information about Entity Filtering in the User Guide or you can directly try it in our example: entity-filtering.
Note 1: Entity Filtering works only with JSON media type (via MOXy) at the moment. Support for other media types / providers is planned to be added in the future.
Note 2: Jersey 2.3 is not integrated into any (promoted) build of GF 4.0. The next Jersey version that should be part of GF 4.0 is 2.4. We plan to release 2.4 in the next few weeks.

Disabling My Public Pages feature in Liferay

I am using Liferay 6.1.1 CE.
How can i disable add,manage and edit control (Dockbar) of a user's "My Public Pages" and "My Private Pages"?
Please find me some ideas?
http://vir-liferay.blogspot.in/2012/05/how-to-configure-dockbar-based-on-roles.html
this works for me....I fix it
try this thing. write this code in your portal-ext.properties
layout.user.public.layouts.enabled=false
layout.user.public.layouts.modifiable=false
layout.user.public.layouts.auto.create=false
similarly you found other options also.
I have the same problem and I looked for disable access to public and private pages.
The solution is to add these lines in your portal-ext.properties :
To disable access to private pages :
layout.user.private.layouts.enabled=false
layout.user.private.layouts.modifiable=false
layout.user.private.layouts.auto.create=false
to disable public pages :
layout.user.public.layouts.enabled=false
layout.user.public.layouts.modifiable=false
layout.user.public.layouts.auto.create=false
P.S : That's disable also the access to default portlets (Directory user list)
http://yoursite/web/yourusername/home
http://yoursite/user/yourusername/home

Resources