Not set value from readonly field when ModifyHeader
Module: sale
We see that we has a fields that is readonly, when change the header, try to write, when is readonly.
Field:
number_external = fields.Char('External Number', readonly=True)
The self.start._save_values to write are:
{'add_rules': True, 'agent': None, 'carrier': 13, 'comment': '', 'company': 1, 'coupon': '', 'currency': 50, 'description': '', 'esale': False, 'esale_coupon': '', 'external_discount': None, 'external_shipment_amount': None, 'external_tax_amount': None, 'external_total_amount': None, 'external_untaxed_amount': None, 'galatea_user': None, 'invoice_address': 1344, 'invoice_method': 'shipment', 'invoice_state': 'none', 'lines': [], 'moves': [], 'mse_code': '', 'number': '', 'number_external': '', 'origin': None, 'party': 1, 'payment_term': 2, 'payment_type': 19, 'payments': [], 'price_list': 1, 'reference': '', 'sale_date': None, 'sale_device': None, 'sale_discount': Decimal('0.0'), 'shipment_address': 1, 'shipment_comment': '', 'shipment_cost_method': 'order', 'shipment_method': 'order', 'shipment_party': None, 'shipment_state': 'none', 'shop': 1, 'state': 'draft', 'status': '', 'status_history': '', 'warehouse': 4}
See that "number_external" is in the dict values to write.