Hi,
Try,

***********************************************************************************
UPDATE
Since the 'Other Allowance' is a monthly amount and not calculated on a daily basis, We need to convert the amount to a daily rate and then multiply it by the number of days worked.
For your Second Concern, You can choose the 'WORKED ENTRIES' that need to be deducted from the actual worked days.
Let's create two new fields named 'x_days' and 'x_actual_days'.
To do this from Odoo UI, Activate Developer Mode,
Go to Settings > Technical > Database Structure > Fields
Create the field x_days,
This field will compute the total number of days in the month

Create the second field x_actual_days,
This field will compute the total number of days the employee worked.

Goto Employee Payslip, Click on Edit View Form and add those fields in the view.


Save the record, You will see that two fields have been added.

Here, the payslip was created for the month of August. Thus, the total number of days is 31.
The employee took a Generic Time Off (with the code LEAVE100), and in the compute function of the 'x_actual_days' field, we deducted this time off. As a result, the actual number of days worked is 30.
Now Goto Salary Rule and Update the Python expression,

nb: x_studio_other_allowance is the custom field I created in the contract.
For example, the employee 'Jeffrey Kelly's other allowance is 310 per month

In this case, we deduct the amount for the day on which the employee took a 'Generic Time Off.' As a result, the actual number of working days becomes 30.
The calculation will be (310/31) * 30 = 300.

Hope it helps,
Kiran K