Hiding Fields in subtasks which are active/set in parent task in Odoo 15 Enterprise - odoo

Working on Odoo 15 enterprise
I am trying to hide some fields in Subtasks which are active in Parent task
ex: if Field A is set/active in parent task, I want to hide that Field A in subtask,
bec it is not required to fill same field again in subtasks,
Please, Help me to achieve this
Thank You

Related

(VB.NET Visual Studio 2019) How can I make a parent/child database work through multiple forms?

I am creating forms in Visual Studio 2019 (using VB.Net) that is connected to a Microsoft Access Database.
From the image below, I have a parent form (i.e., Customer Database) with a key ID that is Customer Address. When I press the purchase history at the bottom, I can open a child form (i.e., Customer Purchase History). However, I do not know the specific code to write in the child form to filter the purchases for the current key ID.
In the example below, when I press "Purchase History", it shows the purchases of all customers and not of 1011 WESTON RD. The code that I currently use says
"Me.TblCustomerPurchaseHistoryTableAdapter.Fill(Me.CustdataDataSet.tblCustomerPurchaseHostory)"
Can anyone help me how to do the filtering for the child database? I will appreciate your help so much. Thank you!
enter image description here
First of all, you need a parameter to your table adapter. Click on your table adapter and select add query on your child form.
It will prompt out something like
Select Transdate, Customer,Qty,Price from CustomerPurchaseHistory (e.g)
then you add the parameter by extending the query
Select Transdate, Customer,Qty,Price from CustomerPurchaseHistory Where Customer = #Customer (e.g) and Name it as FillByCustomer on Top.
A new query will be created.
Then you probably have something like Me.TblCustomerPurchaseHistoryTableAdapter.FillByCustomer(Me.CustdataDataSet.tblCustomerPurchaseHostory, [Pass your customer Code here])
On your sub form
Declare a parameter something like
Public CustomerCode as string
(So that you can pass the parameter form your parent)
On your parent you can then do something like
frmChildform.show
frmChildform.CustomerCode = [Your selected custoemrcode]
After that on formload event on your childform just do something like
Me.TblCustomerPurchaseHistoryTableAdapter.FillByCustomer(Me.CustdataDataSet.tblCustomerPurchaseHostory, CustomerCode)

Update control value on parent form when all values on subform are changed to a certain value

I am currently helping design a business case form in ACCESS 2013 for our department's product managers to facilitate them submit business cases and store data.
There is one subform on the parent form, which displays all SKUs associated with the business case in datasheet view, as well as their statuses (one SKU might be in stage 1, another in stage 2), and the parent/child form are linked by case ID. That is to say one case ID is associated with many SKUs. What I want to do is to update a field value (case status) on parent form only when all SKU statues are updated to stage 3. If one SKU is stage 3 but another one is in stage 2, then don't update the case status. I googled a lot however there doesn't seem to be a solution I can find online. Could anyone please help me?
Should not save this calculated value to table. Just calculate when needed.
A textbox on subform footer can have expression to count records where stage is not 3.
=Count(IIf(Stage<>3,1))
Textbox on main form can reference the subform textbox.
=IIf([subform container name]!tbxStageCount > 0, "Incomplete", "Complete")

Looping Sharepoint Workflow - update column throws error

I am working on a sharepoint 2010 application where I need to "trick" SharePoint into updating a bunch of child list items when the parent is updated. What I have works some of the time to update some of the items in the child list. Most of the time I get an error for the workflow that updates the child list items.
The workflow could not update the item, possibly because one or more columns for the item require a different type of information.
There are three lists and related columns:
Project - Name (single line of text)
Project Tasks -Project Name (lookup field connecting to project), Project Name 2 (single line of text)
WorkFlowControl - This is used to create the looping
Here is a description of the logic:
When a Project Lead is assigned to that project a workflow fires to update the projects tasks with the project leader's name (updates a person field). It finds the first task that has the same Project Name 2 as the Project that was just updated. Once it sets the project lead it updates the Project Name 2 field by appending a number to the end of the Project Name. This is makes sure this item is not found and updated on the next loop.
When the task is updated it triggers a workflow that creates an item in the workflowcontrol list that holds both the project name and project lead
When an item is created in the workflow control list it triggers a workflow that updates the first matching item in the project task list that has the Project Name in the Project Name 2 field. When it finds one it sets the Project Lead and updates the Project Name in the Project Name 2 field.
The problem is the workflow that fires when an item is created in the workflow control list tends to error with the above error and sometimes the Task is updated with the project lead and other times it does nothing. I suspect the problem has to do with the fact that I am using the project name 2 value to find a list item and also updating that value to make sure it is not found on the next loop. Like I said it sometimes works (updates all tasks with project leads name) other times it only does a few. Which makes me think it is a timing thing but I don't know.
Here is a screen of what the workflow that updates the project tasks when an item is created in the workflow control list. It first sets a workflow variable to hold the project name, then updates the project lead with data found in the workflow control list. Next it should 'log' that the Project Lead was updated. Next it updates the project name 2 value where the project name 2 value matches the project name (see next image)

Access 2007 Reports - limit results

I've got an Access 2007 database where I created a report showing projects (using tblProjects). I then created a sub-report showing project history (using tblProjectHistory). The sub-report is linked to the parent report by fldProjectID (tblProjectHistory) and projectID (tblProject).
The layout is such.
::Project information
--> project history information
++++++++
::Project information
--> project history information
(repeat)
The projects list out correctly, and any project history is also appropriately underneath the respective project. No overlap at all.
I'm wanting to limit the number of project history records in the sub-report to no more than 5 for each project. I've tried modifying the sub-report record source to have "TOP 5" in it. but then it ends up limiting the overall number of sub-report records - no matter if they are under one project or not.
Any idea how I could accomplish that mission? Thank you in advance for your time.
You were on the right track with TOP 5 but I can't think of a way you can do this using the tables themselves as a datasource for the subreport.
I would recommend using a query as the data source for the subreport based on the project ID in the report WHERE projectID = [reports]![reportname]![report project ID field]. You will then be able to group relevant records together by project and select the TOP 5 records for the subreport.

LightSwitch dynamic cascading dropdown lists

In lightswitch, I need to make dynamic cascading dropdown lists based on a recursive relationship:
Table "Categories" includes:
Id
Name
ParentId
here is the desired scenario:
a screen showing a drop down list for the categories with no parent
(ParentId = Null).
once user selects a specific category, another
drop down to be created which includes the selected category
children.
User can select another child category, and show another
dynamic dropdown, and so on till we have categories drop down with
no children.
Thanks & I really appreciate your help with this.
I miss also tree controls in lightswitch, for this reason, I have developed my own:
LightSwitch Custom Control: Tree CRUD Operations
LightSwitch Custom Control: Tree lookup Operations
Be free to get source code and video samples from this links.
Here my control playing with a 2,4Millions nodes tree