Odoo: Change One2many "add new line" behaviour - python-3.x

I have made a custom model and for a user to make an order they have to 1) click on add new line, 2) either select one of the products from the list or 3) click on search more, and search for the desired product.
As shown above these are a lot of steps given they can be adding more than 50 items during 1 order
I want to change the behavior of the hyperlink "add new line" of a one2many field, to directly open the full view of the products (as if a user clicked search more) then return the result back to the one2many field.

Related

Unable to view details of modified by on Custom List

As mentioned in the title above, I've added Created by and Modified by column field in my custom list.
But however, when i added a new item into the list, I was not able to see my name or the person's name, that creates the item.
Would like to know what are the possible reasons to this issue.
UPDATES:
Here is the issue i'm facing.
First of all you dont need to add CreatedBy, CreatedDate, ModifiedBy, ModifiedDate columns to lists these are added by default.
All you have to do is to edit the default view and add the columns to the default view, if you have a custom view edit it and add the columns.
When you add a column you get the option to add it to default view.
Doing the above will show the columns in the view.
How to change the view
Goto List Settings (Gear icon on right if O365 or Top Ribbon Menu)
On the bottom you will find the "Views" section
Click the "All Items" now you can see all the available columns the Created and CreatedBy will be there just tick it and remove your columns.
Press ok your columns will be displayed in the view with correct values.

Netsuite custom field does not display data in search results

I'm new to Netsuite, so please bear with me. I have created a saved item search that is working fine with one exception; one of the result columns I have chosen is not displaying data in the returned rows. This is a custom field created by our old Netsuite Administrator and it does display data on an item record, just not in search results. I've done some searching and thought I found the problem when I read another post that said that "Global Search" and "Show In List" needed to be checked on the custom field. I did that, but the search results still do not display any data for that column.
The field is a custom item field of the type decimal number. Store value, show in list and global search is checked. The field is applied to inventory items, non-inventory items, kit/package and assembly/bill of materials. What am I missing? TIA
I suspect the field has field level access permissions. Go to the field definition and click the 'Access' tab. The 'Default Level or Searching/Reporting' should be at least 'Run'.
Global Search on a field makes it so if you enter a value in the Global Search bar that matches the field's value for an item then that item will be shown as a possible match. It has nothing to do with your issue. Neither does Show in List.

Powerapps: button selection on a previous screen prefill a field in a form

I am attempting to build an app with Microsoft powerapps that will be writing/reading data to/from an excel sheet.
I have created a form in powerapps from a table in the excel sheet. I am curious to know if anyone knows how to fill the data in a field based on a button selection on a previous screen.
As an example let's say the following fields are in the form; Location, Action, Item, Username.
This is what I am imaging and would like to do;
I would like the first two fields to be filled by selecting buttons on a previous screens instead of a drop down menu in the edit form view. the last two field can be filled by inputting text on a thirds screen.
The flow:
Screen1; presents two 4 locations in the form of buttons*doesn't necessarily have to be a button but function like one.
4 locations: NY, LA, AZ, LN
when users selects "NY" button, "NY" is filled/stored in to the "location" field in the form and the screen navigates to the next page where the user will select the actions.
Screen2; presents two 2 actions in the form of button.
2 Actions: remove, add
when users selects "remove" button, "remove" is filled/stored in to the "action" field in the form and the screen navigates to the next page where the user will fill the other two fields in a text field.
Screen3; has two text fields where user can fill in the rest of the information for item and user name. Location and Action should be prefilled at this point. When the user submits the form all data is submitted and a row is created in the excel table with all the information captured.
any information how to make a button selection on a previous screen prefill a field in a form that would be awesome! thank you for reading.
It sounds like you want to use a collection. A collection can be used similar to a global variable and will allow us to access data on a different screen than the one we set it on.
Some useful information can be found here:
https://powerapps.microsoft.com/en-us/tutorials/working-with-variables/#create-a-collection
https://powerapps.microsoft.com/en-us/tutorials/function-clear-collect-clearcollect/
Based off of your flow, let's assume that the screens are named as follows:
Screen1 will be "SpecifyLocation"
Screen2 will be "SpecifyAction"
Screen3 will be "FinalizeInput"
The names are arbitrary, but I think they'll make the following example easier to follow.
On the screen "SpecifyLocation", we're going to create four buttons. They will all be identical, except for the name of the location they reference. For instance, the button referencing "NY" would be as follows:
Text = "New York"
OnSelect = ClearCollect( LocationMetadata, "NY" ); Navigate(SpecifyAction,ScreenTransition.Cover)
Please note that the OnSelect value is two different functions separated by a semicolon. The first function, ClearCollect(), clears all information in a collection and then writes a new entry. In this case, we have a collection named LocationMetadata into which we are writing the value "NY". The second function, Navigate(), changes which screen we are looking at.
On the screen "SpecifyAction", we're going to create two buttons. They will be similar, except for the action they refer to. For instance, the button referencing "Add" would be as follows:
Text = "Add"
OnSelect = ClearCollect( ActionMetadata, "Add" ); Navigate(FinalizeInput,ScreenTransition.Cover)
As was the case before, we've created a button that calls two functions when clicked. They are the same two functions as last time; however, we've changed LocationMetadata to ActionMetadata in our ClearCollect() call, since we want to store a different piece of information. We've also changed our Navigate() call to move us over to the "FinalizeInput" screen.
I'm not entirely sure how you've got your final screen laid out, but in any case, you'll want to access the data we stored in collections previously. This can be done with the function First(), which returns the first element of a collection.
To access our selected location, you can use: First(LocationMetadata).Value
To access our selected action, you can use: First(ActionMetadata).Value
You should be able to supplement whatever extra data is collected from your user on this final screen with the collections we set up.

Netsuite Inventory Item Custom Forms keep changing

We have created a custom form for certain inventory items in Netsuite. When we want to go back and edit that inventory item, it automatically goes back to our default custom form. We manually have to change the form back to what we want to use each time we edit these types of items.
Is there a way to have it so when these specific items are opened to edit that it will always go to the custom form that we originally created it on?
No need to create a workflow/script. You just need to set the custom form to "Store Form with Record".
Customize the form and checked the option that says "Store Form with Record".
Every time you create an Item Record select the form and fill in the necessary information and save it. After saving it the form will be automatically saved with the record and it will be used every time you edit and view the record.
Definition of "Store Form with Record"
Check this box to store this custom form with each record entered with this form.
This ensures that your records are viewed and edited with this form regardless of who is viewing or editing the record.
Options:
1. Add the custom form to the menu and choose that menu item when editing those types of inventory items.
Write a workflow (SuiteFlow) that opens the correct form based on the inventory item type.
Write SuiteScript that will open the correct form based on the inventory item type.

How to invoke second page only when List data moves to it

I am creating client invoice statements. Clients sometimes have a large number of invoices. The report has two sections. The first is the header, with company and client address info, etc. The second part is a list containing the invoices.
If a client has a large number of invoices, a second page, which is a copy of the first, is created. Since it is a copy, it has all of the header information, which I don't want. Also, at the end of page 1, I want to add some text like "invoices continue next page" or similar.
How do I tell the list to break at the bottom of the page and continue on a second page?
This can be done using Page Set objects. Here are the steps:
Create the page with the client table (called Page1 going forward)
Create another page with the invoice list (called Page2 going forward)
Click on 'Report Pages' within 'Page Explorer'
Drag over a 'Page Set' object (called 'Page Set1' going forward)
Set the 'Query' property of 'Page Set1' to the query you are using
Click on the 'Grouping & Sorting' property of 'Page Set1'
Drag over the data item that identifies a unique clients (e.g. Client Key, Client Code etc.) and drop it in the 'Groups' folder and click OK
Drag 'Page1' and drop it in the 'Detail Pages' folder under the page set
Drag over a new 'Page Set' object and drop it in the 'Detail Pages' folder under 'Page Set1' (called 'Page Set2' going forward)
Set the 'Query' property of 'Page Set2' to the query you are using
Click on the ellipses button on the 'Master Detail Relationships' property of 'Page Set2'
In the dialog that appears click on the 'New Link' button
Select the column in both lists that represents the unique client data item and click OK
Drag 'Page2' and drop it in the 'Detail Pages' folder under 'Page Set2'
Your 'Report Pages' objects should end up looking something like this:
The technique creates a page hierarchy that effectively interleaves pages at the client level with the detail pages at the invoice level which match the associated preceding client. Since the higher and lower level pages are rendered independently the client details are not repeated for each invoice page.
To have a header only show on the first page of a multi-page report you have to employ a novel technique to trick Cognos into not repeating your header.
Here are the steps:
Turn off the actual page header
Add a new list above your existing list
Select the list object and change the 'Column Titles' list property to 'Hide'
Set the Width property in Size & Overlflow to 100% for the list object
Go into the new query created which is tied to the new list
Drag over a Data Item object
In the new data item expression enter your header text surrounded by quotes (e.g. 'Bob Smith').
Repeat step 7 for all the independent pieces of data header you want to display (e.g. 'ABC Company')
Go back to the report page
Drag over one of your new data item and drop it on your new list
Select the list object and add a header. This can be done through the Headers & Footers toolbar button or the menu item Structures>Headers & Footers>Create Header
Unlock the report
Delete the default text item in the page header
Optional: Add a table of desired size to the page header for organization
Drag over all the data items created in steps 7 & 8 and arrange and style them the way you want them displayed
Select a cell in the main body of the list. Make sure that the property sheet type is 'List Column Body'
Clear the Classes property in the property sheet
Click on the new page header. Makes sure that the property sheet type is List Cell
Clear the Classes property in the property sheet
Remove the data item you added in step 10 (Cognos won't allow you to add headers to lists without columns)
After following the steps you should be able to run the report with the header only showing at the beginning of the list.
Notes:
The technique works because Cognos doesn't repeat the data containers that paginate, which are lists and crosstabs. For contrast, a singleton will be repeated on each page. By adding a new list and putting our header text in it and stripping away the normal list styling we can trick Cognos into not repeating the information on each page.
You might be able to avoid having to put your text in data items within the query. You could try adding text items to the list header instead. I didn't get a chance to test this as my system crashed taking my test report with it, but it should work.

Resources