1
<?xml version="1.0" encoding="utf-8" ?>
5
<record id="stock_frequence_form_view" model="ir.ui.view">
6
<field name="name">stock.frequence.form.view</field>
7
<field name="model">stock.frequence</field>
8
<field name="type">form</field>
9
<field name="arch" type="xml">
10
<form string="Repeat Options">
11
<separator string="Periodicity" colspan="4" />
12
<field name="name" colspan="4" />
13
<group colspan="4" col="16" attrs="{'invisible': [('name', '!=', 'daily')]}">
14
<separator colspan="16" string="Daily configuration" />
16
<field name="daily_frequency_ok" nolabel="1" on_change="choose_daily_frequency(daily_frequency_ok, False)" />
17
<field name="daily_frequency" attrs="{'readonly': [('daily_frequency_ok', '=', 0)], 'required': [('daily_frequency_ok', '=', True)]}" />
18
<label string="day(s)" />
21
<group colspan="4" col="16" attrs="{'invisible': [('name', '!=', 'weekly')]}">
22
<separator colspan="16" string="Weekly configuration" />
24
<field name="weekly_frequency" attrs="{'required': [('name', '=', 'weekly')]}"/>
25
<label string="week(s)" />
28
<label string="On :" />
29
<field name="weekly_sunday_ok" />
30
<field name="weekly_monday_ok" />
31
<field name="weekly_tuesday_ok" />
32
<field name="weekly_wednesday_ok" />
33
<field name="weekly_thursday_ok" />
34
<field name="weekly_friday_ok" />
35
<field name="weekly_saturday_ok" />
37
<group colspan="4" col="16" attrs="{'invisible': [('name', '!=', 'monthly')]}">
38
<separator colspan="16" string="Monthly configuration" />
40
<field name="monthly_frequency" attrs="{'required': [('name', '=', 'monthly')]}"/>
41
<label string="month(s)" />
44
<field name="monthly_one_day" nolabel="1" on_change="monthly_freq_change(monthly_one_day, False)" />
45
<field name="monthly_choose_freq" nolabel="1" colspan="4" attrs="{'readonly': [('monthly_one_day', '=', False)], 'required': [('monthly_one_day', '=', True)]}" />
46
<field name="monthly_choose_day" nolabel="1" colspan="4" attrs="{'readonly': [('monthly_one_day', '=', False)], 'required': [('monthly_one_day', '=', True)]}" />
50
<field name="monthly_repeating_ok" nolabel="1" on_change="monthly_freq_change(False, monthly_repeating_ok)" />
51
<label string="On the :" colspan="1" />
53
<group colspan="14" col="32">
55
<field name="monthly_day01" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
56
<field name="monthly_day02" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
57
<field name="monthly_day03" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
58
<field name="monthly_day04" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
59
<field name="monthly_day05" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
60
<field name="monthly_day06" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
61
<field name="monthly_day07" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
62
<label colspan="10" />
65
<field name="monthly_day08" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
66
<field name="monthly_day09" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
67
<field name="monthly_day10" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
68
<field name="monthly_day11" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
69
<field name="monthly_day12" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
70
<field name="monthly_day13" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
71
<field name="monthly_day14" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
72
<label colspan="10" />
75
<field name="monthly_day15" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
76
<field name="monthly_day16" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
77
<field name="monthly_day17" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
78
<field name="monthly_day18" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
79
<field name="monthly_day19" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
80
<field name="monthly_day20" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
81
<field name="monthly_day21" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
82
<label colspan="10" />
85
<field name="monthly_day22" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
86
<field name="monthly_day23" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
87
<field name="monthly_day24" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
88
<field name="monthly_day25" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
89
<field name="monthly_day26" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
90
<field name="monthly_day27" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
91
<field name="monthly_day28" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
92
<label colspan="10" />
95
<field name="monthly_day29" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
96
<field name="monthly_day30" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
97
<field name="monthly_day31" attrs="{'readonly': [('monthly_repeating_ok', '=', False)]}" />
100
<group colspan="4" col="16" attrs="{'invisible': [('name', '!=', 'yearly')]}">
101
<separator colspan="16" string="Yearly configuration" />
103
<field name="yearly_frequency" attrs="{'required': [('name', '=', 'yearly')]}"/>
104
<label string="year(s)" />
107
<field name="yearly_day_ok" nolabel="1" on_change="yearly_freq_change(yearly_day_ok, False)" />
108
<field name="yearly_day" nolabel="1" attrs="{'readonly': [('yearly_day_ok', '=', False)], 'required': [('yearly_day_ok', '=', True)]}" on_change="check_date_in_month(yearly_day, yearly_choose_month)" />
109
<field name="yearly_choose_month" nolabel="1" attrs="{'readonly': [('yearly_day_ok', '=', False)], 'required': [('yearly_day_ok', '=', True)]}" on_change="check_date_in_month(yearly_day, yearly_choose_month)" />
112
<field name="yearly_date_ok" nolabel="1" on_change="yearly_freq_change(False, yearly_date_ok)" />
113
<field name="yearly_choose_freq" nolabel="1" attrs="{'readonly': [('yearly_date_ok', '=', False)], 'required': [('yearly_date_ok', '=', True)]}" />
114
<field name="yearly_choose_day" nolabel="1" attrs="{'readonly': [('yearly_date_ok', '=', False)], 'required': [('yearly_date_ok', '=', True)]}" />
118
<label string="In : " />
119
<field name="yearly_choose_month_freq" nolabel="1" attrs="{'readonly': [('yearly_date_ok', '=', False)], 'required': [('yearly_date_ok', '=', True)]}" />
121
<group colspan="4" col="16">
122
<separator colspan="16" string="Replenishment scheduling" />
124
<field name="start_date" />
127
<field name="no_end_date" nolabel="1" on_change="change_recurrence('no_end_date', no_end_date, False, False)" />
128
<label string="No end date" />
131
<field name="end_date_ok" nolabel="1" on_change="change_recurrence('end_date_ok', False, end_date_ok, False)" />
132
<field name="end_date" attrs="{'readonly': [('end_date_ok', '=', False)], 'required': [('end_date_ok', '=', True)]}"/>
135
<field name="recurrence_ok" nolabel="1" on_change="change_recurrence('recurrence_ok', False, False, recurrence_ok)" />
136
<field name="recurrence_nb" attrs="{'readonly': [('recurrence_ok', '=', False)], 'required': [('recurrence_ok', '=', True)]}" />
137
<field name="recurrence_type" nolabel="1" attrs="{'readonly': [('recurrence_ok', '=', False)], 'required': [('recurrence_ok', '=', True)]}" />
139
<group colspan="4" col="6">
140
<field name="last_run" />
141
<field name="calculated_end_date" />
142
<field name="next_date" widget="date" />
144
<label colspan="2" />
145
<button colspan="2" name="choose_frequency" type="object" string="Validate the frequency" icon="gtk-ok" />
150
<record id="strock_frequence_tree" model="ir.ui.view">
151
<field name="name">stock.frequence.tree</field>
152
<field name="model">stock.frequence</field>
153
<field name="type">tree</field>
154
<field name="arch" type="xml">
155
<tree string="Frequence">
156
<field name="name" />
157
<field name="start_date" />
158
<field name="calculated_end_date" />
159
<field name="next_date" />
164
<record id="action_stock_frequence_new" model="ir.actions.act_window">
165
<field name="name">Stock Frequence</field>
166
<field name="res_model">stock.frequence</field>
167
<field name="view_type">form</field>
168
<field name="view_mode">tree,form</field>
171
<!-- <menuitem action="action_stock_frequence_new"
172
id="menu_stock_frequence"
173
parent="stock.menu_stock_warehouse_mgmt" /> -->