添加功能

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): def web_room_partner_create(self, room_id=None, **kw):
ensure_db() ensure_db()
values = {k: v for k, v in request.params.items()} values = {k: v for k, v in request.params.items()}
_logger.info("Initial values: %s", values)
if not (room_id or values['room_id']): if not (room_id or values['room_id']):
values['error'] = "缺少会议号" values['error'] = "缺少会议号"
response = request.render('room.partner_create_form_room', values) response = request.render('room.partner_create_form_room', values)
+3 -9
View File
@@ -178,15 +178,9 @@
<group/> <group/>
<group/> <group/>
</group> </group>
<group col="4"> <group>
<group> <field name="room_users_ids" widget="many2many_tags"/>
<field name="room_users_ids" widget="many2many_tags"/> <field name="other_company_user_ids" widget="many2many_tags" readonly="0"/>
</group>
<group>
<field name="other_company_user_ids" widget="many2many_tags" readonly="1"/>
</group>
<group/>
<group/>
</group> </group>
<group col="5"> <group col="5">
<group> <group>
-5
View File
@@ -153,11 +153,6 @@
<div t-attf-class="clearfix oe_login_buttons text-center gap-1 d-grid mb-1"> <div t-attf-class="clearfix oe_login_buttons text-center gap-1 d-grid mb-1">
<button type="submit" class="btn btn-primary">提交</button> <button type="submit" class="btn btn-primary">提交</button>
</div> </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> </form>
</div> </div>
</t> </t>
@@ -18,7 +18,7 @@
<field name="district_party_id"/> <field name="district_party_id"/>
<field name="remarks"/> <field name="remarks"/>
<field name="scope"/> <field name="scope"/>
<field name="company_id"/> <field name="company_id" optional="hide"/>
<field name="start_date" optional="hide"/> <field name="start_date" optional="hide"/>
<field name="end_date" optional="hide"/> <field name="end_date" optional="hide"/>
</tree> </tree>
@@ -40,7 +40,7 @@
<group col="2"> <group col="2">
<group> <group>
<field name="sequence" force_save="1"/> <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"/> <field name="council_id"/>
</group> </group>
<group> <group>
@@ -10,12 +10,22 @@ export class CustomTaskListController extends ListController {
openTaskForm() { openTaskForm() {
this.actionService.doAction({ this.actionService.doAction({
type: 'ir.actions.act_window', type: 'ir.actions.act_window',
res_model: 'task.room.wizard', res_model: 'yuthon.will.task',
name: '日程会议', 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_mode: 'form',
view_type: 'form', view_type: 'form',
views: [[false, 'form']], views: [[false, 'form']],
target: 'new',
context: {}, context: {},
}); });
} }
@@ -25,4 +35,4 @@ registry.category("views").add("custom_task_tree_button", {
...listView, ...listView,
Controller: CustomTaskListController, Controller: CustomTaskListController,
buttonTemplate: "yuthon_task.ListView.Buttons", buttonTemplate: "yuthon_task.ListView.Buttons",
}); });
@@ -3,7 +3,10 @@
<t t-name="yuthon_task.ListView.Buttons" t-inherit="web.ListView.Buttons"> <t t-name="yuthon_task.ListView.Buttons" t-inherit="web.ListView.Buttons">
<xpath expr="//div[hasclass('o_list_buttons')]" position="after"> <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 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> </button>
</xpath> </xpath>
</t> </t>