1 Commits
Author SHA1 Message Date
Thomas Pot f7bcb72c56 [FIX] Error when one attachment cannot be removed. 2026-11-13 16:01:54 +01:00
6 changed files with 138 additions and 8 deletions
+3
View File
@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CsvFileAttributes">
<option name="attributeMap">
<map>
<entry key="/mailcatcher_menu/security/ir.model.access.csv">
<value>
<Attribute>
<option name="separator" value="," />
</Attribute>
</value>
</entry>
</map>
</option>
</component>
</project>
+18
View File
@@ -0,0 +1,18 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="5">
<item index="0" class="java.lang.String" itemvalue="email_validator" />
<item index="1" class="java.lang.String" itemvalue="html2text" />
<item index="2" class="java.lang.String" itemvalue="pyPostcode" />
<item index="3" class="java.lang.String" itemvalue="dicttoxml" />
<item index="4" class="java.lang.String" itemvalue="zeep" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" />
</project>
+78 -5
View File
@@ -1,7 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="417d3a9a-dab7-4fec-b2a8-da7eae112104" name="Changes" comment="" />
<list default="true" id="417d3a9a-dab7-4fec-b2a8-da7eae112104" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/.idea/.gitignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/csv-editor.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testserver_o2b/models/init_test.py" beforeDir="false" afterPath="$PROJECT_DIR$/testserver_o2b/models/init_test.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -18,10 +28,69 @@
<commands />
<urls />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 7,
"fromUser": false
}]]></component>
<component name="NextEditCompletionFeaturesState">
<decayedCancelled>
<entry key="MS100" value="1.0000176245739265" />
<entry key="MS500" value="1.1516799087116174" />
<entry key="S2" value="2.3508135605215807" />
<entry key="S5" value="5.0655235775065535" />
<entry key="S10" value="10.140635249071844" />
<entry key="S30" value="25.213605668167464" />
<entry key="S60" value="36.66831147448945" />
<entry key="M2" value="47.05380012296843" />
<entry key="M5" value="56.49958831719205" />
<entry key="M10" value="60.4796547542878" />
<entry key="M15" value="61.92196701846374" />
<entry key="M30" value="63.42755420445976" />
<entry key="H1" value="64.20518727973476" />
<entry key="H2" value="64.6004163513982" />
<entry key="H4" value="64.79966007517336" />
<entry key="D1" value="64.96653356443815" />
<entry key="W1" value="64.9952172042081" />
</decayedCancelled>
<decayedSelected>
<entry key="MS100" value="0.0" />
<entry key="MS500" value="0.0" />
<entry key="S2" value="0.0" />
<entry key="S5" value="0.0" />
<entry key="S10" value="0.0" />
<entry key="S30" value="0.0" />
<entry key="S60" value="0.0" />
<entry key="M2" value="0.0" />
<entry key="M5" value="0.0" />
<entry key="M10" value="0.0" />
<entry key="M15" value="0.0" />
<entry key="M30" value="0.0" />
<entry key="H1" value="0.0" />
<entry key="H2" value="0.0" />
<entry key="H4" value="0.0" />
<entry key="D1" value="0.0" />
<entry key="W1" value="0.0" />
</decayedSelected>
<decayedShown>
<entry key="MS100" value="0.9395388491784205" />
<entry key="MS500" value="1.1360381732068667" />
<entry key="S2" value="2.3405250673032376" />
<entry key="S5" value="5.0572707766860585" />
<entry key="S10" value="10.132571948873133" />
<entry key="S30" value="25.206461182880567" />
<entry key="S60" value="36.662984381925554" />
<entry key="M2" value="47.05034189543017" />
<entry key="M5" value="56.497917153674166" />
<entry key="M10" value="60.47875869696431" />
<entry key="M15" value="61.921355052224094" />
<entry key="M30" value="63.42724060807389" />
<entry key="H1" value="64.20502851624506" />
<entry key="H2" value="64.60033647033136" />
<entry key="H4" value="64.79962000879364" />
<entry key="D1" value="64.96652686914257" />
<entry key="W1" value="64.995216247306" />
</decayedShown>
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 7,
&quot;fromUser&quot;: false
}</component>
<component name="ProjectId" id="3GRtXrhb1Z1wz5HO20Plf2KjZjN" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
@@ -39,6 +108,10 @@
"git-widget-placeholder": "19.0",
"junie.onboarding.icon.badge.shown": "true",
"last_opened_file_path": "/home/dochse/development/testserver",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"to.speed.mode.migration.done": "true",
"vue.rearranger.settings.migration": "true"
+16 -3
View File
@@ -191,9 +191,22 @@ class IrLogging(models.Model):
if not attachment_ids:
return 0
self.env['ir.attachment'].sudo().browse(attachment_ids).unlink()
_logger.info('Deleted %s unneeded filestore attachments', len(attachment_ids))
return len(attachment_ids)
deleted_count = 0
attachments = self.env['ir.attachment'].sudo()
for attachment_id in attachment_ids:
try:
with self.env.cr.savepoint():
attachments.browse(attachment_id).unlink()
except Exception:
_logger.warning(
'Could not delete unneeded filestore attachment with id %s',
attachment_id,
)
else:
deleted_count += 1
_logger.info('Deleted %s unneeded filestore attachments', deleted_count)
return deleted_count
def set_db_param(self):
## Script to set database expiration date, when enterprise and test env.