添加功能

This commit is contained in:
zhou
2025-05-01 18:36:56 +08:00
parent 8afc243d6f
commit 899a219761
6 changed files with 23 additions and 22 deletions
-1
View File
@@ -70,7 +70,6 @@ class Home(http.Controller):
def web_room_partner_create(self, room_id=None, **kw):
ensure_db()
values = {k: v for k, v in request.params.items()}
_logger.info("Initial values: %s", values)
if not (room_id or values['room_id']):
values['error'] = "缺少会议号"
response = request.render('room.partner_create_form_room', values)
+3 -9
View File
@@ -178,15 +178,9 @@
<group/>
<group/>
</group>
<group col="4">
<group>
<field name="room_users_ids" widget="many2many_tags"/>
</group>
<group>
<field name="other_company_user_ids" widget="many2many_tags" readonly="1"/>
</group>
<group/>
<group/>
<group>
<field name="room_users_ids" widget="many2many_tags"/>
<field name="other_company_user_ids" widget="many2many_tags" readonly="0"/>
</group>
<group col="5">
<group>
-5
View File
@@ -153,11 +153,6 @@
<div t-attf-class="clearfix oe_login_buttons text-center gap-1 d-grid mb-1">
<button type="submit" class="btn btn-primary">提交</button>
</div>
<t t-foreach="new_partner" t-as="p">
<label for="p_name" class="form-label">人员名称</label>
<input type="text" placeholder="名字" name="p_name" readonly="readonly" t-att-value="p.name" id="p_name" t-attf-class="form-control" />
</t>
</form>
</div>
</t>
@@ -18,7 +18,7 @@
<field name="district_party_id"/>
<field name="remarks"/>
<field name="scope"/>
<field name="company_id"/>
<field name="company_id" optional="hide"/>
<field name="start_date" optional="hide"/>
<field name="end_date" optional="hide"/>
</tree>
@@ -40,7 +40,7 @@
<group col="2">
<group>
<field name="sequence" force_save="1"/>
<field name="decision_type_on_id" force_save="1"/>
<field name="decision_type_on_id" force_save="1" invisible="1"/>
<field name="council_id"/>
</group>
<group>
@@ -10,12 +10,22 @@ export class CustomTaskListController extends ListController {
openTaskForm() {
this.actionService.doAction({
type: 'ir.actions.act_window',
res_model: 'task.room.wizard',
name: '日程会议',
res_model: 'yuthon.will.task',
name: '创建日程',
view_mode: 'form',
view_type: 'form',
views: [[false, 'form']],
context: {},
});
}
openMeetingArrangementForm() {
this.actionService.doAction({
type: 'ir.actions.act_window',
res_model: 'room.booking',
name: '会议安排',
view_mode: 'form',
view_type: 'form',
views: [[false, 'form']],
target: 'new',
context: {},
});
}
@@ -25,4 +35,4 @@ registry.category("views").add("custom_task_tree_button", {
...listView,
Controller: CustomTaskListController,
buttonTemplate: "yuthon_task.ListView.Buttons",
});
});
@@ -3,7 +3,10 @@
<t t-name="yuthon_task.ListView.Buttons" t-inherit="web.ListView.Buttons">
<xpath expr="//div[hasclass('o_list_buttons')]" position="after">
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="openTaskForm">
新建
新建日程
</button>
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="openMeetingArrangementForm">
新建会议
</button>
</xpath>
</t>